Date: Mon, 25 Aug 2014 19:49:17 +0000 (UTC) From: John Marino <marino@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r366141 - in head/www/sams2: . files Message-ID: <201408251949.s7PJnHSU096790@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marino Date: Mon Aug 25 19:49:16 2014 New Revision: 366141 URL: http://svnweb.freebsd.org/changeset/ports/366141 QAT: https://qat.redports.org/buildarchive/r366141/ Log: www/sams2: Fix some issues, especially apache22 There were a number of issues with the first version of sams2. The pkg-plist still had a bad "make makeplist" variable ("24" was wrongly converted to %%APACHE_VERSION%%). There was also a typo on a PLIST substitution but this has been completely removed. This port was converted to options, particularly the APACHE option was added as a non-default option. If selected, it will require the default version of Apache as a dependency and install sample apache conf files. Previously the port would scan the whole system and install conf files in different locations depending on what it found. Now the conf file creation is carefully controlled. Discussed with maintainer. Added: head/www/sams2/files/patch-Makefile.am (contents, props changed) Modified: head/www/sams2/Makefile head/www/sams2/pkg-plist Modified: head/www/sams2/Makefile ============================================================================== --- head/www/sams2/Makefile Mon Aug 25 19:46:04 2014 (r366140) +++ head/www/sams2/Makefile Mon Aug 25 19:49:16 2014 (r366141) @@ -2,6 +2,7 @@ PORTNAME= sams2 DISTVERSION= 2.0.0 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://sams.perm.ru/download/ http://razumit.ru/ @@ -16,7 +17,6 @@ RUN_DEPENDS= ${LOCALBASE}/libexec/mysqld USES= gmake libtool tar:bzip2 USE_AUTOTOOLS= aclocal libtoolize USE_LDCONFIG= yes -USE_APACHE= 22+ USE_PHP= gd mysql zlib USE_MYSQL= yes @@ -28,19 +28,23 @@ MAKE_ARGS+= docdir=${DOCSDIR} SUB_FILES= sams2.conf.sample PORTDOCS= * +OPTIONS_DEFINE= DOCS APACHE +OPTIONS_SUB= APACHE +APACHE_USE= APACHE=22+ + +# We can't use <options> here, ${APACHE*} won't be populated .include <bsd.port.pre.mk> -.if ${PHP_VER} == "54" && (${APACHE_VERSION} >= 24) +.if ${PORT_OPTIONS:MAPACHE} +. if ${PHP_VER} == "54" && (${APACHE_VERSION} >= 24) RUN_DEPENDS+= mod_php5>=0:${PORTSDIR}/www/mod_php5 -.endif -.if ${PHP_VER} == "55" && (${APACHE_VERSION} >= 24) +. endif +. if ${PHP_VER} == "55" && (${APACHE_VERSION} >= 24) RUN_DEPENDS+= mod_php55>=0:${PORTSDIR}/www/mod_php55 -.endif - -.if ${APACHE_VERSION} >= 24 -PLIST_SUB+= AP24="" -.else -PLIST_SUB+= AP24="@ comment" +. endif +. if ${APACHE_VERSION} >= 24 +AP24= "" +. endif .endif do-configure: @@ -51,11 +55,12 @@ do-configure: post-install: ${INSTALL_SCRIPT} ${FILESDIR}/sams2 ${STAGEDIR}${PREFIX}/etc/rc.d/ ${INSTALL_DATA} ${WRKDIR}/sams2.conf.sample ${STAGEDIR}${PREFIX}/etc -.if ${APACHE_VERSION} >= 24 - ${RM} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/*.conf-e - (cd ${STAGEDIR}${PREFIX}/${APACHEETCDIR} && \ - ${MV} doc4sams2.conf doc4sams2.conf.sample && \ - ${MV} sams2.conf sams2.conf.sample) +.if ${PORT_OPTIONS:MAPACHE} + ${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR} + ${SED} -e 's|__WEBPREFIX|${WWWDIR}|g' ${WRKSRC}/etc/httpd_conf \ + > ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/sams2.conf.sample + ${SED} -e 's|__DOCPREFIX|${DOCSDIR}|g' ${WRKSRC}/etc/doc_sams2_conf \ + > ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/doc4sams2.conf.sample .endif .include <bsd.port.post.mk> Added: head/www/sams2/files/patch-Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/sams2/files/patch-Makefile.am Mon Aug 25 19:49:16 2014 (r366141) @@ -0,0 +1,17 @@ +--- Makefile.am.orig 2010-11-23 20:18:04 UTC ++++ Makefile.am +@@ -19,14 +19,6 @@ install-data-local: + if [ ! -f $(DESTDIR)/$(sysconfdir)/sams2.conf ] ; then \ + $(install_sh) -c -m 644 $(top_srcdir)/etc/sams2.conf $(DESTDIR)/$(sysconfdir) ;\ + fi +- if [ ! -f $(DESTDIR)/$(HTTPD_INCLUDE)/sams2.conf ] ; then \ +- $(install_sh) -c -m 644 $(top_srcdir)/etc/httpd_conf $(DESTDIR)/$(HTTPD_INCLUDE)/sams2.conf ;\ +- sed -i -e 's,__WEBPREFIX,$(datadir)/sams2,g' $(DESTDIR)/$(HTTPD_INCLUDE)/sams2.conf ;\ +- fi +- if [ ! -f $(DESTDIR)/$(HTTPD_INCLUDE)/doc4sams2.conf ] ; then \ +- $(install_sh) -c -m 644 $(top_srcdir)/etc/doc_sams2_conf $(DESTDIR)/$(HTTPD_INCLUDE)/doc4sams2.conf ;\ +- sed -i -e 's,__DOCPREFIX,$(docdir),g' $(DESTDIR)/$(HTTPD_INCLUDE)/doc4sams2.conf ;\ +- fi + + + uninstall-local: Modified: head/www/sams2/pkg-plist ============================================================================== --- head/www/sams2/pkg-plist Mon Aug 25 19:46:04 2014 (r366140) +++ head/www/sams2/pkg-plist Mon Aug 25 19:49:16 2014 (r366141) @@ -2,8 +2,8 @@ bin/sams2daemon bin/sams2redir bin/sams_send_email bin/samsparser -%%AP24%%@sample %%APACHEETCDIR%%/doc4sams2.conf.sample -%%AP24%%@sample %%APACHEETCDIR%%/sams2.conf.sample +%%APACHE%%@sample %%APACHEETCDIR%%/doc4sams2.conf.sample +%%APACHE%%@sample %%APACHEETCDIR%%/sams2.conf.sample etc/rc.d/sams2 @sample etc/sams2.conf.sample lib/sams2/libfsusage.a @@ -219,7 +219,7 @@ lib/sams2/libloadavg.so.1 %%WWWDIR%%/icon/classic/switchuser_32.jpg %%WWWDIR%%/icon/classic/switchuser_48.jpg %%WWWDIR%%/icon/classic/sysplug_16.png -%%WWWDIR%%/icon/classic/sysplug_%%APACHE_VERSION%%.png +%%WWWDIR%%/icon/classic/sysplug_24.png %%WWWDIR%%/icon/classic/sysplug_32.png %%WWWDIR%%/icon/classic/sysplug_64.png %%WWWDIR%%/icon/classic/tr_input.gif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408251949.s7PJnHSU096790>