rewrote it
[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
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/vkill
122 %_sbindir/vps
123 %_sbindir/vpstree
124 %_sbindir/vserver
125 %_sbindir/vserver-stat
126 %_sbindir/vtop
127 %_mandir/*/*
128 %exclude %_mandir/*/chbind*
129 %exclude %_mandir/*/chcontext*
130 %exclude %_mandir/*/reducecap*
131 %exclude %_mandir/*/distrib-info*
132 %exclude %_mandir/*/vserver-copy*
133 %exclude %_mandir/*/vrpm*
134
135 %dir %confdir/.defaults
136 %dir %confdir/.defaults/*
137 %pkglibdir/defaults
138
139 %attr(000,root,root) %dir /vservers/.pkg
140 %attr(000,root,root) %dir /vservers
141
142 %dir /var/run/vservers
143 %dir /var/run/vservers/rev
144
145
146
147 %files core
148 %defattr(-,root,root,-)
149 %_sbindir/chbind
150 %_sbindir/chcontext
151 %_sbindir/ctx-kill
152 %_sbindir/new-namespace
153 %_sbindir/reducecap
154 %_sbindir/util-vserver-vars
155 %pkglibdir/util-vserver-vars
156 %_mandir/*/chbind*
157 %_mandir/*/chcontext*
158 %_mandir/*/reducecap*
159 %dir %pkglibdir
160
161
162 %files build
163 %defattr(-,root,root,-)
164 %_sbindir/vapt-get
165 %_sbindir/vrpm
166 %_sbindir/vserver-copy
167 %dir %pkglibdir
168 %pkglibdir/distributions
169 %pkglibdir/rpm-fake.so
170 %pkglibdir/vapt-get*
171 %pkglibdir/vrpm*
172 %pkglibdir/vserver-build*
173 %pkglibdir/vserver-setup*
174 %pkglibdir/vunify
175 %_mandir/*/distrib-info*
176 %_mandir/*/vserver-copy*
177 %exclude %_mandir/*/vrpm*
178
179 %dir %confdir/.distributions
180 %dir %confdir/.distributions/*
181 %dir %confdir/.distributions/*/apt
182 %config(noreplace) %confdir/.distributions/*/apt/sources.list
183
184
185
186 %files sysv
187 %defattr(-,root,root,-)
188 %_initrddir/*
189 %config(noreplace) %_sysconfdir/vservers.conf
190
191
192 %files devel
193 %defattr(-,root,root,-)
194 %_includedir/*.h
195 %_libdir/*.a
196 %_libdir/pkgconfig/*
197
198
199 %changelog
200 * Wed Oct  1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0
201 - Initial build.
202