]> git.pld-linux.org Git - packages/apache1-mod_gzip.git/blame - apache1-mod_gzip.spec
- tabs in preamble
[packages/apache1-mod_gzip.git] / apache1-mod_gzip.spec
CommitLineData
0a064d1c 1%define mod_name gzip
5b44b62d 2%define apxs /usr/sbin/apxs1
0a064d1c 3Summary: Apache module: On-the-fly compression of HTML documents
adbb5f4c 4Summary(pl.UTF-8): Moduł do apache: kompresuje dokumenty HTML w locie
5b44b62d 5Name: apache1-mod_%{mod_name}
85abf274 6Version: 1.3.26.1a
5e429b4a 7Release: 3
a6f4e72d 8License: Apache
0a064d1c 9Group: Networking/Daemons
74ef4954 10Source0: http://dl.sourceforge.net/mod-gzip/mod_gzip-%{version}.tgz
8a5ed5af 11# Source0-md5: 080ccc5d789ed5efa0c0a7625e4fa02d
6c381fab
ER
12Source1: %{name}.conf
13Source2: %{name}.logrotate
5b44b62d 14Patch0: %{name}-name_clash.patch
15Patch1: %{name}-security.patch
ac531521 16URL: http://www.schroepl.net/projekte/mod_gzip/
015a274c 17BuildRequires: %{apxs}
6c381fab 18BuildRequires: apache1-devel >= 1.3.33-2
0f335138 19BuildRequires: rpmbuild(macros) >= 1.268
0a064d1c 20BuildRequires: zlib-devel
6c381fab
ER
21Requires(triggerpostun): %{apxs}
22Requires(triggerpostun): grep
23Requires(triggerpostun): sed >= 4.0
5e429b4a 24Requires: apache1(EAPI)
a0c56f57 25Obsoletes: apache-mod_gzip <= 1.3.26.1a
0a064d1c 26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
6c381fab
ER
28%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
30%define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs
0a064d1c 31
32%description
33Apache module: On-the-fly compression of HTML documents. Browser will
34transparently decompress and display such documents.
35
f1e6d432
JR
36%description -l pl.UTF-8
37Moduł do apache: kompresuje dokumenty HTML w locie. Przeglądarki w
38sposób przezroczysty dekompresują i wyświetlają takie dokumenty.
0a064d1c 39
5390ce2c 40%prep
85abf274 41%setup -q -n mod_%{mod_name}-%{version}
2e0e0bc3 42%patch0 -p1
388672ab 43%patch1 -p1
0a064d1c 44
45%build
85abf274 46%{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
0a064d1c 47
48%install
49rm -rf $RPM_BUILD_ROOT
6c381fab 50install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,/etc/logrotate.d,%{_pkglogdir}}
0a064d1c 51
52install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
6c381fab
ER
53install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
54install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
0a064d1c 55
6c381fab 56> $RPM_BUILD_ROOT%{_pkglogdir}/mod_gzip.log
baf4d1d5 57
54b375dd
JB
58%clean
59rm -rf $RPM_BUILD_ROOT
60
0a064d1c 61%post
0f335138 62%service -q apache restart
0a064d1c 63
9ff164ca 64%postun
0a064d1c 65if [ "$1" = "0" ]; then
0f335138 66 %service -q apache restart
0a064d1c 67fi
68
6c381fab 69%triggerpostun -- %{name} < 1.3.26.1a-1.1
d9d054e5 70if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
6c381fab
ER
71 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
72 sed -i -e '
73 /^Include.*mod_%{mod_name}\.conf/d
74 ' /etc/apache/apache.conf
75else
76 # they're still using old apache.conf
77 sed -i -e '
78 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
79 ' /etc/apache/apache.conf
80fi
0f335138 81%service -q apache restart
6c381fab 82
0a064d1c 83%files
84%defattr(644,root,root,755)
dce087bc
AM
85%doc docs/manual/english/*
86%lang(de) %doc docs/manual/deutsch
0a064d1c 87%attr(755,root,root) %{_pkglibdir}/*
86ea281f
ER
88%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
89%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
6c381fab 90%attr(640,root,root) %ghost %{_pkglogdir}/*
This page took 0.053552 seconds and 4 git commands to generate.