summaryrefslogtreecommitdiff
path: root/update.mk
blob: cde26014a1e83d4aae0ee8583006fe58e83676e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Declare the packages that were updated between versions here. Each
# package must provide a "make install" procedure that will allow to
# update packages from CVS. Currently

# These are the packages that were updated from Kolab Server version
# 2.2.2 to 2.2.3.
UPDATES_2.2.2_2.2.3=clamav                  \
                    db                      \
                    imapd                   \
                    kolabd                  \
                    pear/PEAR-Net_LDAP2     \
                    php-kolab/Kolab_Filter  \
                    php-kolab/Kolab_Server  \
                    kolab-webadmin          \
                    kolab-webclient         \
# Hm, we can't update these automatically...
#                    openpkg                 \
#                    perl-kolab

# Set the new version we are aiming at after each release.
CVS_VERSION=2.2.3
# Determines the current version
CURRENT_VERSION=$(shell $(KOLABDIR)/bin/openpkg rpm -q kolabd | sed -e 's/kolabd-\([0-9.]*\)-[0-9]*/\1/')

KOLAB_SERVER_CVS=KOLAB_SERVER-$(CVS_VERSION)
KOLAB_SERVER_CURRENT=KOLAB_SERVER-$(CURRENT_VERSION)


.PHONY: update
update: current

.PHONY:current
current: $(KOLAB_SERVER_CVS)

.PHONY:$(KOLAB_SERVER_CVS)
$(KOLAB_SERVER_CVS): KOLAB_SERVER-2.2.2
	for UPDATE in $(UPDATES_2.2.2_2.2.3);   \
	do                                      \
	  make -C $$UPDATE install || exit $$?; \
	done


ifeq "x$(KOLAB_SERVER_CURRENT)" "xKOLAB_SERVER-2.2.2"
.PHONY:KOLAB_SERVER-2.2.2
KOLAB_SERVER-2.2.2:
	@echo "You are using Kolab Server 2.2.2. Updating from there..."
else
.PHONY:KOLAB_SERVER-2.2.2
KOLAB_SERVER-2.2.2:
	@echo "You are using Kolab Server $(CURRENT_VERSION)."
	@echo "The update operation is not supported for server versions below 2.2.2"
	@exit 1
endif