aboutsummaryrefslogtreecommitdiff
path: root/sysutils/swapd
diff options
context:
space:
mode:
authorTim Bishop <tdb@FreeBSD.org>2014-05-24 15:39:56 +0000
committerTim Bishop <tdb@FreeBSD.org>2014-05-24 15:39:56 +0000
commit01469d22eae6ab41da51ffda52dc1d70ed01dce8 (patch)
treeb464e78cd817bb5bacc251dafdffca710a6561b7 /sysutils/swapd
parent7fe45138460596797de367b34acc90e99f4a0498 (diff)
downloadports-01469d22eae6ab41da51ffda52dc1d70ed01dce8.tar.gz
ports-01469d22eae6ab41da51ffda52dc1d70ed01dce8.zip
- Fix build with libstatgrab 0.90 by upgrading to 1.0.5
- Use new LIB_DEPENDS format - Stage support - Use @sample pkg-plist keyword PR: ports/189739 Approved by: portmgr (antoine)
Notes
Notes: svn path=/head/; revision=355045
Diffstat (limited to 'sysutils/swapd')
-rw-r--r--sysutils/swapd/Makefile14
-rw-r--r--sysutils/swapd/distinfo4
-rw-r--r--sysutils/swapd/files/patch-Makefile.in31
-rw-r--r--sysutils/swapd/files/patch-configure38
-rw-r--r--sysutils/swapd/pkg-plist6
5 files changed, 49 insertions, 44 deletions
diff --git a/sysutils/swapd/Makefile b/sysutils/swapd/Makefile
index 819dd84dc141..c1285b7da75d 100644
--- a/sysutils/swapd/Makefile
+++ b/sysutils/swapd/Makefile
@@ -2,32 +2,26 @@
# $FreeBSD$
PORTNAME= swapd
-PORTVERSION= 1.0.3
-PORTREVISION= 1
+PORTVERSION= 1.0.5
CATEGORIES= sysutils
-MASTER_SITES= http://www.rkeene.org/files/oss/swapd/source/
+MASTER_SITES= http://www.rkeene.org/files/oss/swapd/
MAINTAINER= leeym@FreeBSD.org
COMMENT= A daemon that watches free memory and manages swap files
-BROKEN= Fails to build
-
-LIB_DEPENDS= statgrab:${PORTSDIR}/devel/libstatgrab
+LIB_DEPENDS= libstatgrab.so:${PORTSDIR}/devel/libstatgrab
USES= gmake pkgconfig
GNU_CONFIGURE= yes
USE_RC_SUBR= swapd
-MAN5= swapd.conf.5
-MAN8= swapd.8
-NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/${CONFIGURE_SCRIPT}
post-install:
.for f in swapd_swapon swapd_swapoff
- ${INSTALL_SCRIPT} ${FILESDIR}/${f} ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${FILESDIR}/${f} ${STAGEDIR}${PREFIX}/sbin
.endfor
.include <bsd.port.mk>
diff --git a/sysutils/swapd/distinfo b/sysutils/swapd/distinfo
index 24ca1fb8da5e..15afcee34bac 100644
--- a/sysutils/swapd/distinfo
+++ b/sysutils/swapd/distinfo
@@ -1,2 +1,2 @@
-SHA256 (swapd-1.0.3.tar.gz) = 28e61c243268185a60e4012a612c054ebe9fd65215961df5e69fb32735984628
-SIZE (swapd-1.0.3.tar.gz) = 90981
+SHA256 (swapd-1.0.5.tar.gz) = a9c25251ad4b1eb163266cd44969975db5a872be68cf7bca66367d43875ccbc6
+SIZE (swapd-1.0.5.tar.gz) = 94713
diff --git a/sysutils/swapd/files/patch-Makefile.in b/sysutils/swapd/files/patch-Makefile.in
index 97ed304d9153..60882717abec 100644
--- a/sysutils/swapd/files/patch-Makefile.in
+++ b/sysutils/swapd/files/patch-Makefile.in
@@ -1,11 +1,22 @@
---- Makefile.in.orig 2004-10-17 22:05:24.000000000 -0700
-+++ Makefile.in 2007-08-24 09:08:55.000000000 -0700
-@@ -35,6 +35,7 @@
- -$(INSTALL) -d $(mandir)/man8
- -$(INSTALL) -d $(mandir)/man5
- $(INSTALL) -m 755 swapd$(EXEEXT) $(sbindir)/swapd$(EXEEXT)
+--- ./Makefile.in.orig 2004-10-18 06:05:24.000000000 +0100
++++ ./Makefile.in 2013-11-22 22:33:19.141103774 +0000
+@@ -30,11 +30,11 @@
+ rm -f Makefile config.h config.status config.log swapd.8 swapd.conf.5
+
+ install: all
+- -$(INSTALL) -d $(sbindir)
+- -$(INSTALL) -d $(sysconfdir)
+- -$(INSTALL) -d $(mandir)/man8
+- -$(INSTALL) -d $(mandir)/man5
+- $(INSTALL) -m 755 swapd$(EXEEXT) $(sbindir)/swapd$(EXEEXT)
- $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf
-+ $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf.sample
-+ if [ ! -f "$(sysconfdir)/swapd.conf" ]; then $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf; fi
- $(INSTALL) -m 644 swapd.8 $(mandir)/man8/swapd.8
- $(INSTALL) -m 644 swapd.conf.5 $(mandir)/man5/swapd.conf.5
+- $(INSTALL) -m 644 swapd.8 $(mandir)/man8/swapd.8
+- $(INSTALL) -m 644 swapd.conf.5 $(mandir)/man5/swapd.conf.5
++ -$(INSTALL) -d $(DESTDIR)$(sbindir)
++ -$(INSTALL) -d $(DESTDIR)$(sysconfdir)
++ -$(INSTALL) -d $(DESTDIR)$(mandir)/man8
++ -$(INSTALL) -d $(DESTDIR)$(mandir)/man5
++ $(INSTALL) -m 755 swapd$(EXEEXT) $(DESTDIR)$(sbindir)/swapd$(EXEEXT)
++ $(INSTALL) -m 644 swapd.conf $(DESTDIR)$(sysconfdir)/swapd.conf.sample
++ $(INSTALL) -m 644 swapd.8 $(DESTDIR)$(mandir)/man8/swapd.8
++ $(INSTALL) -m 644 swapd.conf.5 $(DESTDIR)$(mandir)/man5/swapd.conf.5
diff --git a/sysutils/swapd/files/patch-configure b/sysutils/swapd/files/patch-configure
index afa8164dbf96..4c6d82ac3d0d 100644
--- a/sysutils/swapd/files/patch-configure
+++ b/sysutils/swapd/files/patch-configure
@@ -1,23 +1,23 @@
---- configure.orig 2005-02-18 20:34:16.000000000 -0800
-+++ configure 2010-06-25 00:26:06.000000000 -0700
-@@ -11435,6 +11435,7 @@
- rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
-+eval "$as_ac_var=no"
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-@@ -11535,6 +11536,7 @@
- rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
+--- ./configure.orig 2013-10-06 17:11:43.000000000 +0100
++++ ./configure 2013-11-22 21:48:41.875104078 +0000
+@@ -4850,6 +4850,7 @@
+ for ac_func in swapoff
+ do :
+ ac_fn_c_check_func "$LINENO" "swapoff" "ac_cv_func_swapoff"
++ac_cv_func_swapoff=no
+ if test "x$ac_cv_func_swapoff" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SWAPOFF 1
+@@ -4861,6 +4862,7 @@
+
+
+ ac_fn_c_check_func "$LINENO" "swapon" "ac_cv_func_swapon"
+ac_cv_func_swapon=no
- echo "$as_me:$LINENO: result: $ac_cv_func_swapon" >&5
- echo "${ECHO_T}$ac_cv_func_swapon" >&6
- if test $ac_cv_func_swapon = yes; then
-@@ -12170,6 +12172,17 @@
- _ACEOF
+ if test "x$ac_cv_func_swapon" = xyes; then :
+
+
+@@ -5114,6 +5116,17 @@
+ $as_echo "#define SWAPD_SWAPOFF_CMDLINE \"/sbin/swapctl -d \\\"%s\\\"\"" >>confdefs.h
;;
+ freebsd*)
diff --git a/sysutils/swapd/pkg-plist b/sysutils/swapd/pkg-plist
index 339cdf1ebb59..7ef3d30f46a1 100644
--- a/sysutils/swapd/pkg-plist
+++ b/sysutils/swapd/pkg-plist
@@ -1,6 +1,6 @@
+man/man5/swapd.conf.5.gz
+man/man8/swapd.8.gz
sbin/swapd
sbin/swapd_swapon
sbin/swapd_swapoff
-@unexec if cmp -s %D/etc/swapd.conf %D/etc/swapd.conf.sample; then rm -f %D/etc/swapd.conf; fi
-etc/swapd.conf.sample
-@exec [ ! -f %B/swapd.conf ] && cp %B/%f %B/swapd.conf
+@sample etc/swapd.conf.sample