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