diff -ruN free-sa-devel.orig/Makefile free-sa-devel/Makefile --- free-sa-devel.orig/Makefile 2013-09-21 03:36:50.000000000 +0400 +++ free-sa-devel/Makefile 2013-11-18 14:08:18.000000000 +0400 @@ -2,12 +2,11 @@ # $FreeBSD: www/free-sa-devel/Makefile 327776 2013-09-20 23:36:50Z bapt $ PORTNAME= free-sa -PORTVERSION= 2.0.0b5.10 +PORTVERSION= 2.0.0b6 CATEGORIES= www MASTER_SITES= SF -MASTER_SITE_SUBDIR= free-sa/free-sa-dev/2.0.0b5p10/ +MASTER_SITE_SUBDIR= free-sa/free-sa-dev/${PORTVERSION} PKGNAMESUFFIX= -devel -DISTNAME= free-sa-2.0.0b5p10 MAINTAINER= moiseev@mezonplus.ru COMMENT= Statistic analyzer for daemons log files similar to SARG @@ -20,10 +19,10 @@ WWWDIR?= ${PREFIX}/www/${PORTNAME} DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${DISTVERSION} +SUB_FILES= pkg-deinstall +SUB_LIST= CACHEDIR="/var/cache/${PORTNAME}" + USE_CSTD= gnu89 -PORTDOCS= COPYING ChangeLog FAQ INSTALL README README.DEV THANKS -MAN1= free-sa.1 -MAN5= free-sa.conf.5 MAKE_ARGS+= PREFIX="${PREFIX}" \ ETCDIR="${ETCDIR}" \ @@ -38,34 +37,35 @@ LARGEFILE=yes \ SATSEP="'" \ HAVE_STRL="1" \ - ADDLDFLAGS="${LDFLAGS} -mrelax" \ - MANDIR="${MANPREFIX}/man" + MANDIR="${MANPREFIX}/man" \ + STAGEDIR="${STAGEDIR}" -OPTIONS_DEFINE= OPTIMIZED_CFLAGS SA_DEBUG +OPTIONS_DEFINE= OPTIMIZED_CFLAGS SA_DEBUG OPTIMIZED_CFLAGS_DESC= Build with distribution-recommended CFLAGS SA_DEBUG_DESC= Enable Free-SA debugging (level 1) -NO_STAGE= yes .include pre-everything:: .if empty(PORT_OPTIONS:MOPTIMIZED_CFLAGS) - @${ECHO_MSG} ">>> This software is computationally demanding, and users are" - @${ECHO_MSG} ">>> advised to employ compiler optimizations when building it." - @${ECHO_MSG} ">>> Author of this software have used such flags as" - @${ECHO_MSG} ">>> 'CFLAGS= -O4 -pipe -march=native' and 'CC= gcc' to advantage." - @${ECHO_MSG} ">>> You can set them in make.conf, but they depends on your system and compiler." - @${ECHO_MSG} ">>> In addition, you can enable extra flags by defining WITH_OPTIMIZED_CFLAGS" - @${ECHO_MSG} ">>> For example, 'make WITH_OPTIMIZED_CFLAGS=yes'" - @${ECHO_MSG} ">>>" + @${ECHO_MSG} "=============================================================================" + @${ECHO_MSG} " This software is computationally demanding, and users are" + @${ECHO_MSG} " advised to employ compiler optimizations when building it." + @${ECHO_MSG} " Author of this software have used such flags as" + @${ECHO_MSG} " 'CFLAGS= -O4 -pipe -march=native' and 'CC= gcc' to advantage." + @${ECHO_MSG} " You can set them in make.conf, but they depends on your system and compiler." + @${ECHO_MSG} " In addition, you can enable extra flags by defining WITH_OPTIMIZED_CFLAGS" + @${ECHO_MSG} " For example, 'make WITH_OPTIMIZED_CFLAGS=yes'" + @${ECHO_MSG} "=============================================================================" .endif -.if empty(PORT_OPTIONS:MSA_DEBUG) && (SA_DEBUG_LEVEL) - @${ECHO_MSG} ">>> You can enable Free-SA debugging (level 1) by defining WITH_SA_DEBUG" - @${ECHO_MSG} ">>> For example, 'make WITH_SA_DEBUG=yes'" - @${ECHO_MSG} ">>> Or for specific level (0-7) you can use SA_DEBUG_LEVEL" - @${ECHO_MSG} ">>> For example, 'make SA_DEBUG_LEVEL=4'" - @${ECHO_MSG} ">>> Note that SA_DEBUG_LEVEL overrides WITH_SA_DEBUG" - @${ECHO_MSG} ">>>" +.if empty(PORT_OPTIONS:MSA_DEBUG) &! (SA_DEBUG_LEVEL) + @${ECHO_MSG} "=============================================================================" + @${ECHO_MSG} " You can enable Free-SA debugging (level 1) by defining WITH_SA_DEBUG" + @${ECHO_MSG} " For example, 'make WITH_SA_DEBUG=yes'" + @${ECHO_MSG} " Or for specific level (0-7) you can use SA_DEBUG_LEVEL" + @${ECHO_MSG} " For example, 'make SA_DEBUG_LEVEL=4'" + @${ECHO_MSG} " Note that SA_DEBUG_LEVEL overrides WITH_SA_DEBUG" + @${ECHO_MSG} "=============================================================================" .endif .if ${PORT_OPTIONS:MSA_DEBUG} @@ -74,15 +74,15 @@ SA_DEBUG_LEVEL?= 0 .endif -.if defined(NOPORTDOCS) -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Makefile -.endif - post-patch: - @${REINPLACE_CMD} \ + @cd ${WRKSRC} && \ + ${REINPLACE_CMD} \ -e 's,^DEBUG = .*,DEBUG = ${SA_DEBUG_LEVEL},' \ -e 's,^include .(GMKPATH)/configs/.(OSTYPE)\.mk,,' \ - ${WRKSRC}/global.mk + global.mk && \ + ${REINPLACE_CMD} -E \ + -e '/#define/!s,\$$\((PREFIX|WWWDIR|CACHEDIR|DOCDIR|ETCDIR|MANDIR|LOCDIR)\),$$(STAGEDIR)&,' \ + Makefile themes/Makefile src/Makefile etc/Makefile man/Makefile share/Makefile .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} MAKE_ARGS+= ADDCFLAGS="${CFLAGS} \ diff -ruN free-sa-devel.orig/distinfo free-sa-devel/distinfo --- free-sa-devel.orig/distinfo 2012-09-10 23:29:33.000000000 +0400 +++ free-sa-devel/distinfo 2013-11-15 10:13:53.000000000 +0400 @@ -1,2 +1,2 @@ -SHA256 (free-sa-2.0.0b5p10.tar.gz) = 12ba763ce38d64979c8cb378741f507a0d8acb5d3cdbb443d940716317c95bee -SIZE (free-sa-2.0.0b5p10.tar.gz) = 98991 +SHA256 (free-sa-2.0.0b6.tar.gz) = 8fc6015bae08bd7d87bf19d53a2a0b96cb803750533ce3c1a15eec1a6037f020 +SIZE (free-sa-2.0.0b6.tar.gz) = 105566 diff -ruN free-sa-devel.orig/files/extra-patch-Makefile free-sa-devel/files/extra-patch-Makefile --- free-sa-devel.orig/files/extra-patch-Makefile 2012-07-14 18:29:18.000000000 +0400 +++ free-sa-devel/files/extra-patch-Makefile 1970-01-01 03:00:00.000000000 +0300 @@ -1,13 +0,0 @@ ---- Makefile.orig 2009-07-23 16:08:46.000000000 +0400 -+++ Makefile 2009-07-23 16:12:00.000000000 +0400 -@@ -17,10 +17,6 @@ - $(MAKEDIRS) - @( \ - $(INSTALLODR) $(CACHEDIR); \ -- $(INSTALLDIR) $(DOCDIR); \ -- for IDOCFILE in COPYING ChangeLog FAQ INSTALL README README.DEV THANKS; do \ -- $(INSTALLFIL) $$IDOCFILE $(DOCDIR); \ -- done \ - ) - - src/config.h: global.mk diff -ruN free-sa-devel.orig/files/pkg-deinstall.in free-sa-devel/files/pkg-deinstall.in --- free-sa-devel.orig/files/pkg-deinstall.in 1970-01-01 03:00:00.000000000 +0300 +++ free-sa-devel/files/pkg-deinstall.in 2013-11-18 14:11:14.000000000 +0400 @@ -0,0 +1,20 @@ +#! /bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +echo +echo "======================================================================" +echo " If you are permanently removing Free-SA, you should manually delete:" +if [ -d %%ETCDIR%% ]; then + echo " - Free-SA configuration: rm -r %%ETCDIR%%" +fi +if [ -d %%WWWDIR%% ]; then + echo " - Free-SA www directory: rm -r %%WWWDIR%%" +fi +if [ -d %%CACHEDIR%% ]; then + echo " - Free-SA cache directory: rm -r %%CACHEDIR%%" +fi +echo "======================================================================" +echo diff -ruN free-sa-devel.orig/pkg-plist free-sa-devel/pkg-plist --- free-sa-devel.orig/pkg-plist 2012-07-14 18:29:18.000000000 +0400 +++ free-sa-devel/pkg-plist 2013-11-15 16:35:30.000000000 +0400 @@ -1,24 +1,32 @@ -@unexec /bin/rm -f %D/%%WWWDIR%%/themes/default bin/free-sa -%%ETCDIR%%/HTTP_CONNECT_method.filter.sample -%%ETCDIR%%/HTTP_PUT+POST_method.filter.sample -%%ETCDIR%%/HTTP_downloads.filter.sample -%%ETCDIR%%/HTTP_downloads_archives.filter.sample -%%ETCDIR%%/HTTP_downloads_audio.filter.sample -%%ETCDIR%%/HTTP_downloads_cddvd.filter.sample -%%ETCDIR%%/HTTP_downloads_code.filter.sample -%%ETCDIR%%/HTTP_downloads_office.filter.sample -%%ETCDIR%%/HTTP_downloads_video.filter.sample -%%ETCDIR%%/HTTP_proxy_auth_failures.filter.sample -%%ETCDIR%%/HTTP_proxy_denied.filter.sample -%%ETCDIR%%/HTTP_site_auth_failures.filter.sample -%%ETCDIR%%/HTTP_site_denied.filter.sample -%%ETCDIR%%/HTTP_unusual_codes.filter.sample -%%ETCDIR%%/HTTP_unusual_methods.filter.sample -%%ETCDIR%%/SMTP_delivery_rejected.filter.sample -%%ETCDIR%%/SMTP_receiving_rejected.filter.sample -%%ETCDIR%%/free-sa.conf.sample -%%ETCDIR%%/users.filter.sample +etc/free-sa/HTTP_CONNECT_method.filter.sample +etc/free-sa/HTTP_PUT+POST_method.filter.sample +etc/free-sa/HTTP_downloads.filter.sample +etc/free-sa/HTTP_downloads_archives.filter.sample +etc/free-sa/HTTP_downloads_audio.filter.sample +etc/free-sa/HTTP_downloads_cddvd.filter.sample +etc/free-sa/HTTP_downloads_code.filter.sample +etc/free-sa/HTTP_downloads_office.filter.sample +etc/free-sa/HTTP_downloads_video.filter.sample +etc/free-sa/HTTP_proxy_auth_failures.filter.sample +etc/free-sa/HTTP_proxy_denied.filter.sample +etc/free-sa/HTTP_site_auth_failures.filter.sample +etc/free-sa/HTTP_site_denied.filter.sample +etc/free-sa/HTTP_unusual_codes.filter.sample +etc/free-sa/HTTP_unusual_methods.filter.sample +etc/free-sa/SMTP_delivery_rejected.filter.sample +etc/free-sa/SMTP_receiving_rejected.filter.sample +etc/free-sa/free-sa.conf.sample +etc/free-sa/users.filter.sample +man/man1/free-sa.1.gz +man/man5/free-sa.conf.5.gz +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/FAQ +%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.DEV +%%PORTDOCS%%%%DOCSDIR%%/THANKS %%DATADIR%%/be.cp1251 %%DATADIR%%/cs.iso88592 %%DATADIR%%/de.iso88591 @@ -48,6 +56,7 @@ %%WWWDIR%%/themes/blues/lsa.css %%WWWDIR%%/themes/blues/rsa.css %%WWWDIR%%/themes/blues/s.png +%%WWWDIR%%/themes/default %%WWWDIR%%/themes/qbiq/c.png %%WWWDIR%%/themes/qbiq/d.png %%WWWDIR%%/themes/qbiq/g.png @@ -66,17 +75,17 @@ %%WWWDIR%%/themes/sarg/c.png %%WWWDIR%%/themes/sarg/d.png %%WWWDIR%%/themes/sarg/g.png -%%WWWDIR%%/themes/sarg/s.png %%WWWDIR%%/themes/sarg/gsa.css %%WWWDIR%%/themes/sarg/lsa.css %%WWWDIR%%/themes/sarg/rsa.css -%%WWWDIR%%/themes/silver/s.png +%%WWWDIR%%/themes/sarg/s.png %%WWWDIR%%/themes/silver/c.png %%WWWDIR%%/themes/silver/d.png %%WWWDIR%%/themes/silver/g.png %%WWWDIR%%/themes/silver/gsa.css %%WWWDIR%%/themes/silver/lsa.css %%WWWDIR%%/themes/silver/rsa.css +%%WWWDIR%%/themes/silver/s.png @dirrm %%WWWDIR%%/themes/silver @dirrm %%WWWDIR%%/themes/sarg @dirrm %%WWWDIR%%/themes/rbsec @@ -86,4 +95,5 @@ @dirrm %%WWWDIR%%/cgi-bin @dirrmtry %%WWWDIR%% @dirrm %%DATADIR%% -@dirrmtry %%ETCDIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrmtry etc/free-sa