|
|||||||||||
|
Help with packages/modules/flavors
From: Steve Shockley <steve.shockley(at)shockley.net>
Date: Sat Nov 30 2002 - 14:41:28 EST
I guess the part I'm still fuzzy on is the difference between a subpackage, pseudo_flavor, packaging, multi_package and module. My goal is to have Courier work like the php4 port, where you can add in modules after the fact and not have 31 flavors. # $OpenBSD$
COMMENT= "mail server for maildir format mailboxes"
COMMENT-fax= "fax server module for courier"
COMMENT-imap= "imap server module for courier"
COMMENT-ldap= "ldap authentication module for courier"
COMMENT-maildrop= "mail filter module for courier"
COMMENT-mlm= "mailing list manager for courier"
COMMENT-mysql= "mysql authentication module for courier"
COMMENT-pgsql= "pgsql authentication module for courier"
COMMENT-pop3= "pop3 server module for courier"
COMMENT-webmail= "webmail server module for courier"
COURIERVER= 0.40.1
DISTNAME= courier-${COURIERVER}
EXTRACT_SUFX= .tar.bz2
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/} #MASTER_SITES= http://www.courier-mta.org/beta/courier/ MAINTAINER= Steve Shockley # GPL PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes
INSTALL_TARGET= install-strip install-perms
SEPARATE_BUILD= concurrent
USE_GMAKE= Yes MAILUSER= smmsp MAILGROUP= smmsp MAILGID= 25 MAILUID= 25 SUBPACKAGE?=
LIB_DEPENDS+= gdbm.2::databases/gdbm BUILD_DEPENDS+= gnupg::security/gnupg RUN_DEPENDS+= gnupg::security/gnupg
# You can enable these if you want, but they take forever to compile.
# Expect is only used for changing passwords in webmail and requires X and
tk/tcl
#BUILD_DEPENDS= ispell::textproc/ispell \ # expect::lang/expect #RUN_DEPENDS+= ispell::textproc/ispell \ # expect::lang/expect CONFIGURE_ARGS+= --disable-root-check \ --datadir=${PREFIX}/share/courier \ --with-authuserdb \ --sysconfdir=${COURIERCONF} \ --with-authdaemon \ --with-authdaemonvar=${COURIERSTATE} \ --enable-workarounds-for-imap-client-bugs \ --with-db=gdbm \ --enable-mimetypes=/var/www/conf/mime.types \ --prefix=$(PREFIX) \ --exec-prefix=${LOCALBASE} \ --localstatedir=${COURIERSTATE} \ --without-ipv6 \ --with-mailuser=${MAILUSER} \ --with-mailgroup=${MAILGROUP} \ --with-mailuid=${MAILUID} \ --with-mailgid=${MAILGID} \ --with-ispell \ --mandir=${PREFIX}/man PSEUDO_FLAVORS+= no_fax no_imap no_maildrop no_mlm no_pop3 no_webmailno_mysql no_ldap no_pgsql FLAVOR?= MULTI_PACKAGES= .if !${FLAVOR:L:Mno_imap} MULTI_PACKAGES+= -imap .endif
.if !${FLAVOR:L:Mno_maildrop}
.if !${FLAVOR:L:Mno_mlm}
.if !${FLAVOR:L:Mno_pop3}
.if !${FLAVOR:L:Mno_webmail}
# mysql
MULTI_PACKAGES+= -mysql
CONFIGURE_ARGS+= --with-authmysql \
--with-mysql-libs=${LOCALBASE}/lib/mysql \
--with-mysql-includes=${LOCALBASE}/include/mysql
MYSQL_DEPENDS+=
lib/mysql/mysqlclient.10:mysql-client-3.23.*:databases/mysql BUILD_DEPENDS+= ${MYSQL_DEPENDS} .endif
# openldap
MULTI_PACKAGES+= -ldap
CONFIGURE_ARGS+= --with-authldap
LDAP_DEPENDS+= ldap.2,lber.2:openldap-client-2.*:databases/openldap
BUILD_DEPENDS+= ${LDAP_DEPENDS}
.endif
# postgresql
MULTI_PACKAGES+= -pgsql
CONFIGURE_ARGS+= --with-pgsql-libs=${LOCALBASE}/lib \
--with-pgsql-includes=${LOCALBASE}/include/postgresq
l
PGSQL_DEPENDS+= pq.2::databases/postgresql
BUILD_DEPENDS+= ${PGSQL_DEPENDS}
.endif # Don't use the standard OpenBSD port for mgetty+sendfax # Instead, use the one at: # http://marc.theaimsgroup.com/?l=openbsd-ports&m=101116192526792&w=2 .endif
CONFIGURE_STYLE= gnu
CXXFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include"
.endfor
.if defined(PACKAGING) && !empty(SUBPACKAGE)
@echo "foo"
MODULE_NAME= ${SUBPACKAGE:S/-//g}
LIB_DEPENDS= ${${MODULE_NAME:U}_DEPENDS}
#LIB_DEPENDS= ${${SUBPACKAGE:U:S/-//g}_DEPENDS}
#RUN_DEPENDS= :courier-${COURIERVER}:myports/courier
#RUN_DEPENDS= :courier-${COURIERVER}:mail/courier
SUBST_VARS= MODULE_NAME
.else .for i in ${MULTI_PACKAGES}
@echo "baz"
#LIB_DEPENDS+= ${${i:U:S/-//g}_DEPENDS}
.endfor .endif post-extract: @cp ${.CURDIR}/files/c_rehash ${WRKDIR}/bin post-install: @cd $(WRKBUILD)/courier && chmod +x perms.sh setperms.sh && MAKE=$(MAKE) ./setperms.sh "$(DESTDIR)" ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/courier @mv $(WRKINST)$(COURIERCONF)/* $(EXAMPLE_DIR) @cp $(WRKBUILD)/permissions.dat $(EXAMPLE_DIR) @cp $(WRKSRC)/sysconftool $(PREFIX)/sbin/sysconftool"s,y2y2y2,${MAILUSER},g" -e "s,y3y3y3,${MAILGROUP},g" ${FILESDIR}/${file} > ${PREFIX}/sbin/${file}
@chmod 555 ${PREFIX}/sbin/${file}
@chown root:wheel ${PREFIX}/sbin/${file}
.endfor
.for i in sendmail-remove sendmail-restore startcourier
${INSTALL_SCRIPT} ${FILESDIR}/$i ${PREFIX}/sbin
.include <bsd.port.mk>
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:38:18 EDT |
||||||||||
|
|||||||||||