Date: Mon, 26 May 2014 20:37:13 -0700 From: perryh@pluto.rain.com (Perry Hutchison) To: udvzsolt@gmail.com, marino@freebsd.org Cc: bapt@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Is staging a port really this simple? Message-ID: <53840869.xP0jQy92GIgSbFZy%perryh@pluto.rain.com> In-Reply-To: <538197E3.1070609@marino.st> References: <524CE820.5060003@missouri.edu> <20131003061511.GF85314@ithaqua.etoilebsd.net> <538179d9.ERL3ZKEnk4pQKKib%perryh@pluto.rain.com> <CADtCJqoTpSB0E9uN8Y6CkZm_8wjU0b5Pc50vT=pB-bHjZmGpeQ@mail.gmail.com> <538197E3.1070609@marino.st>
next in thread | previous in thread | raw e-mail | index | archive | help
John Marino <freebsd.contact@marino.st> 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 <bsd.port.mk> --- 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 <bsd.port.mk> --- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53840869.xP0jQy92GIgSbFZy%perryh>