aboutsummaryrefslogtreecommitdiff
path: root/sysutils/swapd
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2017-02-25 13:50:59 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2017-02-25 13:50:59 +0000
commit8a5a537542f2793744acfd8f7560059c66e7067f (patch)
tree5821ddb7823eafefbfdf32695d1e1a35ad84059d /sysutils/swapd
parent37d6be4f4c3a211d80ca38373f6eae4813621391 (diff)
downloadports-8a5a537542f2793744acfd8f7560059c66e7067f.tar.gz
ports-8a5a537542f2793744acfd8f7560059c66e7067f.zip
- Add LICENSE
- Strip binary - Regenerate patches
Notes
Notes: svn path=/head/; revision=434808
Diffstat (limited to 'sysutils/swapd')
-rw-r--r--sysutils/swapd/Makefile6
-rw-r--r--sysutils/swapd/files/patch-Makefile.in6
-rw-r--r--sysutils/swapd/files/patch-configure10
-rw-r--r--sysutils/swapd/files/patch-swapd.c20
-rw-r--r--sysutils/swapd/files/patch-swapd.conf.5.in6
5 files changed, 26 insertions, 22 deletions
diff --git a/sysutils/swapd/Makefile b/sysutils/swapd/Makefile
index 1755d2aae208..fca760ef55be 100644
--- a/sysutils/swapd/Makefile
+++ b/sysutils/swapd/Makefile
@@ -3,13 +3,16 @@
PORTNAME= swapd
PORTVERSION= 1.0.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= http://www.rkeene.org/files/oss/swapd/
MAINTAINER= ports@FreeBSD.org
COMMENT= Daemon that watches free memory and manages swap files
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
LIB_DEPENDS= libstatgrab.so:devel/libstatgrab
USES= gmake pkgconfig
@@ -21,6 +24,7 @@ post-patch:
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/${CONFIGURE_SCRIPT}
post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME}
.for f in swapd_swapon swapd_swapoff
${INSTALL_SCRIPT} ${FILESDIR}/${f} ${STAGEDIR}${PREFIX}/sbin
.endfor
diff --git a/sysutils/swapd/files/patch-Makefile.in b/sysutils/swapd/files/patch-Makefile.in
index 60882717abec..2652e6b244ab 100644
--- a/sysutils/swapd/files/patch-Makefile.in
+++ b/sysutils/swapd/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- ./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 @@
+--- Makefile.in.orig 2004-10-18 05:05:24 UTC
++++ Makefile.in
+@@ -30,11 +30,11 @@ distclean: clean
rm -f Makefile config.h config.status config.log swapd.8 swapd.conf.5
install: all
diff --git a/sysutils/swapd/files/patch-configure b/sysutils/swapd/files/patch-configure
index 4c6d82ac3d0d..d8d0259f1786 100644
--- a/sysutils/swapd/files/patch-configure
+++ b/sysutils/swapd/files/patch-configure
@@ -1,6 +1,6 @@
---- ./configure.orig 2013-10-06 17:11:43.000000000 +0100
-+++ ./configure 2013-11-22 21:48:41.875104078 +0000
-@@ -4850,6 +4850,7 @@
+--- configure.orig 2013-10-06 16:11:43 UTC
++++ configure
+@@ -4850,6 +4850,7 @@ fi
for ac_func in swapoff
do :
ac_fn_c_check_func "$LINENO" "swapoff" "ac_cv_func_swapoff"
@@ -8,7 +8,7 @@
if test "x$ac_cv_func_swapoff" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SWAPOFF 1
-@@ -4861,6 +4862,7 @@
+@@ -4861,6 +4862,7 @@ done
ac_fn_c_check_func "$LINENO" "swapon" "ac_cv_func_swapon"
@@ -16,7 +16,7 @@
if test "x$ac_cv_func_swapon" = xyes; then :
-@@ -5114,6 +5116,17 @@
+@@ -5114,6 +5116,17 @@ $as_echo "#define SWAPD_SWAP_PERMS 01600
$as_echo "#define SWAPD_SWAPOFF_CMDLINE \"/sbin/swapctl -d \\\"%s\\\"\"" >>confdefs.h
;;
diff --git a/sysutils/swapd/files/patch-swapd.c b/sysutils/swapd/files/patch-swapd.c
index eabf2cd11055..647cb5c465a5 100644
--- a/sysutils/swapd/files/patch-swapd.c
+++ b/sysutils/swapd/files/patch-swapd.c
@@ -1,5 +1,5 @@
---- swapd.c.orig 2005-02-18 20:32:30.000000000 -0800
-+++ swapd.c 2010-06-25 12:16:07.000000000 -0700
+--- swapd.c.orig 2013-10-06 16:09:13 UTC
++++ swapd.c
@@ -1,3 +1,6 @@
+#include <syslog.h>
+#include <stdarg.h>
@@ -7,7 +7,7 @@
#include "compat.h"
#ifdef HAVE_STDIO_H
-@@ -187,15 +190,18 @@
+@@ -188,15 +191,18 @@ int swapd_swapon(const char *swapfile) {
# ifdef SWAPON_TAKES_2_ARGS
/* Linux */
swaponret = swapon(swapfile, 0);
@@ -26,7 +26,7 @@
# else
# error Dont know how to swapon() on this platform!
# endif
-@@ -286,7 +292,9 @@
+@@ -287,7 +293,9 @@ swap_t *swapd_mkswap(const char *swapdir
int swapd_swapoff(swap_t *swapfile) {
int swapoffret = -1;
@@ -36,7 +36,7 @@
if (swapfile == NULL) {
return(-1);
-@@ -299,11 +307,13 @@
+@@ -300,11 +308,13 @@ int swapd_swapoff(swap_t *swapfile) {
/* Prefer the swapoff() system call ... */
#ifdef HAVE_SWAPOFF
swapoffret = swapoff(swapfile->pathname);
@@ -50,7 +50,7 @@
# else
/* ... otherwise, issue a warning since we don't know what to do. */
# warning Dont know how to swapoff on this platform
-@@ -444,6 +454,8 @@
+@@ -445,6 +455,8 @@ int main(int argc, char **argv) {
int chdirret = 0, statret = 0;
int gfm_errorcount = 0;
@@ -59,7 +59,7 @@
if (!swapd_init_stats()) {
return(EXIT_FAILURE);
}
-@@ -518,7 +530,7 @@
+@@ -519,7 +531,7 @@ int main(int argc, char **argv) {
daemonize();
@@ -68,7 +68,7 @@
if (dh != NULL) {
inactive_swaps = 0;
-@@ -587,7 +599,7 @@
+@@ -588,7 +600,7 @@ int main(int argc, char **argv) {
}
}
@@ -77,7 +77,7 @@
if (swapfile != NULL) {
free(swapfile);
-@@ -637,6 +649,7 @@
+@@ -638,6 +650,7 @@ int main(int argc, char **argv) {
if (swaps[i]->active == 0 && swaps[i]->pathname != NULL) {
inactive_swaps++;
if (inactive_swaps > max_inactive_swaps) {
@@ -85,7 +85,7 @@
unlink(swaps[i]->pathname);
free(swaps[i]->pathname);
free(swaps[i]);
-@@ -658,5 +671,6 @@
+@@ -659,5 +672,6 @@ int main(int argc, char **argv) {
}
diff --git a/sysutils/swapd/files/patch-swapd.conf.5.in b/sysutils/swapd/files/patch-swapd.conf.5.in
index 8bff84f43253..36cb4c75cae3 100644
--- a/sysutils/swapd/files/patch-swapd.conf.5.in
+++ b/sysutils/swapd/files/patch-swapd.conf.5.in
@@ -1,6 +1,6 @@
---- swapd.conf.5.in.orig 2010-06-24 16:22:44.000000000 -0700
-+++ swapd.conf.5.in 2010-06-24 16:22:57.000000000 -0700
-@@ -14,7 +14,7 @@
+--- swapd.conf.5.in.orig 2005-02-19 04:22:44 UTC
++++ swapd.conf.5.in
+@@ -14,7 +14,7 @@ at startup. The configuration file is i
maxfree 0
swapsize 32m
swapdir /var/tmp