/[packages]/cauldron/tmpwatch/current/SPECS/tmpwatch.spec
ViewVC logotype

Annotation of /cauldron/tmpwatch/current/SPECS/tmpwatch.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 519669 - (hide annotations) (download)
Fri Oct 18 18:29:33 2013 UTC (10 years, 6 months ago) by umeabot
File size: 2529 byte(s)
Mageia 4 Mass Rebuild
1 sander85 234422 Summary: Utility for removing files based on when they were last accessed
2     Name: tmpwatch
3 luigiwalser 259590 Version: 2.11
4 umeabot 519669 Release: %mkrel 3
5 sander85 234422 Group: File tools
6 blino 6707 License: GPLv2
7     URL: https://fedorahosted.org/tmpwatch/
8 sander85 234422 Source0: https://fedorahosted.org/releases/t/m/tmpwatch/%{name}-%{version}.tar.bz2
9     Requires: psmisc
10 blino 6707 # configure is looking for /sbin/fuser
11 sander85 234422 BuildRequires: psmisc
12 blino 6707
13     %description
14     The tmpwatch utility recursively searches through specified directories and
15     removes files which have not been accessed in a specified period of time.
16     Tmpwatch is normally used to clean up directories which are used for
17     temporarily holding files (for example, /tmp). Tmpwatch ignores symlinks,
18     won't switch filesystems and only removes empty directories and regular files.
19    
20     %prep
21     %setup -q
22    
23     %build
24     %configure2_5x
25     %make
26    
27     %install
28     rm -rf %{buildroot}
29    
30     %makeinstall ROOT=%{buildroot} MANDIR=%{_mandir} SBINDIR=%{_sbindir}
31    
32     install -d %{buildroot}%{_sysconfdir}/cron.daily
33     install -d %{buildroot}%{_sysconfdir}/sysconfig
34    
35     cat > tmpwatch.cron << EOF
36     #!/bin/sh
37    
38     [ -f %{_sysconfdir}/sysconfig/tmpwatch ] && . %{_sysconfdir}/sysconfig/tmpwatch
39    
40     %{_sbindir}/tmpwatch \$TMPWATCH_OPTIONS \$TMPWATCH_EXCLUDES 10d /tmp
41    
42     %{_sbindir}/tmpwatch \$TMPWATCH_OPTIONS \$TMPWATCH_EXCLUDES 30d /var/tmp
43    
44     [ -f %{_sysconfdir}/sysconfig/i18n ] && . %{_sysconfdir}/sysconfig/i18n
45    
46     for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?,\$LANG/cat?}; do
47     if [ -d "\$d" ]; then
48     %{_sbindir}/tmpwatch \$TMPWATCH_OPTIONS -f 30d "\$d"
49     fi
50     done
51     EOF
52    
53     cat > tmpwatch.sysconfig << EOF
54 sander85 234423 TMPWATCH_OPTIONS="-umc"
55 blino 6707 # (oe) define files/directories/sockets tmpwatch should ignore (#18488)
56 sander85 234423 TMPWATCH_EXCLUDES="-x /tmp/.ICE-unix -x /tmp/.X11-unix -x /tmp/.font-unix -x /tmp/.Test-unix -x /tmp/.XIM-unix"
57 blino 6707 EOF
58    
59     install -m0755 tmpwatch.cron %{buildroot}%{_sysconfdir}/cron.daily/tmpwatch
60     install -m0644 tmpwatch.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/tmpwatch
61    
62     cat > README.urpmi << EOF
63     The %{_sysconfdir}/cron.daily/tmpwatch script has been changed to use the %{_sysconfdir}/sysconfig/tmpwatch
64     file to exclude certain files/directories/sockets from being processed. It should be safe to make your changes
65     there instead. Per default these are not touched by tmpwatch:
66    
67 sander85 234423 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix /tmp/.Test-unix /tmp/.XIM-unix
68 blino 6707 EOF
69    
70     %files
71     %doc README.urpmi ChangeLog NEWS README
72     %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/tmpwatch
73     %attr(0755,root,root) %{_sysconfdir}/cron.daily/tmpwatch
74     %{_sbindir}/tmpwatch
75     %{_mandir}/man8/tmpwatch.8*
76    

  ViewVC Help
Powered by ViewVC 1.1.30