merged with VERSION_0_23 branch
[util-vserver.git] / util-vserver / vserver.spec.in
1 Summary:        Linux virtual server utilities
2 Name:           @PACKAGE@
3 Version:        @VERSION@
4 Release:        0
5 Epoch:          0
6 Copyright:      GPL
7 Group:          System Environment/Base
8 URL:            http://savannah.nongnu.org/projects/util-vserver/
9 Source0:        http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
10 Provides:       %name-devel = %epoch:%version-%release
11 BuildRoot:      %_tmppath/%name-%version-%release-root
12 Provides:       vserver = %epoch:%version-%release
13 Conflicts:      vserver < %epoch:%version
14
15
16 %description
17 This package provides the components and a framework to setup virtual
18 servers.  A virtual server runs inside a linux server. It is nevertheless
19 highly independent. As such, you can run various services with normal
20 configuration. The various vservers can't interact with each other and
21 can't interact with services in the main server.
22
23 This requires a special kernel supporting the new new_s_context and
24 set_ipv4root system call.
25
26
27 %prep
28 %setup -q
29
30
31 %build
32 %configure
33 %__make %{?_smp_mflags}
34
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38 %__make DESTDIR=$RPM_BUILD_ROOT install
39
40 test "%_initrddir" = %_sysconfdir/init.d || {
41         mkdir -p ${RPM_BUILD_ROOT}%_initrddir
42         mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
43 }
44
45
46 %clean
47 rm -rf $RPM_BUILD_ROOT
48
49
50 %define v_services      httpd named portmap sendmail smb sshd xinetd
51 %post
52 /sbin/chkconfig --add vservers
53 /sbin/chkconfig --add rebootmgr
54
55 for i in %v_services; do
56         /sbin/chkconfig --add v_$i
57 done
58
59
60 %preun
61 test "$1" != 0 || for i in %v_services; do
62         /sbin/chkconfig --del v_$i
63 done
64
65 test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || :
66 test "$1" != 0 || /sbin/chkconfig --del rebootmgr
67 test "$1" != 0 || /sbin/chkconfig --del vservers
68
69
70 %postun
71 test "$1" = 0  || %{_initrddir}/rebootmgr condrestart >/dev/null || :
72
73
74 %files
75 %defattr(-,root,root)
76 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
77 %doc doc/FAQ.txt
78 %_sbindir/*
79 %_libdir/%name
80 %_includedir/vserver.h
81 %_libdir/libvserver.a
82 %_mandir/man8/*
83 %config %_initrddir/*
84 %config(noreplace) /etc/vservers/newvserver.defaults
85 %config(noreplace) /etc/vservers.conf
86
87
88 %changelog
89
90 * Fri Sep 26 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.4-1
91 - initial build.