From owner-svn-ports-head@FreeBSD.ORG Wed Dec 11 08:29:02 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D58CDBC7; Wed, 11 Dec 2013 08:29:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B52DC179C; Wed, 11 Dec 2013 08:29:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBB8T234069930; Wed, 11 Dec 2013 08:29:02 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBB8T21v069927; Wed, 11 Dec 2013 08:29:02 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201312110829.rBB8T21v069927@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 11 Dec 2013 08:29:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r336151 - in head/mail/prayer: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 08:29:02 -0000 Author: bapt Date: Wed Dec 11 08:29:01 2013 New Revision: 336151 URL: http://svnweb.freebsd.org/changeset/ports/336151 Log: Support stage Support packaging as a user Define Make arguments instead of heavily patching Fix build on 10 and HEAD Deleted: head/mail/prayer/files/patch-Config Modified: head/mail/prayer/Makefile head/mail/prayer/pkg-plist Modified: head/mail/prayer/Makefile ============================================================================== --- head/mail/prayer/Makefile Wed Dec 11 07:53:16 2013 (r336150) +++ head/mail/prayer/Makefile Wed Dec 11 08:29:01 2013 (r336151) @@ -10,19 +10,15 @@ COMMENT= Prayer Webmail System LICENSE= GPLv2 -LIB_DEPENDS= c-client4:${PORTSDIR}/mail/cclient +LIB_DEPENDS= libc-client4.so:${PORTSDIR}/mail/cclient -USES= iconv shebangfix gmake perl5 +USES= iconv shebangfix gmake perl5 uidfix USE_PERL5= build -LDFLAGS+= -L${LOCALBASE}/lib SHEBANG_FILES= utils/ucsnews.pl \ templates/old/make_olist.pl \ templates/src/*.pl -MAKE_ENV+= PORTCFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - PORTLDFLAGS="${LDFLAGS}" - PORTDOCS= ACCOUNTD CMD_LINE DESIGN DONE DONE-OLD FEATURES ICONLIST \ INSTALL LOGS NOTICE README ROADMAP SECURITY TODO @@ -36,22 +32,54 @@ SESSIONCACHE_DESC= Activate Session Cach USERS= _prayer GROUPS= prayer -MAN5= prayer.cf.5 -MAN8= prayer-session.8 prayer-ssl-prune.8 prayer.8 +SESSIONCACHE_USE= BDB=yes +LDAP_USE= OPENLDAP=yes +TIDY_LIB_DEPENDS= libtidy-0.99.so:${PORTSDIR}/www/tidy-lib + +GID!= id -g +DESTDIRNAME= BROOT +MAKE_ARGS+= RW_USER="${UID}" RW_GROUP="${GID}" RO_GROUP="${GID}" RO_USER="${UID}" \ + CCLIENT_INCLUDE="-I${LOCALBASE}/include/c-client" \ + CCLIENT_LIBS="-L${LOCALBASE}/lib -lc-client4" \ + CC="${CC}" \ + CPPFLAGS="${CFLAGS}" \ + PREFIX="${PREFIX}/prayer" \ + BIN_DIR="${PREFIX}/sbin" \ + PRAYER_CONFIG_FILE="${ETCDIR}/prayer.cf" \ + ACCOUNTD_CONFIG_FILE="${ETCDIR}/accountd.cf" -NO_STAGE= yes .include -.if ${PORT_OPTIONS:MSESSIONCACHE} -USE_BDB= yes +.if ${PORT_OPTIONS:MLDAP_ENABLE} +MAKE_ARGS+= LDAP_ENABLE=true \ + LDAP_INCLUDE="-I${LOCALBASE}/include" \ + LDAP_LIBS="-L${LOCALBASE}/lib -lldap" +.else +MAKE_ARGS+= LDAP_ENABLE=false .endif -.if ${PORT_OPTIONS:MLDAP} -USE_OPENLDAP= yes +.if ${PORT_OPTIONS:MTIDY} +MAKE_ARGS+= TIDY_ENABLE=true \ + TIDY_INCLUDE=-I${LOCALBASE}/include/tidy \ + TIDY_LIBS="-L${LOCALBASE}/lib -ltidy" +.else +MAKE_ARGS+= TIDY_ENABLE=false .endif -.if ${PORT_OPTIONS:MTIDY} -LIB_DEPENDS+= tidy-0.99.0:${PORTSDIR}/www/tidy-lib +.if ${PORT_OPTIONS:MSSL} +MAKE_ARGS+= CCLIENT_SSL_ENABLE=true \ + SSL_ENABLE=true +.else +MAKE_ARGS+= CCLIENT_SSL_ENABLE=false \ + SSL_ENABLE=false +.endif + +.if ${PORT_OPTIONS:MSESSION_CACHE} +MAKE_ARGS+= SESSION_CACHE_ENABLE=true \ + DB_INCLUDE=-I${BDB_INCLUDE_DIR} \ + DB_LIBS="-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}" +.else +MAKE_ARGS+= SESSION_CACHE_ENABLE=false .endif pre-patch: @@ -63,41 +91,15 @@ post-patch: # change the user in the default config and cylog util @${REINPLACE_CMD} "s#prayer_user = \"prayer\"#prayer_user = \"_prayer\"#" ${WRKSRC}/files/etc/prayer.cf.SRC @${REINPLACE_CMD} "s#\"prayer\" \"prayer\"#\"_prayer\" \"prayer\"#" ${WRKSRC}/utils/prayer-cyclog.SRC - @${REINPLACE_CMD} "/^CC\s.*/d" ${WRKSRC}/Config - @${REINPLACE_CMD} "s#%%PREFIX%%#${PREFIX}#" ${WRKSRC}/Config - -post-configure: -.if ${PORT_OPTIONS:MSESSIONCACHE} - @${REINPLACE_CMD} "s|^#DB_INCLUDE=.*|DB_INCLUDE=-I${BDB_INCLUDE_DIR}|" ${WRKSRC}/Config - @${REINPLACE_CMD} "s|^#DB_LIBS=.*|DB_LIBS=-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}|" ${WRKSRC}/Config -.else - @${REINPLACE_CMD} "s#^SESSION_CACHE_ENABLE = true#SESSION_CACHE_ENABLE = false#" ${WRKSRC}/Config -.endif - @${REINPLACE_CMD} "s#^RW_USER = prayer#RW_USER = _prayer#" ${WRKSRC}/Config - -.if ${PORT_OPTIONS:MSSL} - @${REINPLACE_CMD} "s#CCLIENT_SSL_ENABLE = false#CCLIENT_SSL_ENABLE = true#" ${WRKSRC}/Config -.else - @${REINPLACE_CMD} "s#^SSL_ENABLE = true#SSL_ENABLE = false#" ${WRKSRC}/Config -.endif - -.if ! ${PORT_OPTIONS:MLDAP} - @${REINPLACE_CMD} "s#LDAP_ENABLE = true#LDAP_ENABLE = false#" ${WRKSRC}/Config -.endif - -.if ! ${PORT_OPTIONS:MTIDY} - @${REINPLACE_CMD} "s#TIDY_ENABLE = true#TIDY_ENABLE = false#" ${WRKSRC}/Config -.else - @${REINPLACE_CMD} "s#TIDY_INCLUDE=-I/usr/include/tidy#TIDY_INCLUDE=-I${LOCALBASE}/include/tidy#" ${WRKSRC}/Config -.endif + @${REINPLACE_CMD} "s,-liconv,${ICONV_LIB}," ${WRKSRC}/Config pre-install: - @${MKDIR} ${PREFIX}/etc/prayer + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/prayer \ + ${STAGEDIR}${PREFIX}/prayer post-install: -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - @cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} -.endif + @${MKDIR} ${STAGEDIR}${DOCSDIR} + @cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + @${MKDIR} ${STAGEDIR}/var/spool/prayer .include Modified: head/mail/prayer/pkg-plist ============================================================================== --- head/mail/prayer/pkg-plist Wed Dec 11 07:53:16 2013 (r336150) +++ head/mail/prayer/pkg-plist Wed Dec 11 08:29:01 2013 (r336151) @@ -1,3 +1,9 @@ +etc/prayer/prayer.cf-dist +etc/prayer/accountd.cf-dist +man/man5/prayer.cf.5.gz +man/man8/prayer-session.8.gz +man/man8/prayer-ssl-prune.8.gz +man/man8/prayer.8.gz prayer/icons/bg-home-menu-top.gif prayer/icons/bg-nav-primary.gif prayer/icons/bg-tab-left-active.gif @@ -93,8 +99,6 @@ prayer/static/reset.css prayer/static/rssfeed.css prayer/static/typography.css prayer/static/yellow.css -etc/prayer/prayer.cf-dist -etc/prayer/accountd.cf-dist prayer/etc/motd.html sbin/prayer sbin/prayer-db-prune @@ -114,4 +118,3 @@ sbin/prayer-chroot @exec mkdir -p /var/spool/prayer @exec chown -R _prayer:prayer /var/spool/prayer @dirrmtry /var/spool/prayer -@stopdaemon prayer