added rcs2log support
[util-vserver.git] / util-vserver / util-vserver.spec.in
1 # $Id$
2
3 %define confdir %_sysconfdir/vservers
4
5 Summary:        Linux virtual server utilities
6 Name:           @PACKAGE@
7 Version:        @VERSION@
8 Release:        0
9 Epoch:          0
10 License:        GPL
11 Group:          System Environment/Base
12 URL:            http://savannah.nongnu.org/projects/util-vserver/
13 Source0:        http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
14 BuildRoot:      %_tmppath/%name-%version-%release-root
15 Provides:       vserver = %epoch:%version-%release
16 Conflicts:      vserver < %epoch:%version
17
18 %package sysv
19 Summary:        SysV-initscripts for vserver
20 Group:          System Environment/Base
21 Requires:       %name = %epoch:%version-%release
22 Requires:       initscripts
23
24 %package devel
25 Summary:        Header-files and libraries which are needed to develop vserver based applications
26 Group:          Development/Libraries
27
28
29 %description
30 This package provides the components and a framework to setup virtual
31 servers.  A virtual server runs inside a linux server. It is nevertheless
32 highly independent. As such, you can run various services with normal
33 configuration. The various vservers can't interact with each other and
34 can't interact with services in the main server.
35
36 This requires a special kernel supporting the new new_s_context and
37 set_ipv4root system call.
38
39 %description sysv
40 %description devel
41
42 %prep
43 %setup -q
44
45
46 %build
47 %configure
48 %__make %{?_smp_mflags}
49
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 %__make DESTDIR="$RPM_BUILD_ROOT" install
54
55 test "%_initrddir" = %_sysconfdir/init.d || {
56         mkdir -p ${RPM_BUILD_ROOT}%_initrddir
57         mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
58 }
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63
64 %define v_services      httpd named portmap sendmail smb sshd xinetd
65 %post sysv
66 /sbin/chkconfig --add vservers
67 /sbin/chkconfig --add rebootmgr
68
69 for i in %v_services; do
70         /sbin/chkconfig --add v_$i
71 done
72
73
74 %preun sysv
75 test "$1" != 0 || for i in %v_services; do
76         /sbin/chkconfig --del v_$i
77 done
78
79 test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || :
80 test "$1" != 0 || /sbin/chkconfig --del rebootmgr
81 test "$1" != 0 || /sbin/chkconfig --del vservers
82
83
84 %postun sysv
85 test "$1" = 0  || %{_initrddir}/rebootmgr condrestart >/dev/null || :
86
87
88 %files
89 %defattr(-,root,root,-)
90 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
91 %doc doc/FAQ.txt
92 %_libdir/%name
93 %_sbindir/*
94 %_mandir/man8/*
95 %dir %confdir
96 %dir %confdir/.distributions
97 %dir %confdir/.distributions/rh*
98 %dir %confdir/.distributions/*/apt
99 %config(noreplace) %confdir/.distributions/*/apt/sources.list
100
101 %files sysv
102 %defattr(-,root,root,-)
103 %_initrddir/*
104 %config(noreplace) %_sysconfdir/vservers.conf
105
106 %files devel
107 %defattr(-,root,root,-)
108 %_includedir/*.h
109 %_libdir/*.a
110
111 %changelog
112 * Wed Oct  1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0
113 - Initial build.
114