# # Makefile for UW-IMAP Slackware package # Copyright (c) 2003 by Robert Stan # PROGNAME = imap VERSION = 2004a ARCH = i486 BUILD = 1rob SOURCE = ftp://ftp.cac.washington.edu/imap/imap-$(VERSION).tar.Z DOCS = docs tools CONTENTS CPYRIGHT README SUPPORT WARNING CUSTNAME = imapd PKGNAME = $(CUSTNAME)-$(VERSION)-$(ARCH)-$(BUILD) MAINTAINER = Robert Stan CFLAGS = "-O2 -pipe -march=$(ARCH) -mcpu=i686" CXXFLAGS = $(CFLAGS) STRIPLIB = y STRIPBIN = y TMP = /var/tmp PKG = $(TMP)/package-$(PROGNAME)-$(VERSION) # prepare build myprep: if [ -d $(PKG) ]; then cd $(TMP); rm -rf package-$(PROGNAME)-$(VERSION); fi mkdir -p $(PKG)/install if [ ! -r `basename $(SOURCE)` ]; then wget $(SOURCE); fi if [ -r $(PROGNAME)-$(VERSION).tar.Z ]; then \ tar xvZf $(PROGNAME)-$(VERSION).tar.Z; \ else \ echo "No source tarball available !"; \ exit 1; \ fi conf: myprep cwd=`pwd`; cd $(PKG); tar xzvf $$cwd/_imap.tar.gz cd $(PROGNAME)-$(VERSION); \ chown -R root.root .; \ find . -perm 664 -exec chmod 644 {} \;; \ find . -perm 775 -exec chmod 755 {} \; build: conf echo y \ | CFLAGS=$(CFLAGS) CXXFLAGS=$(CXXFLAGS) \ make -j10 -C $(PROGNAME)-$(VERSION) slx \ SSLTYPE=unix \ SSLDIR=/usr \ SSLCERTS=/etc/ssl/certs package: build mkdir -p $(PKG)/usr/doc/$(PROGNAME)-$(VERSION) cd $(PROGNAME)-$(VERSION); \ cp -a $(DOCS) $(PKG)/usr/doc/$(PROGNAME)-$(VERSION); \ for i in imapd/imapd ipopd/ipop3d; do cp -fa $$i $(PKG)/usr/sbin; done; \ for i in src/c-client/rfc822.h src/c-client/mail.h c-client/linkage.h \ src/c-client/misc.h; do cp -fa $$i $(PKG)/usr/include; done; \ cp -fa c-client/c-client.a $(PKG)/usr/lib; \ find . -name "*.8" -exec cp -a {} $(PKG)/usr/man/man8 \; cat slack-desc > ../$(PKGNAME).txt cat slack-desc > $(PKG)/install/slack-desc cat slack-required > $(PKG)/install/slack-required STRIPLIB=$(STRIPLIB) STRIPBIN=$(STRIPBIN) ../../preparepkg $(PKG) cd $(PKG) ; makepkg -l y -c n $(PKGNAME).tgz mv $(PKG)/$(PKGNAME).tgz .. include ../../Makefile.global