summaryrefslogtreecommitdiffstats
path: root/proxy/contrib/gssproxy.spec.in
blob: 668b9ae4c8279c59a7ab61fe2d31a2f59e4c8809 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 0@PRERELEASE_VERSION@%{?dist}
Group: Applications/System
Summary: System Security Services Daemon
License: MIT
URL: http://fedorahosted.org/gss-proxy/
Source0: %{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

### Patches ###

### Dependencies ###

Requires: krb5-libs
Requires: keyutils-libs
Requires(post): initscripts chkconfig /sbin/ldconfig
Requires(preun):  initscripts chkconfig
Requires(postun): initscripts chkconfig /sbin/ldconfig

%global servicename gssproxy
%global gsspstatedir %{_localstatedir}/lib/gssproxy
%global pipepath %{gsspstatedir}/pipes
%global pubconfpath %{sysconfdir}/gssproxy

### Build Dependencies ###

BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: m4
%{?fedora:BuildRequires: popt-devel}
%if 0%{?rhel} <= 5
BuildRequires: popt
%endif
%if 0%{?rhel} >= 6
BuildRequires: popt-devel
%endif
BuildRequires: libxslt
BuildRequires: libxml2
BuildRequires: docbook-style-xsl
BuildRequires: krb5-devel
BuildRequires: doxygen
BuildRequires: libselinux-devel
BuildRequires: keyutils-libs-devel
BuildRequires: gettext-devel
BuildRequires: pkgconfig
BuildRequires: findutils

%description
A proxy for GSSAPI credential handling

%prep
%setup -q

%build

# RHEL 5 uses an old libtool, so we need to force it to reconfigure
# This is safe to do on newer packages too, as it will just
# gather the appropriate m4 files from the libtool package
for i in libtool.m4  lt~obsolete.m4  ltoptions.m4  ltsugar.m4  ltversion.m4
do
    find . -name $i -exec rm -f {} \;
done

autoreconf -ivf

%configure \
    --with-pipe-path=%{pipepath} \
    --with-pubconf-path=%{pubconfpath} \
    --with-init-dir=%{_initrddir} \
    --disable-static \
    --disable-rpath

make %{?_smp_mflags} all


# Only build docs on recent distros
%if 0%{?fedora}
make %{?_smp_mflags} docs
%endif

%if 0%{?rhel} >= 6
make %{?_smp_mflags} docs
%endif

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# Prepare language files
/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT gssproxy

# Remove .la files created by libtool
find $RPM_BUILD_ROOT -name "*.la" -exec rm -f {} \;

# Suppress developer-only documentation
rm -Rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name}/doc

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc COPYING
%doc examples/gssproxy-example.conf
%{_initrddir}/%{name}
%{_sbindir}/gssproxy
%{_libdir}/%{name}/
%dir %{gsspstatedir}
%attr(755,root,root) %dir %{pipepath}
%attr(755,root,root) %dir %{pubconfpath}
%attr(750,root,root) %dir %{_var}/log/%{name}
%attr(711,root,root) %dir %{_sysconfdir}/gssproxy
%ghost %attr(0600,root,root) %config(noreplace) %%{_sysconfdir}/gssproxy/gssproxy.conf
%{_mandir}/man5/gssproxy.conf.5*
%{_mandir}/man8/gssproxy.8*

%post
/sbin/ldconfig
/sbin/chkconfig --add %{servicename}

if [ $1 -ge 1 ] ; then
    /sbin/service %{servicename} condrestart 2>&1 > /dev/null
fi

%preun
if [ $1 = 0 ]; then
    /sbin/service %{servicename} stop 2>&1 > /dev/null
    /sbin/chkconfig --del %{servicename}
fi

%postun -p /sbin/ldconfig

%post client -p /sbin/ldconfig

%postun client -p /sbin/ldconfig

%changelog
* Mon Dec 12 2011 Simo Sorce <simo@redhat.com> - @PACKAGE_VERSION@-0@PRERELEASE_VERSION@
- Automated build of the gssproxy daemon