From owner-freebsd-ports@FreeBSD.ORG Tue May 27 04:13:34 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C2BCE8B; Tue, 27 May 2014 04:13:34 +0000 (UTC) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD76A2A63; Tue, 27 May 2014 04:13:33 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id s4R4DM4o073974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 26 May 2014 21:13:22 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.14.2/Submit) with UUCP id s4R4DMQf073973; Mon, 26 May 2014 21:13:22 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: from fbsd81 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA03185; Mon, 26 May 14 20:37:20 PDT Date: Mon, 26 May 2014 20:37:13 -0700 From: perryh@pluto.rain.com (Perry Hutchison) To: udvzsolt@gmail.com, marino@freebsd.org Subject: Re: Is staging a port really this simple? Message-Id: <53840869.xP0jQy92GIgSbFZy%perryh@pluto.rain.com> References: <524CE820.5060003@missouri.edu> <20131003061511.GF85314@ithaqua.etoilebsd.net> <538179d9.ERL3ZKEnk4pQKKib%perryh@pluto.rain.com> <538197E3.1070609@marino.st> In-Reply-To: <538197E3.1070609@marino.st> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: bapt@freebsd.org, freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 04:13:34 -0000 John Marino wrote: > You didn't miss much -- except adding the man page to the > pkg-plist and removing the MAN* definitions from the makefile. ... > On 5/25/2014 09:09, Zsolt Udvari wrote: > > Your condition is unneeded. > > You don't need check the existence of > > ${STAGEDIR}${PREFIX}/etc/distcheckd.conf because you'll copy it, the > > ${STAGEDIR} are empty!!!! > > no, the @sample keyword in pkg-plist does that (replacing other lines > there). pkg doesn't do this by itself, it needs to be told. So, like this? (diffs against the originals, not the previous iteration) [and I don't follow how, or if, @sample should be used in diskcheckd since it delivers the sample named as such, and also installs it as the live config file if the live config file does not already exist] --- misc/gtkfind/Makefile +++ misc/gtkfind/Makefile-staged @@ -18,15 +18,13 @@ USE_GNOME= gtk12 GNU_CONFIGURE= yes -MAN1= gtkfind.1 -PLIST_FILES= bin/gtkfind +PLIST_FILES= bin/gtkfind man/man1/gtkfind.1 -NO_STAGE= yes post-patch: ${REINPLACE_CMD} -e "s,-O2,${CFLAGS}," ${WRKSRC}/configure ${WRKSRC}/Makefile.in do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/gtkfind ${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/gtkfind.1 ${MANPREFIX}/man/man1 + ${INSTALL_PROGRAM} ${WRKSRC}/gtkfind ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/gtkfind.1 ${STAGEDIR}${MANPREFIX}/man/man1 .include --- sysutils/diskcheckd/Makefile +++ sysutils/diskcheckd/Makefile-staged @@ -11,15 +11,13 @@ MAINTAINER= perryh@pluto.rain.com COMMENT= Daemon to check for disk read errors -MAN8= diskcheckd.8 MLINKS= diskcheckd.8 diskcheckd.conf.5 USE_RC_SUBR= diskcheckd CFLAGS+= -D_PATH_CONF='\"${PREFIX}/etc/diskcheckd.conf\"' MAKEFILE= /usr/share/mk/bsd.prog.mk -MAKE_ARGS= PROG=diskcheckd MAN8=${MAN8} +MAKE_ARGS= PROG=diskcheckd MAN8=diskcheckd.8 -NO_STAGE= yes do-extract: @${MKDIR} ${WRKSRC} .for f in diskcheckd.c diskcheckd.8 @@ -30,13 +28,13 @@ @${REINPLACE_CMD} -e 's|/usr/local/etc/diskcheckd.conf|${PREFIX}/etc/diskcheckd.conf|g' ${WRKSRC}/diskcheckd.8 do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/diskcheckd ${PREFIX}/sbin - ${INSTALL_DATA} ${FILESDIR}/diskcheckd.conf ${PREFIX}/etc/diskcheckd.conf.sample - ${INSTALL_MAN} ${WRKSRC}/diskcheckd.8 ${MAN8PREFIX}/man/man8 + ${INSTALL_PROGRAM} ${WRKSRC}/diskcheckd ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_DATA} ${FILESDIR}/diskcheckd.conf \ + ${STAGEDIR}${PREFIX}/etc/diskcheckd.conf.sample + ${INSTALL_MAN} ${WRKSRC}/diskcheckd.8 ${STAGEDIR}${MAN8PREFIX}/man/man8 post-install: - @[ -f ${PREFIX}/etc/diskcheckd.conf ] \ - || ${CP} -p ${PREFIX}/etc/diskcheckd.conf.sample \ - ${PREFIX}/etc/diskcheckd.conf + @${CP} -p ${STAGEDIR}${PREFIX}/etc/diskcheckd.conf.sample \ + ${STAGEDIR}${PREFIX}/etc/diskcheckd.conf .include --- sysutils/diskcheckd/pkg-plist +++ sysutils/diskcheckd/pkg-plist-staged @@ -1,4 +1,6 @@ sbin/diskcheckd +man/man8/diskcheckd.8 +man/man5/diskcheckd.conf.5 @unexec if cmp -s %D/etc/diskcheckd.conf.sample %D/etc/diskcheckd.conf; then rm -f %D/etc/diskcheckd.conf; fi etc/diskcheckd.conf.sample @exec if [ ! -f %D/etc/diskcheckd.conf ]; then cp %D/%F %B/diskcheckd.conf; fi