]> git.pld-linux.org Git - packages/vzctl.git/blob - vzctl.spec
- cleaning up more RH-mess
[packages/vzctl.git] / vzctl.spec
1 %define _pkglibdir %{_libdir}/vzctl
2 %define _configdir %{_sysconfdir}/vz
3 %define _scriptdir /usr/share/vzctl/scripts
4 %define _vpsconfdir /etc/sysconfig/vz-scripts
5 %define _netdir /etc/sysconfig/network-scripts
6 %define _logrdir /etc/logrotate.d
7 %define _distconfdir %{_configdir}/dists
8 %define _namesdir %{_configdir}/names
9 %define _distscriptdir %{_distconfdir}/scripts
10 %define _udevrulesdir /etc/udev/rules.d
11 %define _bashcdir /etc/bash_completion.d
12
13 Summary:        OpenVZ containers control utility
14 Summary(pl.UTF-8):      Narzędzie do zarządzania środowiskiem wirtualnym OpenVZ
15 Name:           vzctl
16 Version:        3.0.25.1
17 Release:        0.1
18 License:        GPL
19 Group:          Base/Kernel
20 Source0:        http://download.openvz.org/utils/vzctl/%{version}/src/%{name}-%{version}.tar.bz2
21 # Source0-md5:  5798ea88d06afff1d6d1bbbfc45899f1
22 URL:            http://openvz.org/
23 Requires:       %{name}-lib = %{version}-%{release}
24 # these reqs are for vz helper scripts
25 Requires:       /sbin/chkconfig
26 Requires:       bash
27 Requires:       ed
28 Requires:       fileutils
29 Requires:       gawk
30 Requires:       grep
31 Requires:       sed
32 Requires:       tar
33 Requires:       vzquota >= 2.7.0-4
34 # requires for vzmigrate purposes
35 Suggests:       gawk
36 Suggests:       openssh
37 Suggests:       rsync
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 This utility allows system administator to control OpenVZ containers,
42 i.e. create, start, shutdown, set various options and limits etc.
43
44 %description -l pl.UTF-8
45 Narzędzia vztcl pozwalają kontrolować środowisko wirtualne (kontener)
46 OpenVZ, jak na przykład: utworzenie, zatrzymanie, wyłączenie kontenera
47 oraz umożliwia ustawienie opcji i limitów dotyczących kontenera.
48
49 %package lib
50 Summary:        OpenVZ containers control API library
51 Group:          Base/Kernel
52
53 %description lib
54 OpenVZ containers control API library.
55
56 %prep
57 %setup -q
58
59 %build
60 %configure \
61         --enable-bashcomp \
62         --enable-logrotate \
63         --disable-static
64
65 %{__make}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 %{__make} install install-redhat \
70         vpsconfdir=%{_vpsconfdir} \
71         DESTDIR=$RPM_BUILD_ROOT
72
73 ln -s ../sysconfig/vz-scripts $RPM_BUILD_ROOT%{_configdir}/conf
74 ln -s ../vz/vz.conf $RPM_BUILD_ROOT/etc/sysconfig/vz
75
76 # Needed for ghost in files section below
77 mkdir $RPM_BUILD_ROOT/etc/cron.d/
78 touch $RPM_BUILD_ROOT/etc/cron.d/vz
79
80 # .so could go to vzctl-lib-devel, but since we don't have it...
81 rm -f $RPM_BUILD_ROOT%{_libdir}/libvzctl.{la,so}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 /bin/rm -rf /dev/vzctl
88 /bin/mknod -m 600 /dev/vzctl c 126 0
89 if [ -f %{_configdir}/vz.conf ]; then
90         if ! grep "IPTABLES=" %{_configdir}/vz.conf >/dev/null 2>&1; then
91                 echo 'IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"' >> %{_configdir}/vz.conf
92         fi
93 fi
94 /sbin/chkconfig --add vz
95
96 %preun
97 if [ $1 = 0 ]; then
98         /sbin/chkconfig --del vz
99 fi
100
101 %post   lib -p /sbin/ldconfig
102
103 %files
104 %defattr(644,root,root,755)
105 %doc ChangeLog
106 %attr(754,root,root) /etc/rc.d/init.d/vz*
107 %ghost /etc/cron.d/vz
108
109 %dir /vz
110 /vz/[dlt]*
111 %dir %attr(700,root,root) /vz/private
112 %dir %attr(700,root,root) /vz/root
113 /var/lib/vzctl/veip
114
115 %dir %{_configdir}
116 %dir %{_namesdir}
117 %dir %{_vpsconfdir}
118 %dir %{_distconfdir}
119 %dir %{_distscriptdir}
120
121 %attr(755,root,root) %{_sbindir}/*send
122 %attr(755,root,root) %{_sbindir}/vz*
123 %attr(755,root,root) %{_scriptdir}/vps*
124 %{_logrdir}/vzctl
125 %{_distconfdir}/distribution.conf-template
126 %{_distconfdir}/default
127 %attr(755,root,root) %{_distscriptdir}/*.sh
128 %{_distscriptdir}/functions
129 %attr(755,root,root) %{_netdir}/if*-venet
130 %{_netdir}/ifcfg-venet0
131 %{_mandir}/man5/*.5*
132 %{_mandir}/man8/*.8*
133 %{_udevrulesdir}/*
134 %{_bashcdir}/*
135
136 %config(noreplace) %{_configdir}/vz.conf
137 %config(noreplace) %{_distconfdir}/*.conf
138 %config %{_vpsconfdir}/ve-*.conf-sample
139 %config %{_vpsconfdir}/0.conf
140
141 %attr(777, root, root) %{_sysconfdir}/vz/conf
142 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vz
143
144 %files lib
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_libdir}/libvzctl-*.so
147 %attr(755,root,root) %{_libdir}/vzctl
This page took 0.246306 seconds and 4 git commands to generate.