# # Makefile for Courier-IMAP Slackware package # Copyright (c) 2004 by Robert Stan # PROGNAME = courier-imap VERSION = 3.0.7 ARCH = i486 BUILD = 1rob SOURCE = http://heanet.dl.sourceforge.net/sourceforge/courier/courier-imap-$(VERSION).tar.bz2 DOCS = 00README* AUTHORS COPY* INSTALL NEWS README *.html authlib/README* \ imap/BUGS imap/Change* imap/FAQ imap/*.html maildir/*.html tcpd/READM* tcpd/*.html \ userdb/*.html sysconftool README.imap README.maildirquota README.sharedfolders CUSTNAME = $(PROGNAME) 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) conf: prep cd $(PROGNAME)-$(VERSION); \ CFLAGS=$(CFLAGS) CXXFLAGS=$(CXXFLAGS) \ ./configure --prefix=/usr \ --sysconfdir=/etc/courier-imap \ --libexecdir=/usr/libexec/courier-imap \ --localstatedir=/var \ --with-authdaemonvar=/var/run/authdaemon \ --with-trashquota \ --with-db=gdbm \ --with-authshadow \ --with-authpwd \ --with-authvchkpw \ --with-authmysql \ --with-mysql-libs=/usr/lib/mysql \ --with-mysql-includes=/usr/include/mysql \ --disable-root-check build: conf make -j4 -C $(PROGNAME)-$(VERSION) package: build mkdir -p $(PKG)/usr/doc/$(PROGNAME)-$(VERSION) cd $(PROGNAME)-$(VERSION); \ mv imap/README README.imap; \ mv maildir/README.maildirquota.txt README.maildirquota; \ mv maildir/README.sharedfolders.txt README.sharedfolders; \ cp -a $(DOCS) $(PKG)/usr/doc/$(PROGNAME)-$(VERSION); \ make DESTDIR=$(PKG) install for f in `ls $(PKG)/etc/courier-imap/*.dist`; do \ echo "/etc/courier-imap/`basename $$f`" >> $(PKG)/etc/courier-imap/configlist; \ done cp $(PROGNAME)-$(VERSION)/sysconftool $(PKG)/etc/courier-imap mv $(PKG)/etc/courier-imap/imapd.cnf $(PKG)/etc/courier-imap/imapd.cnf.new mv $(PKG)/etc/courier-imap/pop3d.cnf $(PKG)/etc/courier-imap/pop3d.cnf.new mkdir -p $(PKG)/etc/rc.d; cp rc.courier-imap $(PKG)/etc/rc.d cat slack-desc > ../$(PKGNAME).txt cat slack-desc > $(PKG)/install/slack-desc cat slack-required > $(PKG)/install/slack-required cat doinst.sh >> $(PKG)/install/doinst.sh STRIPLIB=$(STRIPLIB) STRIPBIN=$(STRIPBIN) ../../preparepkg $(PKG) mkdir -p -m 700 $(PKG)/var/run/authdaemon chmod 644 $(PKG)/usr/libexec/courier-imap/authlib/authdaemond.{ldap,mysql} cd $(PKG) ; makepkg -l y -c n $(PKGNAME).tgz mv $(PKG)/$(PKGNAME).tgz .. include ../../Makefile.global