mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-06 06:30:19 +00:00
[1] Remove unnecessary dependency on Berkeley DB
[2] Fix RUN_DEPENDS pollution from BUILD_DEPENDS [2] Use USERS/GROUPS [2] Use DATADIR rather than ${PREFIX}/sympa [2] Remove useless post-deinstall target [2] Stop clobbering config files on deinstall PR: ports/157471 Submitted by: [1] Igor Zabelin (igorz yandex ru), [2] Chris Rees (utisoft gmail com) (maintainer)
This commit is contained in:
parent
182d7933ee
commit
298d0a387e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275157
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= sympa
|
||||
PORTVERSION= 6.1.4
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.sympa.org/distribution/ \
|
||||
http://www.sympa.org/distribution/old/
|
||||
@ -20,34 +21,48 @@ BUILD_DEPENDS+= ${SITE_PERL}/Mail/Mailer.pm:${PORTSDIR}/mail/p5-Mail-Tools \
|
||||
${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL \
|
||||
${SITE_PERL}/Crypt/CipherSaber.pm:${PORTSDIR}/security/p5-Crypt-CipherSaber \
|
||||
${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap \
|
||||
${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB \
|
||||
${SITE_PERL}/${PERL_ARCH}/Locale/Msgcat.pm:${PORTSDIR}/misc/p5-Locale-Msgcat \
|
||||
${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
|
||||
${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
|
||||
RUN_DEPENDS= ${BUILD_DEPENDS}
|
||||
|
||||
RUN_DEPENDS:= ${BUILD_DEPENDS}
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
# Ignore alpha/beta versions
|
||||
PORTSCOUT= limit:^[0-9]+(\.[0-9]+)*$$
|
||||
|
||||
USERS= sympa
|
||||
GROUPS= sympa
|
||||
GNU_CONFIGURE= yes
|
||||
USE_PERL5= yes
|
||||
USE_APACHE= 1.3+
|
||||
CONFIGURE_ARGS+=--prefix=${PREFIX}/sympa \
|
||||
--with-confdir=${PREFIX}/etc \
|
||||
--with-docdir=${EXAMPLESDIR} \
|
||||
--with-initdir=${PREFIX}/etc/rc.d \
|
||||
--with-etcdir=${PREFIX}/sympa/bin/etc \
|
||||
--with-iconsdir=${PREFIX}/www/icons \
|
||||
--with-lockdir=/var/spool/lock \
|
||||
--mandir=${PREFIX}/man \
|
||||
${CONFIGURE_TARGET}
|
||||
ICONSDIR?= www/icons
|
||||
CONFIGURE_ARGS+=--bindir=${PREFIX}/libexec/${PORTNAME} \
|
||||
--libexecdir=${PREFIX}/libexec/${PORTNAME} \
|
||||
--localedir=${PREFIX}/share/locale \
|
||||
--sbindir=${PREFIX}/libexec/${PORTNAME} \
|
||||
--sysconfdir=${ETCDIR} \
|
||||
--with-confdir=${PREFIX}/etc \
|
||||
--with-docdir=${EXAMPLESDIR} \
|
||||
--with-expldir=${DATADIR}/list_data \
|
||||
--with-iconsdir=${PREFIX}/${ICONSDIR} \
|
||||
--with-initdir=${PREFIX}/etc/rc.d \
|
||||
--with-lockdir=/var/spool/lock \
|
||||
--with-modulesdir=${PREFIX}/libexec/${PORTNAME} \
|
||||
--with-piddir=/var/run/${PORTNAME} \
|
||||
--with-scriptdir=${PREFIX}/libexec/${PORTNAME} \
|
||||
--with-spooldir=/var/spool/${PORTNAME} \
|
||||
--mandir=${MAN8PREFIX}/man
|
||||
CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN}
|
||||
MAKE_ENV?= PERL_EXTUTILS_AUTOINSTALL=--skip
|
||||
SUB_FILES= pkg-install
|
||||
|
||||
.if !defined(WITHOUT_NLS)
|
||||
USE_GETTEXT= yes
|
||||
PLIST_SUB+= NLS=""
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-nls
|
||||
CONFIGURE_ARGS+=--disable-nls
|
||||
PLIST_SUB+= NLS="@comment "
|
||||
.endif
|
||||
|
||||
@ -60,28 +75,18 @@ DB_TYPE=
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_FASTCGI)
|
||||
. if ${APACHE_VERSION}>=20
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache2/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi
|
||||
. else
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi
|
||||
. endif
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/FCGI.pm:${PORTSDIR}/www/p5-FastCGI
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/${APACHEMODDIR}/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi \
|
||||
${SITE_PERL}/${PERL_ARCH}/FCGI.pm:${PORTSDIR}/www/p5-FastCGI
|
||||
.endif
|
||||
|
||||
.if ${DB_TYPE} == "Oracle"
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Oracle.pm:${PORTSDIR}/databases/p5-DBD-Oracle
|
||||
.else
|
||||
. if ${DB_TYPE} == "Pg"
|
||||
.elif ${DB_TYPE} == "Pg"
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
|
||||
. else
|
||||
. if ${DB_TYPE} == "Sybase"
|
||||
.elif ${DB_TYPE} == "Sybase"
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Sybase.pm:${PORTSDIR}/databases/p5-DBD-Sybase
|
||||
. else
|
||||
. if ${DB_TYPE} == "mysql"
|
||||
.elif ${DB_TYPE} == "mysql"
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
|
||||
. endif
|
||||
. endif
|
||||
. endif
|
||||
.endif
|
||||
|
||||
pre-fetch:
|
||||
@ -96,15 +101,20 @@ pre-install:
|
||||
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's/\$$(DESTDIR)\$$(sampledir)/\$$(sampledir)/g' \
|
||||
@${REINPLACE_CMD} -e 's|^\( *staticdir=\).*$$|\1${DATADIR}|' \
|
||||
-e 's|^\( *defaultdir=\).*$$|\1${EXAMPLESDIR}|' \
|
||||
-e 's|^\( *arcdir=\).*$$|\1${DATADIR}/arc|' \
|
||||
-e 's|^\( *bouncedir=\).*$$|\1${DATADIR}/bounce|' \
|
||||
-e 's|^\( *execcgidir=\).*$$|\1${PREFIX}/libexec/${PORTNAME}|' \
|
||||
${WRKSRC}/configure
|
||||
@${REINPLACE_CMD} -e 's|\(--target.*sympa.conf\)|\1.sample|' \
|
||||
${WRKSRC}/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's/\$$(DESTDIR)\$$(sampledir)/\$$(sampledir)/g' \
|
||||
${WRKSRC}/doc/sample/Makefile.in
|
||||
@${FIND} ${WRKSRC} -name "*.orig" -a -exec ${RM} -f {} \;
|
||||
# @${FIND} ${WRKSRC} \( -name "*.orig" -or -name "*.bak" \) -delete
|
||||
|
||||
post-install:
|
||||
@PKG_PREFIX=${PREFIX} DB_TYPE=${DB_TYPE} WITH_FASTCGI=${WITH_FASTCGI} \
|
||||
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
post-deinstall:
|
||||
@PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -2,70 +2,52 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if [ x"$2" = xPOST-INSTALL ]; then
|
||||
echo "============================================================"
|
||||
if [ x"${DB_TYPE}" != "x" ]; then
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
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}/sympa/bin/create_db.${DB_TYPE}"
|
||||
echo " %%PREFIX%%/libexec/sympa/create_db.${DB_TYPE}"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
echo "To configure sympa interactively, please run:"
|
||||
echo " perl ${PKG_PREFIX}/sympa/bin/sympa_wizard.pl"
|
||||
echo " perl %%PREFIX%%/libexec/sympa/sympa_wizard.pl"
|
||||
echo ""
|
||||
|
||||
for conf in sympa.conf wwsympa.conf
|
||||
do [ ! -f ${PKG_PREFIX}/etc/${conf} ] \
|
||||
&& cp -p ${PKG_PREFIX}/etc/${conf}.sample ${PKG_PREFIX}/etc/${conf} \
|
||||
&& chmod u+w ${PKG_PREFIX}/etc/${conf}
|
||||
done
|
||||
|
||||
echo "You may also manually edit the two configuration files:"
|
||||
echo " ${PKG_PREFIX}/etc/sympa.conf"
|
||||
echo " ${PKG_PREFIX}/etc/wwsympa.conf"
|
||||
echo "============================================================"
|
||||
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 " DocumentRoot \"%%DATADIR%%\""
|
||||
echo " AddDefaultCharset UTF-8"
|
||||
echo " DirectoryIndex wws"
|
||||
echo " Options +Indexes"
|
||||
if [ x"${WITH_FASTCGI}" != x ]; then
|
||||
if [ x"${WITH_FASTCGI}" != x ]; then
|
||||
echo " LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so"
|
||||
echo " <Location /wws>"
|
||||
echo " SetHandler fastcgi-script"
|
||||
echo " </Location>"
|
||||
fi
|
||||
echo " <Directory \"${PKG_PREFIX}/sympa\">"
|
||||
fi
|
||||
echo " <Directory \"%%DATADIR%%\">"
|
||||
echo " Allow from all"
|
||||
echo " </Directory>"
|
||||
echo " ScriptAlias /wws ${PKG_PREFIX}/sympa/bin/wwsympa-wrapper"
|
||||
echo "============================================================"
|
||||
echo " ScriptAlias /wws %%PREFIX%%/libexec/sympa/wwsympa-wrapper"
|
||||
echo "======================================================"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ x"$2" != xPRE-INSTALL ]; then
|
||||
;;
|
||||
PRE-INSTALL)
|
||||
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
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,20 +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
|
1164
mail/sympa/pkg-plist
1164
mail/sympa/pkg-plist
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user