summaryrefslogtreecommitdiffstats
path: root/credmonger.spec
blob: f6e59ebb76d653c081ce1073b8d42caf2445abdd (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
Name:		credmonger
Version:	0.0
Release:	1%{?dist}
Summary:	maintain 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):	/sbin/chkconfig
Requires(preun):	/sbin/chkconfig, /sbin/service
Requires(postun):	/sbin/service

%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 2>&1 > /dev/null || :
	/sbin/chkconfig --del credmonger
fi

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

%files
%defattr(-,root,root,-)
%doc LICENSE
%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