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