diff options
author | bapt <bapt@FreeBSD.org> | 2011-04-27 18:54:11 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2011-04-27 18:54:11 +0800 |
commit | 8ad23cac74bfd35cb8532625652e27123fdd73ea (patch) | |
tree | 9d866c509171b4241d138aa633808246088dbba9 /sysutils/swapexd | |
parent | 920c98e3068369e55ca80b505bf6decfa3667cbb (diff) | |
download | freebsd-ports-gnome-8ad23cac74bfd35cb8532625652e27123fdd73ea.tar.gz freebsd-ports-gnome-8ad23cac74bfd35cb8532625652e27123fdd73ea.tar.zst freebsd-ports-gnome-8ad23cac74bfd35cb8532625652e27123fdd73ea.zip |
- update to 0.3
- add a patch to have a cleaner rc script and make the port respect PREFIX
PR: ports/156663
Submitted by: Jesse <jessefrgsmith _at_ yahoo.ca> (maintainer)
Diffstat (limited to 'sysutils/swapexd')
-rw-r--r-- | sysutils/swapexd/Makefile | 9 | ||||
-rw-r--r-- | sysutils/swapexd/distinfo | 4 | ||||
-rw-r--r-- | sysutils/swapexd/files/patch-rc.d__swapexd | 46 |
3 files changed, 55 insertions, 4 deletions
diff --git a/sysutils/swapexd/Makefile b/sysutils/swapexd/Makefile index 384fb498ed4e..c3656431ca05 100644 --- a/sysutils/swapexd/Makefile +++ b/sysutils/swapexd/Makefile @@ -6,7 +6,7 @@ # PORTNAME= swapexd -PORTVERSION= 0.1 +PORTVERSION= 0.3 CATEGORIES= sysutils MASTER_SITES= http://makeapbi.sourceforge.net/${PORTNAME}/ @@ -15,10 +15,15 @@ COMMENT= A tool for growing and shrinking on-disk swap space WRKSRC= ${WRKDIR}/${PORTNAME} -PLIST_FILES= sbin/${PORTNAME} etc/${PORTNAME}.conf +PLIST_FILES= sbin/${PORTNAME} etc/${PORTNAME}.conf etc/rc.d/swapexd + +post-patch: + @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/rc.d/swapexd + @${REINPLACE_CMD} -e "s,/etc/,${PREFIX}/etc/,g" ${WRKSRC}/swapexd.h do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/sbin/ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf + ${INSTALL_SCRIPT} ${WRKSRC}/rc.d/swapexd ${PREFIX}/etc/rc.d .include <bsd.port.mk> diff --git a/sysutils/swapexd/distinfo b/sysutils/swapexd/distinfo index e9f6eb870a54..ac20968fd9be 100644 --- a/sysutils/swapexd/distinfo +++ b/sysutils/swapexd/distinfo @@ -1,2 +1,2 @@ -SHA256 (swapexd-0.1.tar.gz) = e010703f2951e1f85f3f955d2001bdbe4476c47b9bb83d1172063e7895816b42 -SIZE (swapexd-0.1.tar.gz) = 7252 +SHA256 (swapexd-0.3.tar.gz) = 44fb12987dac7f855251f2ea06bbe427d6728873c01f71231f716e1dcfc71433 +SIZE (swapexd-0.3.tar.gz) = 7816 diff --git a/sysutils/swapexd/files/patch-rc.d__swapexd b/sysutils/swapexd/files/patch-rc.d__swapexd new file mode 100644 index 000000000000..9d75535c1e3e --- /dev/null +++ b/sysutils/swapexd/files/patch-rc.d__swapexd @@ -0,0 +1,46 @@ +--- ./rc.d/swapexd.orig 2011-04-26 18:37:13.000000000 +0200 ++++ ./rc.d/swapexd 2011-04-27 12:49:43.900653110 +0200 +@@ -7,37 +7,16 @@ + . /etc/rc.subr + + name="swapexd" +- rcvar=`set_rcvar` +- +-stop_cmd="swapexd_stop" +-start_cmd="swapexd_start" +- +-load_rc_config $name ++rcvar=`set_rcvar` + + : ${swapexd_enable=NO} + +-swapexd_start() +-{ +- if [ -e "/var/run/swapexd.pid" ] +- then +- echo "swapexd already running?" +- swapexd_stop +- fi +- +- echo "Starting swapexd..." +- (/usr/local/sbin/swapexd -d -p >/dev/null 2>/dev/null) & +-} ++procname="%%PREFIX%%/sbin/swapexd" ++command="/usr/sbin/daemon" ++pidfile="/var/run/swapexd.pid" ++command_args="-f -p ${pidfile} ${procname} -d -p" + +-swapexd_stop() +-{ +- echo "Stoping swapexd..." +- if [ -e "/var/run/swapexd.pid" ] +- then +- PID=`cat /var/run/swapexd.pid` +- kill -9 $PID +- rm /var/run/swapexd.pid +- fi +-} ++load_rc_config $name + + run_rc_command "$1" + |