]> git.pld-linux.org Git - packages/apache-mod_bt.git/blob - apache-mod_bt.spec
- restart apache in %postun rather in %preun as the config file, loading module
[packages/apache-mod_bt.git] / apache-mod_bt.spec
1 %define         mod_name        bt
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache BitTorrent tracker
4 Summary(pl):    Tracker BitTorrenta w formie modu³u Apache'a
5 Name:           apache-mod_%{mod_name}
6 Version:        0.0.4
7 Release:        0.1
8 License:        GPL
9 Group:          Networking/Daemons
10 Source0:        http://www.crackerjack.net/mod_%{mod_name}/mod_%{mod_name}-%{version}.tgz
11 # Source0-md5:  dfb1f1a1aaae3313d8e1056a3d317740
12 Patch0:         %{name}-paths.patch
13 URL:            http://www.crackerjack.net/mod_bt/
14 BuildRequires:  %{apxs}
15 BuildRequires:  apache-devel >= 2.0
16 BuildRequires:  db-devel >= 4.2.52
17 BuildRequires:  rpmbuild(macros) >= 1.268
18 Requires:       apache(modules-api) = %apache_modules_api
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
22 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
23
24 %description
25 Apache-based BitTorrent Tracker.
26
27 %description -l pl
28 Oparty na Apache'u tracker BitTorrenta.
29
30 %prep
31 %setup -q -n mod_%{mod_name}-%{version}
32 %patch0 -p1
33
34 %build
35 %{__make}
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
40
41 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
42 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
43         $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
44
45 %clean
46 rm -rf $RPM_BUILD_ROOT
47
48 %post
49 %service -q httpd restart
50
51 %postun
52 if [ "$1" = "0" ]; then
53         %service -q httpd restart
54 fi
55
56 %files
57 %defattr(644,root,root,755)
58 %doc README
59 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
60 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.057768 seconds and 3 git commands to generate.