- removed '#! /bin/bash' header
[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:      util-vserver-core = %epoch:%version-%release
17 Provides:       vserver = %epoch:%version-%release
18 Conflicts:      vserver < %epoch:%version
19 BuildRequires:  mount vconfig gawk iproute
20 BuildRequires:  dietlibc gcc-c++
21
22 %package core
23 Summary:        The core-utilities for util-vserver
24 Group:          Applications/System
25
26 %package sysv
27 Summary:        SysV-initscripts for vserver
28 Group:          System Environment/Base
29 Requires:       %name = %epoch:%version-%release
30 Requires:       initscripts
31
32 %package devel
33 Summary:        Header-files and libraries which are needed to develop vserver based applications
34 Group:          Development/Libraries
35 Requires:       pkgconfig
36
37 %description
38 This package provides the components and a framework to setup virtual
39 servers.  A virtual server runs inside a linux server. It is nevertheless
40 highly independent. As such, you can run various services with normal
41 configuration. The various vservers can't interact with each other and
42 can't interact with services in the main server.
43
44 This requires a special kernel supporting the new new_s_context and
45 set_ipv4root system call.
46
47 %description core
48 %description sysv
49 %description devel
50
51 %prep
52 %setup -q
53
54
55 %build
56 %configure
57 %__make %{?_smp_mflags}
58
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 %__make DESTDIR="$RPM_BUILD_ROOT" install
63
64 test "%_initrddir" = %_sysconfdir/init.d || {
65         mkdir -p ${RPM_BUILD_ROOT}%_initrddir
66         mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
67 }
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72
73 %define v_services      httpd named portmap sendmail smb sshd xinetd
74 %post sysv
75 /sbin/chkconfig --add vservers
76 /sbin/chkconfig --add rebootmgr
77
78 for i in %v_services; do
79         /sbin/chkconfig --add v_$i
80 done
81
82
83 %preun sysv
84 test "$1" != 0 || for i in %v_services; do
85         /sbin/chkconfig --del v_$i
86 done
87
88 test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || :
89 test "$1" != 0 || /sbin/chkconfig --del rebootmgr
90 test "$1" != 0 || /sbin/chkconfig --del vservers
91
92
93 %postun sysv
94 test "$1" = 0  || %{_initrddir}/rebootmgr condrestart >/dev/null || :
95
96
97 %files
98 %defattr(-,root,root,-)
99 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
100 %doc doc/FAQ.txt
101 %pkglibdir
102 %_sbindir/*
103 %_mandir/man8/*
104 %dir %confdir
105 %dir %confdir/.distributions
106 %dir %confdir/.distributions/rh*
107 %dir %confdir/.distributions/*/apt
108 %config(noreplace) %confdir/.distributions/*/apt/sources.list
109 %dir /var/run/vservers
110
111 %if 0
112 %files core
113 %defattr(-,root,root,-)
114 %dir %pkglibdir
115 %pkglibdir/filetime
116 %pkglibdir/
117 filetime ifspec listdevip mask2prefix readlink save_ctxinfo save_s_context secure-mount showattr showperm util-vserver-vars
118
119 chbind chcontext new-namespace reducecap setctxlimit util-vserver-vars
120 %endif
121
122 %files sysv
123 %defattr(-,root,root,-)
124 %_initrddir/*
125 %config(noreplace) %_sysconfdir/vservers.conf
126
127 %files devel
128 %defattr(-,root,root,-)
129 %_includedir/*.h
130 %_libdir/*.a
131 %_libdir/pkgconfig/*
132
133 %changelog
134 * Wed Oct  1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0
135 - Initial build.
136