This commit was generated by cvs2svn to compensate for changes in r136,
[util-vserver.git] / util-vserver.spec
1 %define __chattr        /usr/bin/chattr
2
3 Summary:        Linux virtual server utilities
4 Name:           util-vserver
5 Version:        0.30
6 Release:        0
7 Epoch:          0
8 Copyright:      GPL
9 Group:          System Environment/Base
10 URL:            http://savannah.nongnu.org/projects/util-vserver/
11 Source0:        http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
12 Provides:       %name-devel = %epoch:%version-%release
13 BuildRoot:      %_tmppath/%name-%version-%release-root
14 Provides:       vserver = %epoch:%version-%release
15 Conflicts:      vserver < %epoch:%version-%release
16 Conflicts:      vserver > %epoch:%version-%release
17 BuildRequires:  e2fsprogs-devel
18 Requires(post): %__chattr
19
20 %package linuxconf
21 Summary:        Linuxconf administration modules for vservers
22 Group:          Applications/System
23 Requires:       %name = %epoch:%version-%release
24 Provides:       vserver-admin = %epoch:%version-%release
25 Conflicts:      vserver-admin < %epoch:%version-%release
26 Conflicts:      vserver-admin > %epoch:%version-%release
27
28 %description
29 This package provides the components and a framework to setup virtual
30 servers.  A virtual server runs inside a linux server. It is nevertheless
31 highly independent. As such, you can run various services with normal
32 configuration. The various vservers can't interact with each other and
33 can't interact with services in the main server.
34
35 This requires a special kernel supporting the new new_s_context and
36 set_ipv4root system call.
37
38
39 %description linuxconf
40 This package provides the components to setup virtual servers with
41 linuxconf.
42
43
44 %prep
45 %setup -q
46
47
48 %build
49 %configure --enable-linuxconf
50 %__make %{?_smp_mflags}
51
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 %__make DESTDIR=$RPM_BUILD_ROOT install
56
57 mkdir -p $RPM_BUILD_ROOT/vservers
58 test "%_initrddir" = %_sysconfdir/init.d || {
59         mkdir -p ${RPM_BUILD_ROOT}%_initrddir
60         mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
61 }
62
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67
68 %define v_services      httpd named portmap sendmail smb sshd xinetd
69 %post
70 /sbin/chkconfig --add vservers
71 /sbin/chkconfig --add rebootmgr
72
73 for i in %v_services; do
74         /sbin/chkconfig --add v_$i
75 done
76
77 %__chattr +t /vservers || :
78
79
80 %preun
81 test "$1" != 0 || for i in %v_services; do
82         /sbin/chkconfig --del v_$i
83 done
84
85 test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || :
86 test "$1" != 0 || /sbin/chkconfig --del rebootmgr
87 test "$1" != 0 || /sbin/chkconfig --del vservers
88
89
90 %postun
91 test "$1" = 0  || %{_initrddir}/rebootmgr condrestart >/dev/null || :
92
93
94 %files
95 %defattr(-,root,root)
96 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
97 %_sbindir/*
98 %_libdir/%name
99 %_includedir/vserver.h
100 %_libdir/libvserver.a
101 %_mandir/man8/*
102 %config %_initrddir/*
103 %config(noreplace) /etc/vservers.conf
104 %attr(0,root,root) %dir /vservers
105
106 %exclude %_sbindir/newvserver
107 %exclude %_mandir/man8/newvserver*
108
109
110 %files linuxconf
111 %defattr(-,root,root)
112 %config(noreplace) /etc/vservers/newvserver.defaults
113 %_sbindir/newvserver
114 %_mandir/man8/newvserver*
115
116
117 %changelog
118 * Thu Mar 18 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.3-0
119 - removed '%%doc doc/FAQ.txt' since file does not exist anymore
120
121 * Fri Sep 26 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.4-1
122 - initial build.