source: trunk/server/fedora/specs/tokensys.spec @ 2493

Last change on this file since 2493 was 2066, checked in by achernya, 13 years ago
Merge branches/fc15-dev to trunk
File size: 3.3 KB
Line 
1Summary: scripts.mit.edu AFS administration system
2Group: Applications/System
3Name: tokensys
4Version: 0.%{scriptsversion}
5Release: 0
6Vendor: The scripts.mit.edu Team (scripts@mit.edu)
7URL: http://scripts.mit.edu
8License: GPL
9Source: %{name}.tar.gz
10BuildRoot: %{_tmppath}/%(%{__id_u} -n)-%{name}-%{version}-root
11%define debug_package %{nil}
12Prereq: /usr/bin/kinit, /usr/bin/aklog
13Requires(post): systemd-units
14Requires(preun): systemd-units
15Requires(postun): systemd-units
16BuildRequires: systemd-units
17
18%description
19
20scripts.mit.edu AFS administration system
21Contains:
22 - A shell script for renewing the scripts AFS credentials <renew>
23 - A shell script for configuring scripts AFS <scripts-afsagent-startup>
24 - systemd units for running the above
25See http://scripts.mit.edu/wiki for more information.
26
27%prep
28%setup -q -n %{name}
29
30%build
31./configure --with-kinit=/usr/bin/kinit --with-aklog=/usr/bin/aklog --with-fs=/usr/bin/fs
32
33%install
34[ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
35install -D renew $RPM_BUILD_ROOT/home/afsagent/renew
36install -D scripts-afsagent-startup $RPM_BUILD_ROOT/usr/local/libexec/scripts-afsagent-startup
37install -D scripts-afsagent-startup.service $RPM_BUILD_ROOT%{_unitdir}/scripts-afsagent-startup.service
38install -D scripts-afsagent.service $RPM_BUILD_ROOT%{_unitdir}/scripts-afsagent.service
39install -D scripts-afsagent.timer $RPM_BUILD_ROOT%{_unitdir}/scripts-afsagent.timer
40
41%clean
42[ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
43
44%files
45%defattr(0644,root,root)
46%{_unitdir}/*.service
47%{_unitdir}/*.timer
48%defattr(0755, afsagent, afsagent)
49/home/afsagent/renew
50/usr/local/libexec/scripts-afsagent-startup
51
52%pre
53groupadd -g 101 afsagent || [ $? -eq 9 ]
54useradd -u 101 -g 101 afsagent || [ $? -eq 9 ]
55
56%post
57/bin/systemctl enable scripts-afsagent-startup.service >/dev/null 2>&1 || :
58/bin/systemctl enable scripts-afsagent.service >/dev/null 2>&1 || :
59/bin/systemctl enable scripts-afsagent.timer >/dev/null 2>&1 || :
60
61if [ $1 -eq 1 ] ; then
62    # Initial installation
63    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
64fi
65
66%preun
67if [ $1 -eq 0 ] ; then
68    # Package removal, not upgrade
69    /bin/systemctl --no-reload disable scripts-afsagent-startup.service > /dev/null 2>&1 || :
70    /bin/systemctl --no-reload disable scripts-afsagent.service > /dev/null 2>&1 || :
71    /bin/systemctl --no-reload disable scripts-afsagent.timer > /dev/null 2>&1 || :
72    /bin/systemctl stop scripts-afsagent-startup.service > /dev/null 2>&1 || :
73    /bin/systemctl stop scripts-afsagent.service > /dev/null 2>&1 || :
74    /bin/systemctl stop scripts-afsagent.timer > /dev/null 2>&1 || :
75fi
76
77%postun
78/bin/systemctl daemon-reload >/dev/null 2>&1 || :
79if [ $1 -ge 1 ] ; then
80    # Package upgrade, not uninstall
81    /bin/systemctl try-restart scripts-afsagent.service >/dev/null 2>&1 || :
82fi
83
84if [ "$1" = "0" ] ; then
85   userdel -r afsagent
86fi
87
88%changelog
89* Mon Nov 21 2011  Quentin Smith <quentin@mit.edu>
90- add systemd units
91- remove crontab
92
93* Tue Aug 17 2010  Geoffrey Thomas <geofft@mit.edu>
94- aklog csail as well
95
96* Wed Dec 31 2008  Quentin Smith <quentin@mit.edu>
97- only remove afsagent user on erase
98- ignore preexisting user
99
100* Wed Apr 11 2007  Joe Presbrey <presbrey@mit.edu>
101- crontab moved system-wide (/etc/cron.d) to isolate from fail-over cron service
102
103* Sat Sep 30 2006  Jeff Arnold <jbarnold@MIT.EDU> 0.00
104- initial prerelease version
Note: See TracBrowser for help on using the repository browser.