Date: Fri, 27 Sep 2013 21:53:44 +0000 (UTC) From: Matthew Seaman <matthew@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r328526 - in head/www/rt40: . files Message-ID: <201309272153.r8RLriLA080229@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: matthew Date: Fri Sep 27 21:53:44 2013 New Revision: 328526 URL: http://svnweb.freebsd.org/changeset/ports/328526 Log: - stageify - move post-install actions to pkg-install script Added: head/www/rt40/files/pkg-install.in (contents, props changed) Modified: head/www/rt40/Makefile head/www/rt40/pkg-plist Modified: head/www/rt40/Makefile ============================================================================== --- head/www/rt40/Makefile Fri Sep 27 21:17:26 2013 (r328525) +++ head/www/rt40/Makefile Fri Sep 27 21:53:44 2013 (r328526) @@ -11,6 +11,7 @@ COMMENT= RT is an industrial-grade ticke CONFLICTS= rt-3.8* brlcad-[0-9]* LATEST_LINK= rt40 +NEED_ROOT= yes # See doc/web_deployment.pod for info on the choices of webserver / # webapp combinations. Note: if using apache, apache-2.2+ is @@ -51,7 +52,6 @@ GROUPS?= rt BUILD_DEPENDS+= ${LOCALBASE}/bin/jsmin:${PORTSDIR}/devel/jsmin -NO_STAGE= yes .include "${.CURDIR}/Makefile.cpan" BUILD_DEPENDS+= ${CORE_DEPS} \ @@ -195,8 +195,9 @@ CONFIGURE_ARGS+= --enable-layout=${RT_LA CONFIGURE_ENV+= PERL=${LOCALBASE}/bin/perl PKGMESSAGE= ${WRKDIR}/pkg-message -SUB_FILES= pkg-message -SUB_LIST= RT_ETC_PATH=${RT_ETC_PATH} +SUB_FILES= pkg-message pkg-install +SUB_LIST= RT_ETC_PATH=${RT_ETC_PATH} \ + CFG_FILE=${RT_ETC_PATH}/RT_SiteConfig.pm run-autotools: run-autotools-autoconf @@ -229,12 +230,9 @@ pre-install: post-install: .if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR}/upgrade + ${MKDIR} ${STAGEDIR}${DOCSDIR}/upgrade (cd ${WRKSRC}/etc && \ - ${COPYTREE_SHARE} upgrade ${DOCSDIR} "! -name *\.in") + ${COPYTREE_SHARE} upgrade ${STAGEDIR}${DOCSDIR} "! -name *\.in") .endif - @[ -f ${RT_ETC_PATH}/RT_SiteConfig.pm ] || \ - ${CP} -p ${RT_ETC_PATH}/RT_SiteConfig.pm-dist ${RT_ETC_PATH}/RT_SiteConfig.pm - ${CAT} ${PKGMESSAGE} .include <bsd.port.mk> Added: head/www/rt40/files/pkg-install.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/rt40/files/pkg-install.in Fri Sep 27 21:53:44 2013 (r328526) @@ -0,0 +1,20 @@ +#!/bin/sh +# +# $FreeBSD$ + +PATH=/usr/sbin:/usr/bin:/bin ; export PATH + +case $2 in + + POST-INSTALL) + + # Install a default config file if none exists + if [ ! -f ${CFG_FILE} ] ; then + cp -p ${CFG_FILE}-dist ${CFG_FILE} + fi + ;; +esac + +# +# That's All Folks! +# Modified: head/www/rt40/pkg-plist ============================================================================== --- head/www/rt40/pkg-plist Fri Sep 27 21:17:26 2013 (r328525) +++ head/www/rt40/pkg-plist Fri Sep 27 21:53:44 2013 (r328526) @@ -2,9 +2,7 @@ bin/rt bin/rt-crontool bin/rt-mailgate etc/rt40/RT_Config.pm -@unexec if cmp -s %D/etc/rt40/RT_SiteConfig.pm %D/etc/rt40/RT_SiteConfig.pm-dist; then rm -f %D/etc/rt40/RT_SiteConfig.pm; fi etc/rt40/RT_SiteConfig.pm-dist -@exec [ -f %B/RT_SiteConfig.pm ] || cp -p %B/%f %B/RT_SiteConfig.pm etc/rt40/acl.Oracle etc/rt40/acl.Pg etc/rt40/acl.mysql
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309272153.r8RLriLA080229>