summaryrefslogtreecommitdiff
path: root/imapd/Makefile
blob: 62d96d4360ae5e90eb94fbebb89b001853d063fa (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
ifeq "x$(KOLABPKGURI)" "x"
  KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/SRC
endif
ifeq "x$(KOLABRPMSRC)" "x"
  KOLABRPMSRC = /kolab/RPM/SRC
endif
ifeq "x$(KOLABRPMPKG)" "x"
  KOLABRPMPKG = /kolab/RPM/PKG
endif
ifeq "x$(KOLABCVSDIR)" "x"
  KOLABCVSDIR = $(CURDIR)
endif

PACKAGE=imapd
VERSION=2.2.12
RELEASE=2.5.0
KOLABRELEASE=2.5.0_kolab2

RPM=/kolab/bin/openpkg rpm
KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`

PATCHES=$(KOLABCVSDIR)/cyradm.annotate.patch \
	$(KOLABCVSDIR)/imapd.annotate.patch \
	$(KOLABCVSDIR)/imapd.morelogging.patch \
	$(KOLABCVSDIR)/imapd.group2.patch \
	$(KOLABCVSDIR)/imapd-goodchars.patch \
	$(KOLABCVSDIR)/imapd.folderchar.patch \
	$(KOLABCVSDIR)/kolab-ldap.patch

all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.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)/

	cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/           # Patch for imapd.spec
	cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_group yes' --define 'with_atvdom yes' --define 'with_annotate yes' --define 'with_ldap yes' --define 'with_goodchars yes' --define 'with_morelogging yes'
	cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)

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

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

clean:
	rm -rf /kolab/RPM/TMP/cyrus-imapd* cyrus* imapd* rc.imapd vhosthack.patch fsl.imapd groupfile.patch $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm