From 6173fab9eed8ee1d57c7912a4f60b4186a3d8c50 Mon Sep 17 00:00:00 2001 From: crees Date: Sat, 17 Mar 2012 00:17:05 +0000 Subject: - Remove bogus post-deinstall target PR: ports/166073 Submitted by: jgh - Use USERS - Use package dependencies for p5- dependencies, as per convention - Actually make pkg-install work correctly for packages using SUB_LIST rather than passing values in post-install Feature safe: yes --- mail/sympa5/Makefile | 48 +++++++++++++------------- mail/sympa5/files/pkg-install.in | 43 +++++++++++++++++++++++ mail/sympa5/pkg-deinstall | 21 ------------ mail/sympa5/pkg-install | 73 ---------------------------------------- 4 files changed, 68 insertions(+), 117 deletions(-) create mode 100644 mail/sympa5/files/pkg-install.in delete mode 100644 mail/sympa5/pkg-deinstall delete mode 100644 mail/sympa5/pkg-install (limited to 'mail') diff --git a/mail/sympa5/Makefile b/mail/sympa5/Makefile index 3366b2ccc12f..58edb23f2818 100644 --- a/mail/sympa5/Makefile +++ b/mail/sympa5/Makefile @@ -14,26 +14,33 @@ MASTER_SITES?= http://www.sympa.org/distribution/ MAINTAINER= crees@FreeBSD.org COMMENT= Sympa is an electronic mailing list manager -BUILD_DEPENDS+= ${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \ - ${SITE_PERL}/IO/Stringy.pm:${PORTSDIR}/devel/p5-IO-stringy \ - ${SITE_PERL}/SOAP/Lite.pm:${PORTSDIR}/net/p5-SOAP-Lite \ - ${SITE_PERL}/MIME/EncWords.pm:${PORTSDIR}/mail/p5-MIME-EncWords \ - ${SITE_PERL}/File/NFSLock.pm:${PORTSDIR}/devel/p5-File-NFSLock \ - ${SITE_PERL}/Locale/TextDomain.pm:${PORTSDIR}/devel/p5-Locale-libintl \ - ${SITE_PERL}/Regexp/Common.pm:${PORTSDIR}/textproc/p5-Regexp-Common \ - ${SITE_PERL}/${PERL_ARCH}/Template.pm:${PORTSDIR}/www/p5-Template-Toolkit \ - ${SITE_PERL}/${PERL_ARCH}/XML/LibXML.pm:${PORTSDIR}/textproc/p5-XML-LibXML \ - ${SITE_PERL}/Crypt/CipherSaber.pm:${PORTSDIR}/security/p5-Crypt-CipherSaber \ - ${SITE_PERL}/mach/Crypt/OpenSSL/X509.pm:${PORTSDIR}/security/p5-Crypt-OpenSSL-X509 \ - ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap \ - ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \ - ${LOCALBASE}/bin/mhonarc:${PORTSDIR}/www/mhonarc +BUILD_DEPENDS+= \ + p5-Archive-Zip>0:${PORTSDIR}/archivers/p5-Archive-Zip \ + p5-IO-stringy>0:${PORTSDIR}/devel/p5-IO-stringy \ + p5-SOAP-Lite>0:${PORTSDIR}/net/p5-SOAP-Lite \ + p5-MIME-EncWords>0:${PORTSDIR}/mail/p5-MIME-EncWords \ + p5-File-NFSLock>0:${PORTSDIR}/devel/p5-File-NFSLock \ + p5-Locale-libintl>0:${PORTSDIR}/devel/p5-Locale-libintl \ + p5-Regexp-Common>0:${PORTSDIR}/textproc/p5-Regexp-Common \ + p5-Template-Toolkit>0:${PORTSDIR}/www/p5-Template-Toolkit \ + p5-XML-LibXML>0:${PORTSDIR}/textproc/p5-XML-LibXML \ + p5-Crypt-CipherSaber>0:${PORTSDIR}/security/p5-Crypt-CipherSaber \ + p5-Crypt-OpenSSL-X509>0:${PORTSDIR}/security/p5-Crypt-OpenSSL-X509 \ + p5-perl-ldap>0:${PORTSDIR}/net/p5-perl-ldap \ + p5-DBI>0:${PORTSDIR}/databases/p5-DBI \ + p5-HTML-Parser>0:${PORTSDIR}/www/p5-HTML-Parser \ + ${LOCALBASE}/bin/mhonarc:${PORTSDIR}/www/mhonarc RUN_DEPENDS:= ${BUILD_DEPENDS} +USERS= sympa +GROUPS= sympa +SUB_FILES= pkg-install +SUB_LIST= DB_TYPE=${DB_TYPE} + LATEST_LINK= sympa5 USE_APACHE= 20+ HAS_CONFIGURE= yes -USE_PERL5= 5.8.6+ +USE_PERL5= yes USE_GMAKE= yes USE_GETTEXT= yes CONFIGURE_ARGS+=--prefix=${PREFIX} \ @@ -76,6 +83,7 @@ PLIST_SUB+= NLS="" .if !defined(WITHOUT_FASTCGI) BUILD_DEPENDS+= ${LOCALBASE}/${APACHEMODDIR}/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/FCGI.pm:${PORTSDIR}/www/p5-FCGI +SUB_LIST+= WITH_FASTCGI=yes .endif .if ${DB_TYPE} == "Oracle" @@ -120,18 +128,12 @@ post-patch: .endif @${FIND} ${WRKSRC} -name "*.orig" -a -exec ${RM} -f {} \; -pre-install: - @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: - @PKG_PREFIX=${PREFIX} DB_TYPE=${DB_TYPE} WITH_FASTCGI=${WITH_FASTCGI} \ - ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SETENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${INSTALL_MAN} ${WRKSRC}/doc/man8/alias_manager.8 ${MAN8PREFIX}/man/man8/ @${INSTALL_MAN} ${WRKSRC}/doc/man8/archived.8 ${MAN8PREFIX}/man/man8/ @${INSTALL_MAN} ${WRKSRC}/doc/man8/bounced.8 ${MAN8PREFIX}/man/man8/ @${INSTALL_MAN} ${WRKSRC}/doc/man8/sympa.8 ${MAN8PREFIX}/man/man8/ -post-deinstall: - @PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL - .include diff --git a/mail/sympa5/files/pkg-install.in b/mail/sympa5/files/pkg-install.in new file mode 100644 index 000000000000..91c7963aa177 --- /dev/null +++ b/mail/sympa5/files/pkg-install.in @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/mail/sympa5/files/Attic/pkg-install.in,v 1.1 2012-03-17 00:17:05 crees Exp $ +# + +if [ x"$2" = xPOST-INSTALL ]; then + echo "============================================================" +if [ x"%%DB_TYPE%%" != "x" ]; then + echo "If this is your first installation of sympa, please load" + echo "this file with your %%DB_TYPE%% database client:" + echo " ${PKG_PREFIX}/bin/create_db.%%DB_TYPE%%" + echo "" +fi + echo "A default configuration is installed," + echo "to configure sympa interactively, please run:" + echo " perl ${PKG_PREFIX}/sbin/sympa_wizard.pl" + echo "" + echo "You may also manually edit the two configuration files:" + echo " ${PKG_PREFIX}/etc/sympa/sympa.conf" + echo " ${PKG_PREFIX}/etc/sympa/wwsympa.conf" + echo "============================================================" + echo "To set up the wwsympa server, add something like this to" + echo "your Apache configuration file:" + echo "" + echo " DocumentRoot \"${PKG_PREFIX}/sympa\"" + echo " AddDefaultCharset UTF-8" + echo " DirectoryIndex wws" + echo " Options +Indexes" +if [ x"%%WITH_FASTCGI%%" != x ]; then + echo " LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so" + echo " " + echo " SetHandler fastcgi-script" + echo " " +fi + echo " " + echo " Allow from all" + echo " " + echo " ScriptAlias /wws ${PKG_PREFIX}/sympa/cgi-bin/wwsympa-wrapper" + echo "============================================================" + exit 0 +fi + +exit 0 diff --git a/mail/sympa5/pkg-deinstall b/mail/sympa5/pkg-deinstall deleted file mode 100644 index 44a2a584ce2f..000000000000 --- a/mail/sympa5/pkg-deinstall +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -USER=sympa -GROUP=${USER} - -if pw groupshow "${USER}" 2>/dev/null 1>&2; then - echo "To delete the 'sympa' group permanently, use 'pw groupdel ${USER}'" -fi - -if pw usershow "${USER}" 2>/dev/null 1>&2; then - echo "To delete the 'sympa' user permanently, use 'pw userdel ${USER}'" -fi - -exit 0 diff --git a/mail/sympa5/pkg-install b/mail/sympa5/pkg-install deleted file mode 100644 index 7b37b790231a..000000000000 --- a/mail/sympa5/pkg-install +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -if [ x"$2" = xPOST-INSTALL ]; then - echo "============================================================" -if [ x"${DB_TYPE}" != "x" ]; then - echo "If this is your first installation of sympa, please load" - echo "this file with your ${DB_TYPE} database client:" - echo " ${PKG_PREFIX}/bin/create_db.${DB_TYPE}" - echo "" -fi - echo "A default configuration is installed," - echo "to configure sympa interactively, please run:" - echo " perl ${PKG_PREFIX}/sbin/sympa_wizard.pl" - echo "" - echo "You may also manually edit the two configuration files:" - echo " ${PKG_PREFIX}/etc/sympa/sympa.conf" - echo " ${PKG_PREFIX}/etc/sympa/wwsympa.conf" - echo "============================================================" - echo "To set up the wwsympa server, add something like this to" - echo "your Apache configuration file:" - echo "" - echo " DocumentRoot \"${PKG_PREFIX}/sympa\"" - echo " AddDefaultCharset UTF-8" - echo " DirectoryIndex wws" - echo " Options +Indexes" -if [ x"${WITH_FASTCGI}" != x ]; then - echo " LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so" - echo " " - echo " SetHandler fastcgi-script" - echo " " -fi - echo " " - echo " Allow from all" - echo " " - echo " ScriptAlias /wws ${PKG_PREFIX}/sympa/cgi-bin/wwsympa-wrapper" - echo "============================================================" - exit 0 -fi - -if [ x"$2" != xPRE-INSTALL ]; then - exit 0 -fi - -USER=sympa -GROUP=${USER} -UID=200 -GID=${UID} - -if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi -fi - -if ! pw usershow "${USER}" 2>/dev/null 1>&2; then - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -s /sbin/nologin -d /nonexistent \ - -c "Sympa Owner"; \ - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi - -exit 0 -- cgit