summaryrefslogtreecommitdiffstats
path: root/credmonger.spec
blob: e44cd589afa15cb892f5028a17a7bd775390d9bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Name:		credmonger
Version:	0.1
Release:	1%{?dist}
Summary:	Maintains Kerberos credential caches for other processes

Group:		System Environment/Daemons
License:	MIT
URL:		https://badvocacy.net/
Source0:	credmonger-%{version}.tar.gz
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires:	krb5-devel
Requires(post):	chkconfig
Requires(preun):	chkconfig, initscripts
Requires(postun):	initscripts

%description
The credmonger daemon creates and refreshes Kerberos credential cache
files on behalf of other processes and users, which are typically daemons
which need to authenticate to other services using Kerberos.

%prep
%setup -q


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
install -m755 src/credmonger.init $RPM_BUILD_ROOT/%{_initrddir}/credmonger

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add credmonger

%preun
if [ "$1" -eq 0 ] ; then
	/sbin/service credmonger stop > /dev/null 2>&1 || :
	/sbin/chkconfig --del credmonger
fi
exit 0

%postun
if [ "$1" -ge 1 ] ; then
	/sbin/service credmonger condrestart > /dev/null 2>&1 || :
fi
exit 0

%files
%defattr(-,root,root,-)
%doc LICENSE src/credmonger.sample
%dir %{_sysconfdir}/credmonger.d
%config(noreplace) %{_sysconfdir}/credmonger.d/*
%{_initrddir}/credmonger
%{_sbindir}/*
%{_mandir}/*/*

%changelog
* Wed Apr  1 2009 Nalin Dahyabhai <nalin@redhat.com> 0.0-1
- initial package