OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 09-Oct-2007 16:52:26
Branch: HEAD Handle: 2007100915522600
Modified files:
openpkg-src/heimdal heimdal.spec
Log:
first cut for with_server=no support similar what we have in
'kerberos' package
Summary:
Revision Changes Path
1.12 +32 -5 openpkg-src/heimdal/heimdal.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/heimdal/heimdal.spec
============================================================================
$ cvs diff -u -r1.11 -r1.12 heimdal.spec
--- openpkg-src/heimdal/heimdal.spec 9 Oct 2007 14:09:38 -0000 1.11
+++ openpkg-src/heimdal/heimdal.spec 9 Oct 2007 14:52:26 -0000 1.12
@@ -36,8 +36,9 @@
Release: 20071009
# package options
-%option with_fsl yes
-%option with_ldap no
+%option with_fsl yes
+%option with_server yes
+%option with_ldap no
# list of sources
Source0: ftp://ftp.pdc.kth.se/pub/heimdal/src/heimdal-%{version}.tar.gz
@@ -157,12 +158,14 @@
# create additional directories
%{l_shtool} mkdir -p -m 755 \
+%if "%{with_server}" == "yes"
$RPM_BUILD_ROOT%{l_prefix}/var/heimdal/log \
$RPM_BUILD_ROOT%{l_prefix}/var/heimdal/run \
$RPM_BUILD_ROOT%{l_prefix}/var/heimdal/db \
- $RPM_BUILD_ROOT%{l_prefix}/etc/heimdal \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
+ $RPM_BUILD_ROOT%{l_prefix}/etc/fsl \
+%endif
+ $RPM_BUILD_ROOT%{l_prefix}/etc/heimdal
# strip down installation
rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
@@ -174,6 +177,11 @@
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
+ # strip down installation (server-related only)
+%if "%{with_server}" != "yes"
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/*
+%endif
+
# provide executable wrappers
%{l_shtool} mkdir -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/libexec/heimdal
@@ -189,6 +197,7 @@
) >$RPM_BUILD_ROOT%{l_prefix}/bin/$bin
chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
done
+%if "%{with_server}" == "yes"
for bin in \
hprop hpropd iprop-log ipropd-master ipropd-slave kadmin kadmind \
kcm kdc kdigest kimpersonate kpasswdd kstash ktutil; do
@@ -201,36 +210,50 @@
) >$RPM_BUILD_ROOT%{l_prefix}/sbin/$bin
chmod 755 $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin
done
+%endif
# install setup script
+%if "%{with_server}" == "yes"
%{l_shtool} install -c -m 755 %{l_value -s -a} \
-e 's;@l_bash@;%{l_bash};g' \
%{SOURCE heimdal-setup.sh} \
$RPM_BUILD_ROOT%{l_prefix}/sbin/heimdal-setup
+%endif
# install run-command script
+%if "%{with_server}" == "yes"
%{l_shtool} install -c -m 755 %{l_value -s -a} \
%{SOURCE rc.heimdal} \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+%endif
# install default configuration files
%{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE krb5.conf} %{SOURCE kdc.conf} \
+ %{SOURCE krb5.conf} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/heimdal/
+%if "%{with_server}" == "yes"
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
+ %{SOURCE kdc.conf} \
$RPM_BUILD_ROOT%{l_prefix}/etc/heimdal/
%{l_shtool} install -c -m 644 \
/dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/heimdal/ipropd.master
%{l_shtool} install -c -m 644 \
/dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/heimdal/ipropd.slaves
+%endif
# install OSSP fsl configuration
+%if "%{with_server}" == "yes"
%{l_shtool} install -c -m 644 %{l_value -s -a} \
%{SOURCE fsl.heimdal} \
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
+%endif
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
+%if "%{with_server}" == "yes"
'%config %{l_prefix}/etc/fsl/fsl.heimdal' \
+%endif
'%config %{l_prefix}/etc/heimdal/*.conf'
%files -f files
@@ -247,6 +270,7 @@
%post
# initial hints
+%if "%{with_server}" == "yes"
if [ $1 -eq 1 ]; then
# display information about next steps
( echo "Before you can use Heimdal you have to choose the"
@@ -316,13 +340,16 @@
eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
[ ".$heimdal_active" = .yes ] && %{l_rc} heimdal start
exit 0
+%endif
%preun
# before erase, stop service and remove log files
+%if "%{with_server}" == "yes"
[ $1 -eq 0 ] || exit 0
%{l_rc} heimdal stop 2>/dev/null
rm -f $RPM_INSTALL_PREFIX/var/heimdal/log/* >/dev/null 2>&1 || true
rm -f $RPM_INSTALL_PREFIX/var/heimdal/run/* >/dev/null 2>&1 || true
rm -f $RPM_INSTALL_PREFIX/var/heimdal/db/* >/dev/null 2>&1 || true
exit 0
+%endif
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]