diff options
author | garga <garga@FreeBSD.org> | 2007-02-19 02:36:49 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2007-02-19 02:36:49 +0800 |
commit | 86ce6715dc3f2aefb12a1d67eb6cf24df335fefa (patch) | |
tree | 0afa95d82a64895c1a4c2eeac3bd33d9b3823905 /security | |
parent | 2da32fee626669022d30a83faabf597d526326cb (diff) | |
download | freebsd-ports-gnome-86ce6715dc3f2aefb12a1d67eb6cf24df335fefa.tar.gz freebsd-ports-gnome-86ce6715dc3f2aefb12a1d67eb6cf24df335fefa.tar.zst freebsd-ports-gnome-86ce6715dc3f2aefb12a1d67eb6cf24df335fefa.zip |
- Update to 20070218
- Make all cleanups and changes i made on security/clamav port
- Add CURL and LDAP OPTION
Diffstat (limited to 'security')
-rw-r--r-- | security/clamav-devel/Makefile | 100 | ||||
-rw-r--r-- | security/clamav-devel/distinfo | 6 | ||||
-rw-r--r-- | security/clamav-devel/files/patch-clamd_session.c | 13 | ||||
-rw-r--r-- | security/clamav-devel/files/patch-configure | 20 | ||||
-rw-r--r-- | security/clamav-devel/files/pkg-deinstall.in | 15 | ||||
-rw-r--r-- | security/clamav-devel/files/pkg-install.in | 59 |
6 files changed, 88 insertions, 125 deletions
diff --git a/security/clamav-devel/Makefile b/security/clamav-devel/Makefile index 04cfd1e260e8..f57f011cf0e7 100644 --- a/security/clamav-devel/Makefile +++ b/security/clamav-devel/Makefile @@ -6,7 +6,7 @@ # PORTNAME= clamav -PORTVERSION= 20061217 +PORTVERSION= 20070218 CATEGORIES= security MASTER_SITES= http://www.clamav.net/snapshot/ \ ${MASTER_SITE_LOCAL} @@ -20,12 +20,12 @@ COMMENT= Command line virus scanner written entirely in C LIB_DEPENDS= gmp.7:${PORTSDIR}/math/libgmp4 RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \ arj:${PORTSDIR}/archivers/arj \ - unrar:${PORTSDIR}/archivers/unrar \ unzoo:${PORTSDIR}/archivers/unzoo \ - arc:${PORTSDIR}/archivers/arc \ - unzip:${PORTSDIR}/archivers/unzip + arc:${PORTSDIR}/archivers/arc OPTIONS= MILTER "Compile the milter interface" Off \ + LDAP "libmilter was built with LDAP" Off \ + CURL "Support URL downloading" Off \ STDERR "Print logs to stderr instead of stdout" Off USE_AUTOTOOLS= libtool:15 @@ -33,13 +33,15 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} USE_LDCONFIG= yes USE_RC_SUBR= clamav-clamd clamav-freshclam -PORTDOCS= NEWS ChangeLog html +PORTDOCS= * DBDIR= /var/db/clamav LOGDIR= /var/log/clamav RUNDIR= /var/run/clamav PLIST_SUB+= DBDIR=${DBDIR} LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \ + LDFLAGS="${LDFLAGS}" CONFIGURE_ARGS= --with-dbdir=${DBDIR} \ --with-zlib=/usr \ --mandir=${MANPREFIX}/man \ @@ -50,30 +52,33 @@ CONFIGURE_ARGS= --with-dbdir=${DBDIR} \ --disable-gethostbyname_r \ --enable-readdir_r \ --disable-dependency-tracking \ - --enable-experimental \ - --without-libcurl + --enable-experimental CPPFLAGS+= -I${LOCALBASE}/include \ -I../libclamav \ ${PTHREAD_CFLAGS} LDFLAGS+= -L${LOCALBASE}/lib \ ${PTHREAD_LIBS} -CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" - -MAN1= clamscan.1 freshclam.1 sigtool.1 clamdscan.1 -MAN5= clamd.conf.5 freshclam.conf.5 -MAN8= clamd.8 clamav-milter.8 +MAN1= clamconf.1 \ + clamscan.1 \ + freshclam.1 \ + sigtool.1 \ + clamdscan.1 +MAN5= clamd.conf.5 \ + freshclam.conf.5 +MAN8= clamd.8 \ + clamav-milter.8 CONFLICTS= clamav-0.[0-9]* CLAMAVUSER?= clamav CLAMAVGROUP?= clamav + CLAMAV_CLAMD_SOCKET?= ${RUNDIR}/clamd CLAMAV_MILTER_SOCKET?= ${RUNDIR}/clmilter.sock SUB_FILES= pkg-install pkg-deinstall -SUB_LIST= DBDIR=${DBDIR} \ +SUB_LIST+= DBDIR=${DBDIR} \ LOGDIR=${LOGDIR} \ RUNDIR=${RUNDIR} \ CLAMAVUSER=${CLAMAVUSER} \ @@ -86,12 +91,12 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \ -e 's|^\#?(PidFile) .*/([a-z]+\.pid)$$|\1 ${RUNDIR}/\2|' \ -e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \ -e 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' \ - -e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \ - -e 's|^\#?(ScanMail)$$|\1|' \ - -e 's|^\#?(NotifyClamd)$$|\1|' \ + -e 's|^\#?(AllowSupplementaryGroups).*$$|\1 yes|' \ + -e 's|^\#?(ScanMail).*$$|\1 yes|' \ -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DBDIR}|' \ -e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \ - -e 's|^\#?(FixStaleSocket)$$|\1|' + -e 's|^\#?(FixStaleSocket).*$$|\1 yes|' \ + -e 's|^\#?(NotifyClamd) .*$$|\1 ${PREFIX}/etc/clamd.conf|' PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \ CLAMAVGROUP=${CLAMAVGROUP} @@ -104,16 +109,16 @@ PTHREAD_LIBS= -pthread .if defined(WITH_MILTER) USE_RC_SUBR+= clamav-milter -. if !defined(WITHOUT_LDAP) && exists(${LOCALBASE}/lib/libldap.so) +. if defined(WITH_LDAP) && exists(${LOCALBASE}/lib/libldap.so) USE_OPENLDAP= yes LDFLAGS+= -lldap . endif -. if !exists(/usr/lib/libmilter.a) +. if !exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a) BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail -CONFIGURE_ENV+= SENDMAIL="${LOCALBASE}/sbin/sendmail" +CONFIGURE_ARGS+= --with-sendmail=${LOCALBASE}/sbin/sendmail . else -CONFIGURE_ENV+= SENDMAIL="/usr/sbin/sendmail" +CONFIGURE_ARGS+= --with-sendmail=/usr/sbin/sendmail . endif CONFIGURE_ARGS+= --enable-milter @@ -122,48 +127,41 @@ PLIST_SUB+= CLAMAV-MILTER="" PLIST_SUB+= CLAMAV-MILTER="@comment " .endif +.if defined(WITH_CURL) +LIB_DEPENDS+= curl.4:${PORTSDIR}/ftp/curl +CONFIGURE_ARGS+= --with-libcurl +.else +CONFIGURE_ARGS+= --without-libcurl +.endif + .if defined(WITH_STDERR) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c .endif post-patch: - @${REINPLACE_CMD} -e 's,$$(libdir)/pkgconfig,$$(prefix)/libdata/pkgconfig,' \ - ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -e 's|-pthread -lc_r|${PTHREAD_LIBS}|g' \ - ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} - @${REINPLACE_CMD} -e 's,unarj,arj,g' \ - ${WRKSRC}/docs/man/clamscan.1 - -pre-build: - @if ${LDCONFIG} -r | ${GREP} -qw -e -lclamav; then \ - ${ECHO_MSG} "===> *** WARNING ***"; \ - ${ECHO_MSG} " Installed version of libclamav found."; \ - ${ECHO_MSG} " This might cause build problems."; \ - fi - -post-build: - @${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamd.conf - @${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf + ${WRKSRC}/${CONFIGURE_SCRIPT} + @${REINPLACE_CMD} -E 's,^(pkgconfigdir = ).*$$,\1$$(prefix)/libdata/pkgconfig,g' \ + ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \ + ${WRKSRC}/libclamav/unrar/unrar.c + @${REINPLACE_CMD} ${SED_CONF} \ + ${WRKSRC}/etc/clamd.conf \ + ${WRKSRC}/etc/freshclam.conf pre-install: - @${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \ - ${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: - @${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DBDIR} .for c in clamd freshclam - @[ -f ${DESTDIR}${PREFIX}/etc/${c}.conf ] || \ - ${CP} ${DESTDIR}${PREFIX}/etc/${c}.conf.default ${DESTDIR}${PREFIX}/etc/${c}.conf + @[ -f ${PREFIX}/etc/${c}.conf ] || \ + ${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf .endfor .if !defined(NOPORTDOCS) - @${MKDIR} ${DESTDIR}${DOCSDIR} - @${INSTALL_DATA} ${INSTALL_WRKSRC}/NEWS ${INSTALL_WRKSRC}/ChangeLog \ - ${DESTDIR}${DOCSDIR} - @${MKDIR} ${DESTDIR}${DOCSDIR}/html - @${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/html/*.* \ - ${DESTDIR}${DOCSDIR}/html + @${MKDIR} ${DOCSDIR}/html + @${INSTALL_DATA} ${WRKSRC}/NEWS ${WRKSRC}/ChangeLog ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/docs/html/* ${DOCSDIR}/html .endif - @${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \ - ${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.post.mk> diff --git a/security/clamav-devel/distinfo b/security/clamav-devel/distinfo index 7b8d742a6277..7887bf42261c 100644 --- a/security/clamav-devel/distinfo +++ b/security/clamav-devel/distinfo @@ -1,3 +1,3 @@ -MD5 (clamav-devel-20061217.tar.gz) = 7171394c1050f9877bb408ad62d021b7 -SHA256 (clamav-devel-20061217.tar.gz) = 3ef79b81d6d9c1699c7d980b359af8e6877ceceed1a5568f76960eb1fb7a5b49 -SIZE (clamav-devel-20061217.tar.gz) = 2594174 +MD5 (clamav-devel-20070218.tar.gz) = 103f1a6bab720e33f47d8663ae5ee1fe +SHA256 (clamav-devel-20070218.tar.gz) = 1a3594835e0491bb37b9e9ee08591d6e9b4761db9feffcc9e6567997b705f1f7 +SIZE (clamav-devel-20070218.tar.gz) = 6144195 diff --git a/security/clamav-devel/files/patch-clamd_session.c b/security/clamav-devel/files/patch-clamd_session.c deleted file mode 100644 index 3cbe01db6bb5..000000000000 --- a/security/clamav-devel/files/patch-clamd_session.c +++ /dev/null @@ -1,13 +0,0 @@ ---- clamd/session.c.orig Wed Sep 13 19:13:20 2006 -+++ clamd/session.c Tue Sep 26 09:42:41 2006 -@@ -42,6 +42,10 @@ - #include <signal.h> - #include <errno.h> - #include <stddef.h> -+#if (defined(__FreeBSD__) && __FreeBSD_version >= 600000) -+#include <sys/limits.h> -+#endif -+#include <sys/syslimits.h> - - #include "libclamav/clamav.h" - #include "libclamav/str.h" diff --git a/security/clamav-devel/files/patch-configure b/security/clamav-devel/files/patch-configure index 2ac2e4dfeb61..96f1b1ce1785 100644 --- a/security/clamav-devel/files/patch-configure +++ b/security/clamav-devel/files/patch-configure @@ -1,25 +1,5 @@ --- configure.orig Thu Jun 23 23:12:00 2005 +++ configure Tue Jun 28 20:53:10 2005 -@@ -10914,6 +10914,9 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <sys/types.h> -+#include <netinet/in.h> -+#include <arpa/nameser.h> - #include <resolv.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -10957,6 +10960,9 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <sys/types.h> -+#include <netinet/in.h> -+#include <arpa/nameser.h> - #include <resolv.h> - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -11195,19 +11201,25 @@ sendmailver_c=`echo $sendmailver | awk -F. '{printf $3}'` diff --git a/security/clamav-devel/files/pkg-deinstall.in b/security/clamav-devel/files/pkg-deinstall.in index 207212015296..ee619bc86abb 100644 --- a/security/clamav-devel/files/pkg-deinstall.in +++ b/security/clamav-devel/files/pkg-deinstall.in @@ -7,7 +7,20 @@ fi CLAMAVUSER=%%CLAMAVUSER%% +echo +echo "====================================================" +echo +echo "If you want remove clamav permanently from you system" +echo "execute following commands:" +echo +echo " # rm -rf %%LOGDIR%%" +echo " # rm -rf %%RUNDIR%%" +echo " # rm -rf %%DBDIR%%" if pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then - echo "To delete ${CLAMAVUSER} user permanently, use 'pw userdel \"${CLAMAVUSER}\"'" + echo " # pw userdel ${CLAMAVUSER}" fi +echo +echo "====================================================" +echo + exit 0 diff --git a/security/clamav-devel/files/pkg-install.in b/security/clamav-devel/files/pkg-install.in index 91ec86b6b17b..d2225f6ad301 100644 --- a/security/clamav-devel/files/pkg-install.in +++ b/security/clamav-devel/files/pkg-install.in @@ -2,69 +2,54 @@ # $FreeBSD$ PREFIX=${PKG_PREFIX:-%%PREFIX%%} -DESTDIR=${PKG_DESTDIR:-} CLAMAVUSER=%%CLAMAVUSER%% CLAMAVGROUP=%%CLAMAVGROUP%% UID=106 GID=$UID -DBDIR=$DESTDIR%%DBDIR%% -LOGDIR=$DESTDIR%%LOGDIR%% -RUNDIR=$DESTDIR%%RUNDIR%% +DBDIR=%%DBDIR%% +LOGDIR=%%LOGDIR%% +RUNDIR=%%RUNDIR%% + +PW="pw" +CHOWN="chown" +MKDIR="mkdir -p" if [ "$2" = "PRE-INSTALL" ]; then - if ! pw groupshow "$CLAMAVGROUP" 2>/dev/null 1>&2; then - if pw groupadd $CLAMAVGROUP -g $GID; then - echo "=> Added group \"$CLAMAVGROUP\"." + if ! ${PW} groupshow ${CLAMAVGROUP} 2>/dev/null 1>&2; then + if ${PW} groupadd ${CLAMAVGROUP} -g $GID; then + echo "=> Added group \"${CLAMAVGROUP}\"." else - echo "=> Adding group \"$CLAMAVGROUP\" failed..." + echo "=> Adding group \"${CLAMAVGROUP}\" failed..." exit 1 fi fi - if ! pw usershow "$CLAMAVUSER" 2>/dev/null 1>&2; then - if pw useradd $CLAMAVUSER -u $UID -g $CLAMAVGROUP -h - \ + if ! ${PW} usershow ${CLAMAVUSER} 2>/dev/null 1>&2; then + if ${PW} useradd ${CLAMAVUSER} -u $UID -g ${CLAMAVGROUP} -h - \ -s "/sbin/nologin" -d "/nonexistent" \ -c "Clam Antivirus"; \ then - pw groupmod mail -m $CLAMAVUSER - echo "=> Added user \"$CLAMAVUSER\"." + ${PW} groupmod mail -m ${CLAMAVUSER} + echo "=> Added user \"${CLAMAVUSER}\"." else - echo "=> Adding user \"$CLAMAVUSER\" failed..." + echo "=> Adding user \"${CLAMAVUSER}\" failed..." exit 1 fi fi elif [ "$2" = "POST-INSTALL" ]; then - if [ ! -d "$DBDIR" ]; then - mkdir -p "$DBDIR" || exit 1 - chown "$CLAMAVUSER:$CLAMAVGROUP" "$DBDIR" || exit 1 - fi - - if [ ! -d "$LOGDIR" ]; then - mkdir -p "$LOGDIR" || exit 1 - chown "$CLAMAVUSER:$CLAMAVGROUP" "$LOGDIR" || exit 1 - fi + [ ! -d "${DBDIR}" ] && (${MKDIR} ${DBDIR} || exit 1) + ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DBDIR} || exit 1 - if [ ! -d "$RUNDIR" ]; then - mkdir -p "$RUNDIR" || exit 1 - chown "$CLAMAVUSER:$CLAMAVGROUP" "$RUNDIR" || exit 1 - fi + [ ! -d "${LOGDIR}" ] && (${MKDIR} ${LOGDIR} || exit 1) + ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${LOGDIR} || exit 1 - if [ -f "$DESTDIR$PREFIX/etc/clamav.conf" ]; then - echo - echo "**************** WARNING ****************" - echo "* *" - echo "* The configuration file has changed: *" - echo "* Please edit $PREFIX/etc/clamd.conf *" - echo "* and remove $PREFIX/etc/clamav.conf *" - echo "* *" - echo "**************** WARNING ****************" - echo - fi + [ ! -d "${RUNDIR}" ] && (${MKDIR} ${RUNDIR} || exit 1) + ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${RUNDIR} || exit 1 fi |