X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=apache1-mod_fastcgi.spec;h=d016cb707e1c9a0ccfaaf089cf9306f8b05dffdb;hb=073ac62ec71ec91f299e4405bcf661eaabf17dcf;hp=0be4dae6f4aa7d455a0f1c3f203412337cac34cb;hpb=ae6f88bb7591b11eda534b6f423215ef63d4b003;p=packages%2Fapache1-mod_fastcgi.git diff --git a/apache1-mod_fastcgi.spec b/apache1-mod_fastcgi.spec index 0be4dae..d016cb7 100644 --- a/apache1-mod_fastcgi.spec +++ b/apache1-mod_fastcgi.spec @@ -1,24 +1,28 @@ -%define apxs /usr/sbin/apxs +%define mod_name fastcgi +%define apxs /usr/sbin/apxs1 Summary: Support for the FastCGI protocol for apache webserver Summary(pl): Obs³uga protoko³u FastCGI dla serwera apache Summary(ru): FastCGI - ÂÏÌÅÅ ÂÙÓÔÒÁÑ ×ÅÒÓÉÑ CGI Summary(uk): FastCGI - ¦ÌØÛ Û×ÉÄËÁ ×ÅÒÓ¦Ñ CGI -Name: apache-mod_fastcgi -Version: 2.4.0 -Release: 1 +Name: apache1-mod_%{mod_name} +# NOTE: remember about apache-mod_fastcgi.spec when messing here +Version: 2.4.2 +Release: 2 License: distributable Group: Networking/Daemons -Source0: http://www.FastCGI.com/dist/mod_fastcgi-%{version}.tar.gz -# Source0-md5: e4f5b1b185db4774021163dd0fcd2c56 +Source0: http://www.FastCGI.com/dist/mod_%{mod_name}-%{version}.tar.gz +# Source0-md5: e994414304b535cb99e10b7d1cad1d1e +Patch0: %{name}-allow-uid-gid.patch URL: http://www.FastCGI.com/ BuildRequires: %{apxs} -BuildRequires: apache-devel -Requires(post,preun): %{apxs} -Requires: apache >= 1.3.1 +BuildRequires: apache1-devel >= 1.3.33-2 +BuildRequires: libtool +Requires: apache1 >= 1.3.33-2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _libexecdir %{_libdir}/apache -%define _htmldocdir /home/httpd/manual/mod +%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) +%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) +%define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs %description This 3rd party module provides support for the FastCGI protocol. @@ -46,39 +50,42 @@ FastCGI - û×ÉÄ˦ÓÔØ API web-ÓÅÒ×ÅÒ¦× Ú¦ ×Ó¦ÍÁ ÐÅÒÅ×ÁÇÁÍÉ CGI. %prep -%setup -q -n mod_fastcgi-%{version} +%setup -q -n mod_%{mod_name}-%{version} +%patch0 -p1 %build -%{apxs} -D SUEXEC_BIN="\"\\\"%{_sbindir}/suexec\\\"\"" -o mod_fastcgi.so -c *.c +%{apxs} -o mod_%{mod_name}.so -c *.c %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}} +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,%{_pkglogdir}/fastcgi/dynamic} -install mod_fastcgi.so $RPM_BUILD_ROOT%{_libexecdir} -install docs/*.html $RPM_BUILD_ROOT%{_htmldocdir} +install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} + +echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ + $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf %clean rm -rf $RPM_BUILD_ROOT %post -%{apxs} -e -a -n fastcgi %{_libexecdir}/mod_fastcgi.so 1>&2 -if [ -f /var/lock/subsys/httpd ]; then - /etc/rc.d/init.d/httpd restart 1>&2 +if [ -f /var/lock/subsys/apache ]; then + /etc/rc.d/init.d/apache restart 1>&2 else - echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon." + echo "Run \"/etc/rc.d/init.d/apache start\" to start apache HTTP daemon." fi -%preun +%postun if [ "$1" = "0" ]; then - %{apxs} -e -A -n fastcgi %{_libexecdir}/mod_fastcgi.so 1>&2 - if [ -f /var/lock/subsys/httpd ]; then - /etc/rc.d/init.d/httpd restart 1>&2 + if [ -f /var/lock/subsys/apache ]; then + /etc/rc.d/init.d/apache restart 1>&2 fi fi %files %defattr(644,root,root,755) -%doc docs/LICENSE.TERMS CHANGES -%doc %{_htmldocdir}/* -%attr(755,root,root) %{_libexecdir}/* +%doc docs/LICENSE.TERMS CHANGES docs/*.html +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf +%attr(755,root,root) %{_pkglibdir}/*.so +%dir %attr(770,root,http) %{_pkglogdir}/fastcgi +%dir %attr(770,root,http) %{_pkglogdir}/fastcgi/dynamic