removed 'vkill' for now
[util-vserver.git] / util-vserver / util-vserver.spec.in
1 # $Id$
2
3 %define confdir         %_sysconfdir/vservers
4 %define pkglibdir       %_libdir/%name
5
6 Summary:        Linux virtual server utilities
7 Name:           @PACKAGE@
8 Version:        @VERSION@
9 Release:        0
10 Epoch:          0
11 License:        GPL
12 Group:          System Environment/Base
13 URL:            http://savannah.nongnu.org/projects/util-vserver/
14 Source0:        http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
15 BuildRoot:      %_tmppath/%name-%version-%release-root
16 Requires:       init(@PACKAGE@)
17 Requires:       %name-core = %epoch:%version-%release
18 Provides:       vserver = %epoch:%version-%release
19 Obsoletes:      vserver < %epoch:%version
20 BuildRequires:  mount vconfig gawk iproute
21 BuildRequires:  dietlibc gcc-c++
22
23 %package core
24 Summary:        The core-utilities for util-vserver
25 Group:          Applications/System
26
27 %package build
28 Summary:        Tools which can be used to build vservers
29 Group:          Applications/System
30 Requires:       %name = %epoch:%version-%release
31 Requires:       rpm apt
32
33 %package sysv
34 Summary:        SysV-initscripts for vserver
35 Group:          System Environment/Base
36 Provides:       init(@PACKAGE@)
37 Requires:       %name = %epoch:%version-%release
38 Requires:       initscripts
39
40 %package devel
41 Summary:        Header-files and libraries which are needed to develop vserver based applications
42 Group:          Development/Libraries
43 Requires:       pkgconfig
44
45
46 %description
47 This package provides the components and a framework to setup virtual
48 servers.  A virtual server runs inside a linux server. It is nevertheless
49 highly independent. As such, you can run various services with normal
50 configuration. The various vservers can't interact with each other and
51 can't interact with services in the main server.
52
53 This requires a special kernel supporting the new new_s_context and
54 set_ipv4root system call.
55
56 %description core
57 %description build
58 %description sysv
59 %description devel
60
61
62 %prep
63 %setup -q
64
65
66 %build
67 %configure --with-initrddir=%_initrddir --enable-release
68 %__make %{?_smp_mflags}
69
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 %__make DESTDIR="$RPM_BUILD_ROOT" install install-vserverdir
74
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79
80 %define v_services      httpd named portmap sendmail smb sshd xinetd
81 %post sysv
82 /sbin/chkconfig --add vservers
83 /sbin/chkconfig --add rebootmgr
84
85 for i in %v_services; do
86         /sbin/chkconfig --add v_$i
87 done
88
89
90 %preun sysv
91 test "$1" != 0 || for i in %v_services; do
92         /sbin/chkconfig --del v_$i
93 done
94
95 test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || :
96 test "$1" != 0 || /sbin/chkconfig --del rebootmgr
97 test "$1" != 0 || /sbin/chkconfig --del vservers
98
99
100 %postun sysv
101 test "$1" = 0  || %{_initrddir}/rebootmgr condrestart >/dev/null || :
102
103
104 %files
105 %defattr(-,root,root,-)
106 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
107 %doc doc/FAQ.txt
108 %pkglibdir
109 %exclude %pkglibdir/distributions
110 %exclude %pkglibdir/distrib-info
111 %exclude %pkglibdir/rpm-fake.so
112 %exclude %pkglibdir/util-vserver-vars
113 %exclude %pkglibdir/vapt-get*
114 %exclude %pkglibdir/vrpm*
115 %exclude %pkglibdir/vserver-build*
116 %exclude %pkglibdir/vserver-setup*
117 %exclude %pkglibdir/vunify
118 %_sbindir/rebootmgr
119 %_sbindir/vdu
120 %_sbindir/vfiles
121 %_sbindir/vps
122 %_sbindir/vpstree
123 %_sbindir/vserver
124 %_sbindir/vserver-stat
125 %_sbindir/vtop
126 %_mandir/*/*
127 %exclude %_mandir/*/chbind*
128 %exclude %_mandir/*/chcontext*
129 %exclude %_mandir/*/reducecap*
130 %exclude %_mandir/*/distrib-info*
131 %exclude %_mandir/*/vserver-copy*
132 %exclude %_mandir/*/vrpm*
133
134 %dir %confdir/.defaults
135 %dir %confdir/.defaults/*
136 %pkglibdir/defaults
137
138 %attr(000,root,root) %dir /vservers/.pkg
139 %attr(000,root,root) %dir /vservers
140
141 %dir /var/run/vservers
142 %dir /var/run/vservers/rev
143
144
145
146 %files core
147 %defattr(-,root,root,-)
148 %_sbindir/chbind
149 %_sbindir/chcontext
150 %_sbindir/ctx-kill
151 %_sbindir/new-namespace
152 %_sbindir/reducecap
153 %_sbindir/util-vserver-vars
154 %pkglibdir/util-vserver-vars
155 %_mandir/*/chbind*
156 %_mandir/*/chcontext*
157 %_mandir/*/reducecap*
158 %dir %pkglibdir
159
160
161 %files build
162 %defattr(-,root,root,-)
163 %_sbindir/vapt-get
164 %_sbindir/vrpm
165 %_sbindir/vserver-copy
166 %dir %pkglibdir
167 %pkglibdir/distributions
168 %pkglibdir/rpm-fake.so
169 %pkglibdir/vapt-get*
170 %pkglibdir/vrpm*
171 %pkglibdir/vserver-build*
172 %pkglibdir/vserver-setup*
173 %pkglibdir/vunify
174 %_mandir/*/distrib-info*
175 %_mandir/*/vserver-copy*
176 %exclude %_mandir/*/vrpm*
177
178 %dir %confdir/.distributions
179 %dir %confdir/.distributions/*
180 %dir %confdir/.distributions/*/apt
181 %config(noreplace) %confdir/.distributions/*/apt/sources.list
182
183
184
185 %files sysv
186 %defattr(-,root,root,-)
187 %_initrddir/*
188 %config(noreplace) %_sysconfdir/vservers.conf
189
190
191 %files devel
192 %defattr(-,root,root,-)
193 %_includedir/*.h
194 %_libdir/*.a
195 %_libdir/pkgconfig/*
196
197
198 %changelog
199 * Wed Oct  1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0
200 - Initial build.
201