[csw-devel] SF.net SVN: gar:[8791] csw/mgar/pkg

skayser at users.sourceforge.net skayser at users.sourceforge.net
Wed Feb 24 16:57:18 CET 2010


Revision: 8791
          http://gar.svn.sourceforge.net/gar/?rev=8791&view=rev
Author:   skayser
Date:     2010-02-24 15:57:18 +0000 (Wed, 24 Feb 2010)

Log Message:
-----------
tmpwatch: initial commit

Added Paths:
-----------
    csw/mgar/pkg/tmpwatch/
    csw/mgar/pkg/tmpwatch/branches/
    csw/mgar/pkg/tmpwatch/tags/
    csw/mgar/pkg/tmpwatch/trunk/
    csw/mgar/pkg/tmpwatch/trunk/Makefile
    csw/mgar/pkg/tmpwatch/trunk/checksums
    csw/mgar/pkg/tmpwatch/trunk/files/
    csw/mgar/pkg/tmpwatch/trunk/files/0001-Makefile-honor-defaults-and-use-DESTDIR-instead-of-R.patch
    csw/mgar/pkg/tmpwatch/trunk/files/0002-tmpwatch.c-include-stpcpy.c.patch
    csw/mgar/pkg/tmpwatch/trunk/files/stpcpy.c


Property changes on: csw/mgar/pkg/tmpwatch/trunk
___________________________________________________________________
Added: svn:ignore
   + cookies
download
work


Added: svn:externals
   + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2


Added: csw/mgar/pkg/tmpwatch/trunk/Makefile
===================================================================
--- csw/mgar/pkg/tmpwatch/trunk/Makefile	                        (rev 0)
+++ csw/mgar/pkg/tmpwatch/trunk/Makefile	2010-02-24 15:57:18 UTC (rev 8791)
@@ -0,0 +1,41 @@
+# TODO 
+# ! strtoimax implementation missing on Solaris 8/9
+# ! on repeated gmake build invocations (after build failures), only a subset of the
+#   environment is used, in particular CPPFLAGS/LDFLAGS are missing
+GARNAME = tmpwatch
+GARVERSION = 2.9.17
+CATEGORIES = apps
+
+DESCRIPTION = Removes files which haven't been accessed for a period of time
+define BLURB
+  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). 
+endef
+
+VENDOR_URL   = https://fedorahosted.org/tmpwatch/
+MASTER_SITES = https://fedorahosted.org/releases/t/m/tmpwatch/
+DISTFILES    = $(GARNAME)-$(GARVERSION).tar.bz2
+UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2
+
+# Taken from libgcrypt's stringhelp.c
+DISTFILES    += stpcpy.c
+
+# Tweak Makefile to honor environment variables
+PATCHFILES  = 0001-Makefile-honor-defaults-and-use-DESTDIR-instead-of-R.patch
+# Include missing stpcpy() implementation
+PATCHFILES += 0002-tmpwatch.c-include-stpcpy.c.patch
+
+CONFIGURE_SCRIPTS =
+BUILD_ARGS = tmpwatch
+TEST_SCRIPTS =
+
+# Link against our OpenCSW getopt lib which has getopt_long
+EXTRA_LD_FLAGS = -lgnugetopt
+
+include gar/category.mk
+
+pre-build-modulated:
+	cp $(WORKDIR)/stpcpy.c $(WORKSRC)
+	@$(MAKECOOKIE)

Added: csw/mgar/pkg/tmpwatch/trunk/checksums
===================================================================
--- csw/mgar/pkg/tmpwatch/trunk/checksums	                        (rev 0)
+++ csw/mgar/pkg/tmpwatch/trunk/checksums	2010-02-24 15:57:18 UTC (rev 8791)
@@ -0,0 +1,4 @@
+9d3371e425a1214f59044487b2cf76b9  0001-Makefile-honor-defaults-and-use-DESTDIR-instead-of-R.patch
+af1b38792e28777a049cbe4ca3dd2132  0002-tmpwatch.c-include-stpcpy.c.patch
+6a89324536d839b75ceb2fbdac4bf255  stpcpy.c
+7738f5db4ae0ce3795c224f13a597356  tmpwatch-2.9.17.tar.bz2

