aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2014-04-08 18:10:41 +0800
committerpawel <pawel@FreeBSD.org>2014-04-08 18:10:41 +0800
commita80d0be309a4dafd5d8137e1a8c58cda0c9c863b (patch)
tree4f6d179d71142846a7dc8066f6b9578c0ebe8a0d /audio
parentea53553bc8868df5bb580275367767bc450f8b9f (diff)
downloadfreebsd-ports-gnome-a80d0be309a4dafd5d8137e1a8c58cda0c9c863b.tar.gz
freebsd-ports-gnome-a80d0be309a4dafd5d8137e1a8c58cda0c9c863b.tar.zst
freebsd-ports-gnome-a80d0be309a4dafd5d8137e1a8c58cda0c9c863b.zip
- Add staging support
- Silence cmp execution in pkg-plist
Diffstat (limited to 'audio')
-rw-r--r--audio/rplay/Makefile31
-rw-r--r--audio/rplay/pkg-plist19
2 files changed, 29 insertions, 21 deletions
diff --git a/audio/rplay/Makefile b/audio/rplay/Makefile
index d31a1c25d9a2..5a7ea8355d80 100644
--- a/audio/rplay/Makefile
+++ b/audio/rplay/Makefile
@@ -13,15 +13,10 @@ COMMENT= Network audio player
LIB_DEPENDS= libgsm.so:${PORTSDIR}/audio/gsm
USE_LDCONFIG= yes
-NO_STAGE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib"
CPPFLAGS+= -I${LOCALBASE}/include
-MAN1= rplay.1 rptp.1
-MAN5= rplay.conf.5 rplay.helpers.5 rplay.hosts.5 rplay.servers.5
-MAN8= rplayd.8
-
INFO= RPLAY RPTP librplay rplayd
.include <bsd.port.pre.mk>
@@ -37,18 +32,20 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-ao
post-extract:
@${CP} ${WRKSRC}/doc/rplay.texi ${WRKSRC}/doc/rplayd.texi
+post-patch:
+ @${REINPLACE_CMD} -E \
+ 's,(bin|include|info|lib|man|sbin)dir),DESTDIR)$$(&,' \
+ ${WRKSRC}/include/Makefile.in \
+ ${WRKSRC}/librplay/Makefile.in \
+ ${WRKSRC}/rplayd/Makefile.in \
+ ${WRKSRC}/rplay/Makefile.in \
+ ${WRKSRC}/rptp/Makefile.in \
+ ${WRKSRC}/doc/Makefile.in
+
post-install:
- @${ECHO_MSG} "===> startup file as ${PREFIX}/etc/rc.d/rplayd"
- @${MKDIR} ${PREFIX}/etc/
- for na in rplay.conf rplay.helpers rplay.servers rplay.hosts; do \
- ${CP} ${WRKSRC}/etc/$$na ${PREFIX}/etc/$$na.sample; \
- if [ ! -f ${PREFIX}/etc/$$na ]; then \
- ${CP} ${WRKSRC}/etc/$$na ${PREFIX}/etc/$$na; \
- fi; \
- done
-.if !exists(${PREFIX}/etc/rplay.hosts)
- @${ECHO_CMD} localhost > ${PREFIX}/etc/rplay.hosts
-.endif
- @${ECHO_CMD} localhost > ${PREFIX}/etc/rplay.hosts.sample
+.for file in rplay.conf rplay.helpers rplay.servers rplay.hosts
+ ${CP} ${WRKSRC}/etc/${file} ${STAGEDIR}${PREFIX}/etc/${file}.sample
+.endfor
+ @${ECHO_CMD} localhost > ${STAGEDIR}${PREFIX}/etc/rplay.hosts.sample
.include <bsd.port.post.mk>
diff --git a/audio/rplay/pkg-plist b/audio/rplay/pkg-plist
index 9531f1a77638..04f9dc7c48bc 100644
--- a/audio/rplay/pkg-plist
+++ b/audio/rplay/pkg-plist
@@ -1,12 +1,16 @@
@unexec rm -f %D/etc/rc.d/rplayd.sh*
-@unexec if cmp %D/etc/rplay.hosts.sample %D/etc/rplay.hosts 2>/dev/null; then rm -f %D/etc/rplay.hosts; fi
+@unexec if cmp -s %D/etc/rplay.hosts.sample %D/etc/rplay.hosts 2>/dev/null; then rm -f %D/etc/rplay.hosts; fi
etc/rplay.hosts.sample
-@unexec if cmp %D/etc/rplay.conf.sample %D/etc/rplay.conf 2>/dev/null; then rm -f %D/etc/rplay.conf; fi
+@exec if [ ! -f %D/etc/rplay.hosts ]; then cp -p %D/%F %D/etc/rplay.hosts; fi
+@unexec if cmp -s %D/etc/rplay.conf.sample %D/etc/rplay.conf 2>/dev/null; then rm -f %D/etc/rplay.conf; fi
etc/rplay.conf.sample
-@unexec if cmp %D/etc/rplay.helpers.sample %D/etc/rplay.helpers 2>/dev/null; then rm -f %D/etc/rplay.helpers; fi
+@exec if [ ! -f %D/etc/rplay.conf ]; then cp -p %D/%F %D/etc/rplay.conf; fi
+@unexec if cmp -s %D/etc/rplay.helpers.sample %D/etc/rplay.helpers 2>/dev/null; then rm -f %D/etc/rplay.helpers; fi
etc/rplay.helpers.sample
-@unexec if cmp %D/etc/rplay.servers.sample %D/etc/rplay.servers 2>/dev/null; then rm -f %D/etc/rplay.servers; fi
+@exec if [ ! -f %D/etc/rplay.helpers ]; then cp -p %D/%F %D/etc/rplay.helpers; fi
+@unexec if cmp -s %D/etc/rplay.servers.sample %D/etc/rplay.servers 2>/dev/null; then rm -f %D/etc/rplay.servers; fi
etc/rplay.servers.sample
+@exec if [ ! -f %D/etc/rplay.servers ]; then cp -p %D/%F %D/etc/rplay.servers; fi
bin/rplay
bin/rptp
sbin/rplayd
@@ -14,3 +18,10 @@ include/rplay.h
lib/librplay.a
lib/librplay.so
lib/librplay.so.1
+man/man1/rplay.1.gz
+man/man1/rptp.1.gz
+man/man5/rplay.conf.5.gz
+man/man5/rplay.helpers.5.gz
+man/man5/rplay.hosts.5.gz
+man/man5/rplay.servers.5.gz
+man/man8/rplayd.8.gz