]> git.pld-linux.org Git - projects/template-specs.git/blame - apache-module.spec
- more ld macro samples
[projects/template-specs.git] / apache-module.spec
CommitLineData
297b752b
ER
1# Replace MODNAME with real module name (example for mod_example)
2# Replace VERSION with version since what confdir support was
3# introduced for the module. only needed for older .specs, not needed
4# for new packages.
5#
6%define mod_name MODNAME
7%define apxs %{_sbindir}/apxs
8Summary: Apache module: ..
9Summary(pl.UTF-8): Moduł Apache'a: ...
10Name: apache-mod_%{mod_name}
11Version: -
12Release: 0.1
13License: - (enter Apache/GPL/LGPL/BSD/BSD-like/other license name here)
4f4f5e06 14Group: Networking/Daemons/HTTP
297b752b
ER
15Source0: -
16# Source0-md5: -
17Source1: %{name}.conf
18URL: -
19BuildRequires: %{apxs}
20BuildRequires: apache-devel >= 2.2
21BuildRequires: rpmbuild(macros) >= 1.268
22Requires: apache(modules-api) = %apache_modules_api
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
26%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
27
28%description
29MODNAME is Apache module...
30
31%description -l pl.UTF-8
32
33%prep
34%setup -q -n mod_%{mod_name}-%{version}
35
36%build
37%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
38
39%install
40rm -rf $RPM_BUILD_ROOT
41install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
42
43install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
44
45# module configuration
46# - should contain LoadModule line
47# - and directives must be between IfModule (so user could disable the module easily)
48install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
49
50# or, if no directives needed, put just LoadModule line
51echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
52 $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
53
54%clean
55rm -rf $RPM_BUILD_ROOT
56
57%post
4f4f5e06 58%service -q httpd restart
297b752b
ER
59
60%postun
61if [ "$1" = "0" ]; then
4f4f5e06 62 %service -q httpd restart
297b752b
ER
63fi
64
297b752b
ER
65%files
66%defattr(644,root,root,755)
67%doc README
68%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
69%attr(755,root,root) %{_pkglibdir}/*
This page took 0.031774 seconds and 4 git commands to generate.