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