# $Id$ %define confdir %_sysconfdir/vservers Summary: Linux virtual server utilities Name: @PACKAGE@ Version: @VERSION@ Release: 0 Epoch: 0 License: GPL Group: System Environment/Base URL: http://savannah.nongnu.org/projects/util-vserver/ Source0: http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2 BuildRoot: %_tmppath/%name-%version-%release-root Provides: vserver = %epoch:%version-%release Conflicts: vserver < %epoch:%version %package sysv Summary: SysV-initscripts for vserver Group: System Environment/Base Requires: %name = %epoch:%version-%release Requires: initscripts %package devel Summary: Header-files and libraries which are needed to develop vserver based applications Group: Development/Libraries %description This package provides the components and a framework to setup virtual servers. A virtual server runs inside a linux server. It is nevertheless highly independent. As such, you can run various services with normal configuration. The various vservers can't interact with each other and can't interact with services in the main server. This requires a special kernel supporting the new new_s_context and set_ipv4root system call. %description sysv %description devel %prep %setup -q %build %configure %__make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT %__make DESTDIR="$RPM_BUILD_ROOT" install test "%_initrddir" = %_sysconfdir/init.d || { mkdir -p ${RPM_BUILD_ROOT}%_initrddir mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/ } %clean rm -rf $RPM_BUILD_ROOT %define v_services httpd named portmap sendmail smb sshd xinetd %post sysv /sbin/chkconfig --add vservers /sbin/chkconfig --add rebootmgr for i in %v_services; do /sbin/chkconfig --add v_$i done %preun sysv test "$1" != 0 || for i in %v_services; do /sbin/chkconfig --del v_$i done test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || : test "$1" != 0 || /sbin/chkconfig --del rebootmgr test "$1" != 0 || /sbin/chkconfig --del vservers %postun sysv test "$1" = 0 || %{_initrddir}/rebootmgr condrestart >/dev/null || : %files %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README THANKS %doc doc/FAQ.txt %_libdir/%name %_sbindir/* %_mandir/man8/* %dir %confdir %dir %confdir/.distributions %dir %confdir/.distributions/rh* %dir %confdir/.distributions/*/apt %config(noreplace) %confdir/.distributions/*/apt/sources.list %files sysv %defattr(-,root,root,-) %_initrddir/* %config(noreplace) %_sysconfdir/vservers.conf %files devel %defattr(-,root,root,-) %_includedir/*.h %_libdir/*.a %changelog * Wed Oct 1 2003 Enrico Scholz - 0:0.23.5-0 - Initial build.