Added: csw/mgar/pkg/tmpwatch/trunk/files/0001-Makefile-honor-defaults-and-use-DESTDIR-instead-of-R.patch
===================================================================
--- csw/mgar/pkg/tmpwatch/trunk/files/0001-Makefile-honor-defaults-and-use-DESTDIR-instead-of-R.patch	                        (rev 0)
+++ csw/mgar/pkg/tmpwatch/trunk/files/0001-Makefile-honor-defaults-and-use-DESTDIR-instead-of-R.patch	2010-02-24 15:57:18 UTC (rev 8791)
@@ -0,0 +1,61 @@
+From a6bf87119784e5f4cf2ecfeab171e6b59ce725e1 Mon Sep 17 00:00:00 2001
+From: Sebastian Kayser <skayser at opencsw.org>
+Date: Wed, 24 Feb 2010 16:39:37 +0100
+Subject: [PATCH 1/2] Makefile: honor defaults and use DESTDIR instead of ROOT
+
+---
+ Makefile |   24 +++++++++++++-----------
+ 1 files changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cfb71dd..35297a3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,9 @@ VERSION=2.9.17
+ HGTAG = 'tmpwatch-$(VERSION)'
+ OS_NAME=$(shell uname -s)
+ 
+-CFLAGS=$(RPM_OPT_FLAGS) -W -Wall -DVERSION=\"$(VERSION)\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
++CFLAGS ?= $(RPM_OPT_FLAGS) -W -Wall
++CFLAGS += -DVERSION=\"$(VERSION)\"
++CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+ 
+ ifeq ($(OS_NAME),HP-UX)
+     ROOT=/
+@@ -13,12 +15,12 @@ ifeq ($(OS_NAME),HP-UX)
+     CC=gcc
+ endif
+ ifeq ($(OS_NAME),SunOS)
+-    ROOT=/
+-    PREFIX=/usr/local
+-    MANDIR=$(PREFIX)/man
+-    SBINDIR=$(PREFIX)/sbin
+-    INSTALL=./install-sh
+-    CC=gcc
++    DESTDIR?=/
++    PREFIX?=/usr/local
++    MANDIR?=$(PREFIX)/man
++    SBINDIR?=$(PREFIX)/sbin
++    INSTALL?=./install-sh
++    CC?=gcc
+ endif
+ ifeq ($(OS_NAME),Linux)
+     ROOT=/
+@@ -31,10 +33,10 @@ endif
+ all: tmpwatch
+ 
+ install: all
+-	[ -d $(ROOT)$(SBINDIR) ] || mkdir -p $(ROOT)$(SBINDIR)
+-	[ -d $(ROOT)$(MANDIR)/man8 ] || mkdir -p $(ROOT)$(MANDIR)/man8
+-	$(INSTALL) -m 755 tmpwatch $(ROOT)$(SBINDIR)/tmpwatch
+-	$(INSTALL) -m 644 tmpwatch.8 $(ROOT)$(MANDIR)/man8/tmpwatch.8
++	[ -d $(DESTDIR)$(SBINDIR) ] || mkdir -p $(DESTDIR)$(SBINDIR)
++	[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
++	$(INSTALL) -m 755 tmpwatch $(DESTDIR)$(SBINDIR)/tmpwatch
++	$(INSTALL) -m 644 tmpwatch.8 $(DESTDIR)$(MANDIR)/man8/tmpwatch.8
+ 
+ clean:
+ 	rm -f tmpwatch
+-- 
+1.6.6
+

Added: csw/mgar/pkg/tmpwatch/trunk/files/0002-tmpwatch.c-include-stpcpy.c.patch
===================================================================
--- csw/mgar/pkg/tmpwatch/trunk/files/0002-tmpwatch.c-include-stpcpy.c.patch	                        (rev 0)
+++ csw/mgar/pkg/tmpwatch/trunk/files/0002-tmpwatch.c-include-stpcpy.c.patch	2010-02-24 15:57:18 UTC (rev 8791)
@@ -0,0 +1,24 @@
+From a04d34c996c8f87f92f96243cd80dd54ff4a9a1a Mon Sep 17 00:00:00 2001
+From: Sebastian Kayser <skayser at opencsw.org>
+Date: Wed, 24 Feb 2010 16:42:46 +0100
+Subject: [PATCH 2/2] tmpwatch.c: include stpcpy.c
+
+---
+ tmpwatch.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/tmpwatch.c b/tmpwatch.c
+index 4091013..a6b47a1 100644
+--- a/tmpwatch.c
++++ b/tmpwatch.c
+@@ -35,6 +35,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include "stpcpy.c"
+ #include <time.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+-- 
+1.6.6
+

Added: csw/mgar/pkg/tmpwatch/trunk/files/stpcpy.c
===================================================================
--- csw/mgar/pkg/tmpwatch/trunk/files/stpcpy.c	                        (rev 0)
+++ csw/mgar/pkg/tmpwatch/trunk/files/stpcpy.c	2010-02-24 15:57:18 UTC (rev 8791)
@@ -0,0 +1,9 @@
+char *                                                                                    
+stpcpy(char *a,const char *b)                                                             
+{                                                                                         
+    while( *b )                                                                           
+    *a++ = *b++;                                                                          
+    *a = 0;                                                                               
+                                                                                          
+    return (char*)a;                                                                      
+}                     


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list