summaryrefslogtreecommitdiff
path: root/imapd/Makefile
blob: d29c35e4e7e6ee92e7ffccad886755ecd8045c11 (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
54
55
56
57
58
ifeq "x$(KOLABPKGURI)" "x"
	KOLABPKGURI = http://files.kolab.org/server/development-2.2/openpkg-orig-srpms/
endif
ifeq "x$(KOLABRPMSRC)" "x"
	KOLABRPMSRC = $(HOME)/RPM/SRC
endif
ifeq "x$(KOLABRPMPKG)" "x"
	KOLABRPMPKG = $(HOME)/RPM/PKG
endif
ifeq "x$(KOLABCVSDIR)" "x"
	KOLABCVSDIR = $(CURDIR)
endif
ifeq "x$(RPM)" "x"
	RPM = $(HOME)/bin/openpkg rpm
endif

ifeq "x$(PLATTAG)" "x"
	PLATTAG = $(shell $(RPM) -q --qf="%{ARCH}-%{OS}" openpkg)-$(HOME:/%=%)
endif

PACKAGE=imapd
VERSION=2.3.13
RELEASE=20081020
KOLABRELEASE=20081020_kolab2

PATCHES=../patches/cyrus-imapd/cyrus-imapd-$(VERSION)/KOLAB_cyrus-cyradm-$(VERSION)_Annotations.patch \
	../patches/cyrus-imapd/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_Annotations2.patch \
	../patches/cyrus-imapd/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_Folder-names.patch \
	../patches/cyrus-imapd/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_Groups2.patch \
	../patches/cyrus-imapd/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_Logging.patch \
	../patches/cyrus-imapd/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_timsieved_starttls-sendcaps.patch \
	../patches/cyrus-imapd/cyrus-imapd-$(VERSION)/KOLAB_cyrus-imapd-$(VERSION)_UID.patch

.PHONY: all
all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm

$(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).$(PLATTAG).rpm $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(KOLABCVSDIR)/kolab.patch $(PATCHES) Makefile
	$(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm

	cp $(PATCHES) $(KOLABRPMSRC)/$(PACKAGE)/

	cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_fsl yes' --define 'with_group yes' --define 'with_group_igncase yes' --define 'with_atvdom yes' --define 'with_drac no' --define 'with_replication no' --define 'with_murder no' --define 'with_listext no' --define 'with_nntp no' --define 'with_ldap yes' --define 'with_annotate yes' --define 'with_morelogging yes' --define 'with_kolab yes' --define 'with_kolab_nocaps yes'
	cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)

$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm:
	wget -c $(KOLABPKGURI)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm

.PHONY: dist
dist: all
	cp $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/

.PHONY: clean
clean:
	rm -f $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm

.PHONY: install
install: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).$(PLATTAG).rpm
	$(RPM) -Uhv --force $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).$(PLATTAG).rpm