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

Last change on this file since 2843 was 2066, checked in by achernya, 11 years ago
Merge branches/fc15-dev to trunk
File size: 3.3 KB
RevLine 
[1]1Summary: scripts.mit.edu AFS administration system
2Group: Applications/System
3Name: tokensys
[926]4Version: 0.%{scriptsversion}
[120]5Release: 0
[1]6Vendor: The scripts.mit.edu Team (scripts@mit.edu)
7URL: http://scripts.mit.edu
8License: GPL
[89]9Source: %{name}.tar.gz
[1]10BuildRoot: %{_tmppath}/%(%{__id_u} -n)-%{name}-%{version}-root
11%define debug_package %{nil}
[2066]12Prereq: /usr/bin/kinit, /usr/bin/aklog
13Requires(post): systemd-units
14Requires(preun): systemd-units
15Requires(postun): systemd-units
16BuildRequires: systemd-units
[1]17
[89]18%description
[1]19
20scripts.mit.edu AFS administration system
21Contains:
[89]22 - A shell script for renewing the scripts AFS credentials <renew>
[2066]23 - A shell script for configuring scripts AFS <scripts-afsagent-startup>
24 - systemd units for running the above
[1]25See http://scripts.mit.edu/wiki for more information.
26
27%prep
28%setup -q -n %{name}
29
30%build
[2066]31./configure --with-kinit=/usr/bin/kinit --with-aklog=/usr/bin/aklog --with-fs=/usr/bin/fs
[1]32
33%install
34[ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
35install -D renew $RPM_BUILD_ROOT/home/afsagent/renew
[2066]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
[1]40
41%clean
42[ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
43
44%files
[2066]45%defattr(0644,root,root)
46%{_unitdir}/*.service
47%{_unitdir}/*.timer
[1]48%defattr(0755, afsagent, afsagent)
49/home/afsagent/renew
[2066]50/usr/local/libexec/scripts-afsagent-startup
[1]51
52%pre
[920]53groupadd -g 101 afsagent || [ $? -eq 9 ]
54useradd -u 101 -g 101 afsagent || [ $? -eq 9 ]
[1]55
[2066]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
[1]77%postun
[2066]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
[919]84if [ "$1" = "0" ] ; then
85   userdel -r afsagent
86fi
[1]87
88%changelog
[2066]89* Mon Nov 21 2011  Quentin Smith <quentin@mit.edu>
90- add systemd units
91- remove crontab
92
[1594]93* Tue Aug 17 2010  Geoffrey Thomas <geofft@mit.edu>
94- aklog csail as well
95
[919]96* Wed Dec 31 2008  Quentin Smith <quentin@mit.edu>
97- only remove afsagent user on erase
[920]98- ignore preexisting user
[1]99
[282]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
[1]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.