61c3ede0ec572f565e6d88b0bf68fa4dc89f313f
[util-vserver.git] / util-vserver / util-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 %package linuxconf
16 Summary:        Linuxconf administration modules for vservers
17 Group:          Applications/System
18 Requires:       %name = %epoch:%version-%release
19 Provides:       vserver-admin = %epoch:%version-%release
20 Conflicts:      vserver-admin < %epoch:%version
21
22 %description
23 This package provides the components and a framework to setup virtual
24 servers.  A virtual server runs inside a linux server. It is nevertheless
25 highly independent. As such, you can run various services with normal
26 configuration. The various vservers can't interact with each other and
27 can't interact with services in the main server.
28
29 This requires a special kernel supporting the new new_s_context and
30 set_ipv4root system call.
31
32
33 %description linuxconf
34 This package provides the components to setup virtual servers with
35 linuxconf.
36
37
38 %prep
39 %setup -q
40
41
42 %build
43 %configure
44 %__make %{?_smp_mflags}
45
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 %__make DESTDIR=$RPM_BUILD_ROOT install
50
51 test "%_initrddir" = %_sysconfdir/init.d || {
52         mkdir -p ${RPM_BUILD_ROOT}%_initrddir
53         mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
54 }
55
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60
61 %define v_services      httpd named portmap sendmail smb sshd xinetd
62 %post
63 /sbin/chkconfig --add vservers
64 /sbin/chkconfig --add rebootmgr
65
66 for i in %v_services; do
67         /sbin/chkconfig --add v_$i
68 done
69
70
71 %preun
72 test "$1" != 0 || for i in %v_services; do
73         /sbin/chkconfig --del v_$i
74 done
75
76 test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || :
77 test "$1" != 0 || /sbin/chkconfig --del rebootmgr
78 test "$1" != 0 || /sbin/chkconfig --del vservers
79
80
81 %postun
82 test "$1" = 0  || %{_initrddir}/rebootmgr condrestart >/dev/null || :
83
84
85 %files
86 %defattr(-,root,root)
87 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
88 %doc doc/FAQ.txt
89 %_sbindir/*
90 %_libdir/%name
91 %_includedir/vserver.h
92 %_libdir/libvserver.a
93 %_mandir/man8/*
94 %config %_initrddir/*
95 %config(noreplace) /etc/vservers.conf
96
97 %exclude %_sbindir/newvserver
98 %exclude %_mandir/man8/newvserver*
99
100
101 %files linuxconf
102 %defattr(-,root,root)
103 %config(noreplace) /etc/vservers/newvserver.defaults
104 %_sbindir/newvserver
105 %_mandir/man8/newvserver*
106
107
108 %changelog
109
110 * Fri Sep 26 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.4-1
111 - initial build.