]> git.pld-linux.org Git - packages/apache-mod_cgroup.git/blob - apache-mod_cgroup.spec
- rel 3; link with cgroup library for required symbols
[packages/apache-mod_cgroup.git] / apache-mod_cgroup.spec
1 %define         snapdate        20110824
2 %define         snap            59adb1a668f0a8504b1124cf0bb93d7e61b21b01
3 #
4 %define         apxs            /usr/sbin/apxs
5 %define         mod_name        cgroup
6 Summary:        Resource management per vhost
7 Name:           apache-mod_%{mod_name}
8 Version:        0.%{snapdate}.1
9 Release:        3
10 License:        GPL
11 Group:          Networking/Daemons/HTTP
12 Source0:        https://github.com/MatthewIfe/mod_cgroup/archive/59adb1a668f0a8504b1124cf0bb93d7e61b21b01.zip
13 # Source0-md5:  c960aec82d2edc2fb1ecd27b8dd97c69
14 URL:            https://github.com/MatthewIfe/mod_cgroup
15 BuildRequires:  %{apxs}
16 BuildRequires:  apache-devel >= 2.0
17 BuildRequires:  apr-devel >= 1:1.0
18 BuildRequires:  apr-util-devel >= 1:1.0
19 BuildRequires:  libcgroup-devel
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 Requires:       apache(modules-api) = %apache_modules_api
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
25 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
26
27 %description
28 mod_cgroup provides a system administrator with the capability to
29 provide predictable service levels for each virtual host declared in
30 httpd.
31
32 mod_cgroup can be used for:
33 - Offering grades of service per virtual host or a group of virtual
34   hosts.
35 - Protecting other virtual hosts from problematic resource abuse in
36   another vhost.
37 - Penalizing a virtual host which fails to respect resouce
38   limitations.
39 - Ensuring a predictable capacity level is provided to all web
40   services.
41
42 %prep
43 %setup -q -n mod_%{mod_name}-%{snap}
44
45 %build
46 %{apxs} -c mod_%{mod_name}/mod_%{mod_name}.c -o mod_%{mod_name}.la -lcgroup
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
51
52 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
53 install mod_%{mod_name}/mod_%{mod_name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/33_mod_cgroup.conf
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 %service -q httpd restart
60
61 %postun
62 if [ "$1" = "0" ]; then
63         %service -q httpd restart
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %doc README.md
69 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
70 %attr(755,root,root) %{_pkglibdir}/mod_cgroup.so
This page took 0.174454 seconds and 3 git commands to generate.