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