diff options
author | markp <markp@FreeBSD.org> | 2002-02-20 21:03:34 +0800 |
---|---|---|
committer | markp <markp@FreeBSD.org> | 2002-02-20 21:03:34 +0800 |
commit | ccc273cfd989c5328cde65e7887492e1b347562e (patch) | |
tree | f094023b900113bdbc77e68afc627c08d32f5d45 /sysutils/tmpwatch | |
parent | ac4786c8faf7933469eda25bc2d399f68e058741 (diff) | |
download | freebsd-ports-gnome-ccc273cfd989c5328cde65e7887492e1b347562e.tar.gz freebsd-ports-gnome-ccc273cfd989c5328cde65e7887492e1b347562e.tar.zst freebsd-ports-gnome-ccc273cfd989c5328cde65e7887492e1b347562e.zip |
Add tmpwatch 2.8.1, a utility for removing files based on when they
were last accessed.
Diffstat (limited to 'sysutils/tmpwatch')
-rw-r--r-- | sysutils/tmpwatch/Makefile | 39 | ||||
-rw-r--r-- | sysutils/tmpwatch/distinfo | 1 | ||||
-rw-r--r-- | sysutils/tmpwatch/files/patch-tmpwatch.c | 26 | ||||
-rw-r--r-- | sysutils/tmpwatch/pkg-comment | 1 | ||||
-rw-r--r-- | sysutils/tmpwatch/pkg-descr | 6 | ||||
-rw-r--r-- | sysutils/tmpwatch/pkg-plist | 1 |
6 files changed, 74 insertions, 0 deletions
diff --git a/sysutils/tmpwatch/Makefile b/sysutils/tmpwatch/Makefile new file mode 100644 index 000000000000..f554bae4fde7 --- /dev/null +++ b/sysutils/tmpwatch/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: tmpwatch +# Date created: Feb 20, 2002 +# Whom: Mark Pulford <mark@kyne.com.au> +# +# $FreeBSD$ +# + +PORTNAME= tmpwatch +PORTVERSION= 2.8.1 +CATEGORIES= sysutils +MASTER_SITES= ftp://updates.redhat.com/7.2/en/os/SRPMS/ +EXTRACT_SUFX= -1.src.rpm + +MAINTAINER= markp@FreeBSD.org + +BUILD_DEPENDS= rpm2cpio:${PORTSDIR}/archivers/rpm2cpio +LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt + +CPIO?= /usr/bin/cpio +CFLAGS+= -I${LOCALBASE}/include -DVERSION=\"${PORTVERSION}\" +LDFLAGS+= -L${LOCALBASE}/lib -lgnugetopt +MAN8= tmpwatch.8 + +do-extract: + ${MKDIR} ${WRKDIR} + cd ${WRKDIR} && \ + ${LOCALBASE}/bin/rpm2cpio ${DISTDIR}/${DISTFILES} | \ + ${CPIO} -iud + cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \ + ${WRKDIR}/${DISTNAME}.tar.gz ${EXTRACT_AFTER_ARGS} + +do-build: + cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} -o tmpwatch tmpwatch.c + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/tmpwatch ${PREFIX}/sbin + ${INSTALL_MAN} ${WRKSRC}/tmpwatch.8 ${MAN8PREFIX}/man/man8 + +.include <bsd.port.mk> diff --git a/sysutils/tmpwatch/distinfo b/sysutils/tmpwatch/distinfo new file mode 100644 index 000000000000..2995d3dbc471 --- /dev/null +++ b/sysutils/tmpwatch/distinfo @@ -0,0 +1 @@ +MD5 (tmpwatch-2.8.1-1.src.rpm) = 27cb65abf996a15030045aff656f82a5 diff --git a/sysutils/tmpwatch/files/patch-tmpwatch.c b/sysutils/tmpwatch/files/patch-tmpwatch.c new file mode 100644 index 000000000000..cd7c55ebbe9a --- /dev/null +++ b/sysutils/tmpwatch/files/patch-tmpwatch.c @@ -0,0 +1,26 @@ +--- tmpwatch.c.orig Wed Feb 20 22:42:57 2002 ++++ tmpwatch.c Wed Feb 20 23:14:48 2002 +@@ -28,7 +28,6 @@ + #include <utime.h> + #include <unistd.h> + #include <paths.h> +-#include <mntent.h> + + #define LOG_REALDEBUG 1 + #define LOG_DEBUG 2 +@@ -324,6 +323,7 @@ + if (*significant_time >= killTime) + continue; + ++#if 0 + /* check if it is an ext3 journal file */ + if ((strcmp(ent->d_name, ".journal") == 0) && + (sb.st_uid == 0)) { +@@ -352,6 +352,7 @@ + continue; + } + } ++#endif + + if ((flags & FLAG_ALLFILES) || + S_ISREG(sb.st_mode) || diff --git a/sysutils/tmpwatch/pkg-comment b/sysutils/tmpwatch/pkg-comment new file mode 100644 index 000000000000..6ea0db66c3bd --- /dev/null +++ b/sysutils/tmpwatch/pkg-comment @@ -0,0 +1 @@ +A utility for removing files based on when they were last accessed diff --git a/sysutils/tmpwatch/pkg-descr b/sysutils/tmpwatch/pkg-descr new file mode 100644 index 000000000000..ea7e76b78d0c --- /dev/null +++ b/sysutils/tmpwatch/pkg-descr @@ -0,0 +1,6 @@ +The tmpwatch utility recursively searches through specified +directories and removes files which have not been accessed in a +specified period of time. Tmpwatch is normally used to clean up +directories which are used for temporarily holding files (for example, +/tmp). Tmpwatch ignores symlinks, won't switch filesystems and only +removes empty directories and regular files. diff --git a/sysutils/tmpwatch/pkg-plist b/sysutils/tmpwatch/pkg-plist new file mode 100644 index 000000000000..0c03635cdeaf --- /dev/null +++ b/sysutils/tmpwatch/pkg-plist @@ -0,0 +1 @@ +sbin/tmpwatch |