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