@unexec equivalent in Makefile ?
Ion-Mihai Tetcu
itetcu at people.tecnik93.com
Wed Feb 16 10:48:20 PST 2005
On Wed, 16 Feb 2005 19:18:39 +0100
Michael Nottebrock <michaelnottebrock at gmx.net> wrote:
> On Wednesday, 16. February 2005 14:42, Ion-Mihai Tetcu wrote:
> > Hi,
> >
> >
> > I have a port that installs 8 files (3 of them being PORTDOCS), so I
> > rather not use a pkg-plist file.
>
> There's no prize to be won for saving one inode (and some people actually are
> getting rather agitated over missing pkg-plist files, too), so why not just
> use it.
Learning exercise, but I will use a the plist file in the end.
But maybe someone could explain this to me:
Makefile snip:
.......
PORTNAME?= sbl-server
_BIN_NAME= ${PORTNAME:S/-/_/}
........
PLIST_FILES= bin/${_BIN_NAME} etc/${_BIN_NAME}.conf.sample
PLIST_FILES+= "@unexec if cmp -s %D/etc/${_BIN_NAME}.conf %D/etc/${_BIN_NAME}.conf.sample; then rm -f %D/etc/${_BIN_NAME}.conf; fi"
PORTDOCS= CHANGE README RELEASE.NOTES
.......
# cat work/.PLIST.mktmp
bin/sbl_server
etc/sbl_server.conf.sample
@unexec if cmp -s %D/etc/sbl_server.conf %D/etc/sbl_server.conf.sample; then rm -f %D/etc/sbl_server.conf; fi
@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi
@unexec rmdir %D/info 2> /dev/null || true
share/doc/sbl-server/CHANGE
share/doc/sbl-server/README
share/doc/sbl-server/RELEASE.NOTES
@dirrm share/doc/sbl-server
@unexec rmdir %D 2> /dev/null || true
Q1: Why the info stuff ?
Q2: Why doesn't it remove etc/sbl_server.conf ?
Thanks,
--
IOnut
Unregistered ;) FreeBSD "user"
More information about the freebsd-ports
mailing list