From owner-svn-ports-all@FreeBSD.ORG Fri Sep 27 21:53:45 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 665BB4CF; Fri, 27 Sep 2013 21:53:45 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 44BEC2D2F; Fri, 27 Sep 2013 21:53:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8RLrjJ6080232; Fri, 27 Sep 2013 21:53:45 GMT (envelope-from matthew@svn.freebsd.org) Received: (from matthew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RLriLA080229; Fri, 27 Sep 2013 21:53:44 GMT (envelope-from matthew@svn.freebsd.org) Message-Id: <201309272153.r8RLriLA080229@svn.freebsd.org> From: Matthew Seaman Date: Fri, 27 Sep 2013 21:53:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r328526 - in head/www/rt40: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 21:53:45 -0000 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 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