1 %define name util-vserver-pl
3 %define release 1%{?pldistro:.%{pldistro}}%{?date:.%{date}}
5 %define python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
7 Summary: PlanetLab extensions to util-vserver
12 Group: System Environment/Base
13 Source0: %{name}-%{version}.tar.bz2
14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15 Requires: util-vserver util-vserver-core util-vserver-build util-vserver-sysv
16 Provides: util-vserver-python = %{version}-%{release}
17 Obsoletes: util-vserver-py32 resman
18 BuildRequires: util-vserver-core util-vserver-devel
19 BuildRequires: autoconf automake libtool
22 This package contains all PlanetLab extensions to util-vserver.
36 make DESTDIR=%{buildroot} install
38 mkdir %{buildroot}/bin
39 ln -s ..%{_sbindir}/vsh %{buildroot}/bin/vsh
41 rm -f %{buildroot}%{python_sitearch}/vserverimpl.a
42 rm -f %{buildroot}%{python_sitearch}/vserverimpl.la
44 # Generate file list for python package
45 find "%{buildroot}" -name '*.py' | { while read FILE; do
46 f="${FILE#%{buildroot}}"
48 # need to touch these files, as they are not produced on FC4 or below
53 done } > %name-python.list
57 # add /bin/vsh to list of secure shells
58 if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then
59 echo /bin/vsh >> /etc/shells
64 # 0 = erase, 1 = upgrade
65 if [ "$1" = 0 ] ; then
66 perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
74 %files -f %name-python.list
75 %defattr(-,root,root,-)
80 %{python_sitearch}/vserverimpl.so
82 %attr(4755,root,root) %{_sbindir}/vsh
84 %{_mandir}/man8/vsh.8*
86 %{_sbindir}/vip6-autod
87 %{_sysconfdir}/init.d/vip6-autod
90 %{_sysconfdir}/cron.d/vcached.cron
91 %{_sysconfdir}/logrotate.d/vcached.logrotate
95 * Fri Nov 30 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1