]>
Commit | Line | Data |
---|---|---|
687cab59 | 1 | # |
2 | # TODO: | |
3 | # - example/minimal configuration file | |
4 | # - review XXX's | |
5 | # - better Summary | |
6 | # | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | %define mod_name epp | |
9 | %define apxs /usr/sbin/apxs | |
10 | Summary: An EPP (Extensible Provisioning Protocol) implementation for Apache2 | |
11 | #Summary(pl): | |
12 | Name: apache-mod_%{mod_name} | |
13 | Version: 1.0 | |
14 | Release: 1 | |
15 | License: Apache | |
16 | Group: Networking/Daemons | |
17 | Source0: http://dl.sourceforge.net/aepps/mod_%{mod_name}-%{version}.tar.gz | |
7646bc8a | 18 | # Source0-md5: 7517dc6c8f135a88da82022b9d512801 |
687cab59 | 19 | # XXX: to be added to docs? |
20 | #Source1: http://dl.sourceforge.net/aepps/epp-erd-20030122.tar.gz | |
21 | URL: http://aepps.sourceforge.net/ | |
22 | BuildRequires: %{apxs} | |
23 | BuildRequires: apache-devel >= 2.0.43 | |
24 | BuildRequires: rpm-perlprov | |
25 | Requires(post,preun): %{apxs} | |
26 | # XXX: wouldn't requires_eq be more appropiate? | |
27 | Requires: apache >= 2.0.43 | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR) | |
31 | %define _sysconfdir /etc/httpd | |
32 | ||
33 | %description | |
34 | This Apache 2.0 module implements the EPP over TCP protocol as defined | |
35 | in draft-ietf-provreg-epp-tcp-05.txt and the session management parts | |
36 | of draft-ietf-provreg-epp-0(6|7).txt. | |
37 | ||
38 | This is *not* a full implementation of EPP, this module just makes it | |
39 | possible to write an EPP server as a set of CGI scripts. | |
40 | ||
41 | # %description -l pl | |
42 | # TODO | |
43 | ||
44 | %prep | |
45 | %setup -q -n mod_%{mod_name}-%{version} | |
46 | ||
47 | %build | |
48 | %{apxs} -c mod_%{mod_name}.c | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | install -D .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so | |
54 | install -D epptelnet.pl $RPM_BUILD_ROOT%{_bindir}/epptelnet.pl | |
55 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
56 | cp -r examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %post | |
62 | %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
63 | if [ -f /var/lock/subsys/httpd ]; then | |
64 | /etc/rc.d/init.d/httpd restart 1>&2 | |
65 | fi | |
66 | ||
67 | %preun | |
68 | if [ "$1" = "0" ]; then | |
69 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
70 | if [ -f /var/lock/subsys/httpd ]; then | |
71 | /etc/rc.d/init.d/httpd restart 1>&2 | |
72 | fi | |
73 | fi | |
74 | ||
75 | %files | |
76 | %defattr(644,root,root,755) | |
77 | %doc README TODO | |
78 | %attr(755,root,root) %{_bindir}/* | |
79 | %attr(755,root,root) %{_pkglibdir}/* | |
80 | %{_examplesdir}/%{name}-%{version} |