mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add useful rc.d startup script.
PR: 57693 Submitted by: Jose R.Rey <king@v2project.com> Also honor CFLAGS and clean-up install.
This commit is contained in:
parent
b1bdd1d3ea
commit
1b312f03b2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=90663
4 changed files with 54 additions and 9 deletions
|
@ -20,7 +20,9 @@ USE_REINPLACE= yes
|
||||||
post-patch:
|
post-patch:
|
||||||
${REINPLACE_CMD} -e 's|@@PREFIX@@|${PREFIX}|g' ${WRKSRC}/server.c
|
${REINPLACE_CMD} -e 's|@@PREFIX@@|${PREFIX}|g' ${WRKSRC}/server.c
|
||||||
|
|
||||||
post-install:
|
do-install:
|
||||||
${CP} ${WRKSRC}/xbms.conf ${PREFIX}/etc/xbms.conf.sample
|
${INSTALL_PROGRAM} ${WRKSRC}/xbms ${PREFIX}/bin
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/xbms.conf ${PREFIX}/etc/xbms.conf.sample
|
||||||
|
${INSTALL_DATA} ${FILESDIR}/xbms.sh.sample ${PREFIX}/etc/rc.d/xbms.sh.sample
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
--- Makefile.orig Thu Jan 16 16:27:25 2003
|
|
||||||
+++ Makefile Thu Jan 16 16:27:36 2003
|
$FreeBSD$
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
CC = gcc -Wall
|
--- Makefile.orig Sun Feb 23 13:11:59 2003
|
||||||
-BINDIR = /usr/local/bin
|
+++ Makefile Wed Oct 8 22:37:15 2003
|
||||||
+BINDIR = ${PREFIX}/bin
|
@@ -1,8 +1,7 @@
|
||||||
|
-CC = gcc -Wall
|
||||||
|
BINDIR = /usr/local/bin
|
||||||
all: server
|
all: server
|
||||||
server:
|
server:
|
||||||
$(CC) -O3 -pthread -o xbms server.c
|
- $(CC) -O3 -pthread -o xbms server.c
|
||||||
|
+ $(CC) $(CFLAGS) -pthread -o xbms server.c
|
||||||
|
install: all
|
||||||
|
rm -f $(BINDIR)/xbms
|
||||||
|
cp xbms $(BINDIR)
|
||||||
|
|
35
net/xbms/files/xbms.sh.sample
Normal file
35
net/xbms/files/xbms.sh.sample
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Start or stop the xbms server
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
pidfile="/var/run/xbms.pid"
|
||||||
|
name="xbms"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n " xbms"
|
||||||
|
if [ -f /usr/local/etc/xbms.conf.sample ]; then
|
||||||
|
/usr/local/bin/xbms
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
if [ ! -f /var/run/xbms.pid ]; then
|
||||||
|
echo "XBMS not running"
|
||||||
|
exit 64
|
||||||
|
fi
|
||||||
|
kill `cat /var/run/xbms.pid`
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
ps -auxww | egrep ${name} | egrep -v "($0|egrep)"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo ""
|
||||||
|
echo "Usage: `basename $0` { start | stop | status}"
|
||||||
|
echo ""
|
||||||
|
exit 64
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -1,2 +1,4 @@
|
||||||
|
@comment $FreeBSD$
|
||||||
bin/xbms
|
bin/xbms
|
||||||
etc/xbms.conf.sample
|
etc/xbms.conf.sample
|
||||||
|
etc/rc.d/xbms.sh.sample
|
||||||
|
|
Loading…
Add table
Reference in a new issue