%include /usr/lib/rpm/macros.perl
+%define apxs /usr/sbin/apxs
Summary: A Perl interpreter for the Apache Web server
Summary(cs): Vestavìný interpret Perlu pro WWW server Apache
Summary(da): En indbygget Perl-fortolker for webtjeneren Apache
BuildRequires: perl-URI
BuildRequires: perl-libwww
BuildRequires: rpm-perlprov >= 3.0.3-16
+BuildRequires: %{apxs}
+Prereq: %{_sbindir}/apxs
Prereq: apache(EAPI)
Provides: perl(mod_perl_hooks)
Provides: mod_perl
%build
perl Makefile.PL \
USE_APXS=1 \
- WITH_APXS=/usr/sbin/apxs \
+ WITH_APXS=%{apxs} \
EVERYTHING=1 \
PERL_STACKED_HANDLERS=1
rm -rf $RPM_BUILD_ROOT
%post
-/usr/sbin/apxs -e -a -n perl %{_libexecdir}/libperl.so 1>&2
+%{_sbindir}/apxs -e -a -n perl %{_libexecdir}/libperl.so 1>&2
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
else
%preun
if [ "$1" = "0" ]; then
- /usr/sbin/apxs -e -A -n perl %{_libexecdir}/libperl.so 1>&2
+ %{_sbindir}/apxs -e -A -n perl %{_libexecdir}/libperl.so 1>&2
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd stop 1>&2
fi