]> git.pld-linux.org Git - packages/apache1-mod_fastcgi.git/blobdiff - apache1-mod_fastcgi.spec
- unified (not everything, waiting for server-side cp)
[packages/apache1-mod_fastcgi.git] / apache1-mod_fastcgi.spec
index 630ab0767d369c398c5d489d78ef045fb050b9c2..733bd55ca80bd10532d489b5517089723bdd7ae1 100644 (file)
@@ -1,20 +1,30 @@
+%define                mod_name        fastcgi
+%define        apxs            /usr/sbin/apxs
+%define                _apache1        %(rpm -q apache-devel 2> /dev/null | grep -Eq '\\-2\\.[0-9]+\\.' && echo 0 || echo 1)
 Summary:       Support for the FastCGI protocol for apache webserver
 Summary(pl):   Obs³uga protoko³u FastCGI dla serwera apache
-Name:          apache-mod_fastcgi
-Version:       2.2.10
+Summary(ru):   FastCGI - ÂÏÌÅÅ ÂÙÓÔÒÁÑ ×ÅÒÓÉÑ CGI
+Summary(uk):   FastCGI - Â¦ÌØÛ Û×ÉÄËÁ ×ÅÒӦѠCGI
+Name:          apache-mod_%{mod_name}
+Version:       2.4.2
 Release:       2
-Copyright:     Open Market
+License:       distributable
 Group:         Networking/Daemons
-Group(de):     Netzwerkwesen/Server
-Group(pl):     Sieciowe/Serwery
-Source0:       http://www.FastCGI.com/dist/mod_fastcgi_%{version}.tar.gz
+Source0:       http://www.FastCGI.com/dist/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5: e994414304b535cb99e10b7d1cad1d1e
+Patch0:                %{name}-allow-uid-gid.patch
+Source1:       70_mod_%{mod_name}.conf
 URL:           http://www.FastCGI.com/
+BuildRequires: %{apxs}
 BuildRequires: apache-devel
+BuildRequires: libtool
+Requires(post,preun):  %{apxs}
 Requires:      apache >= 1.3.1
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define         _libexecdir     %{_libdir}/apache
-%define         _htmldocdir     /home/httpd/manual/mod
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                _htmldocdir     /home/httpd/manual/mod
 
 %description
 This 3rd party module provides support for the FastCGI protocol.
@@ -25,45 +35,75 @@ of server specific APIs.
 %description -l pl
 To jest modu³ apache dodaj±cy obs³ugê protoko³u FastCGI. FastCGI jest
 niezale¿nym od jêzyka, skalowalnym, otwartym rozszerzeniem CGI daj±cym
-du¿± wydajno¶æ bez ograniczania API specificznego dla serwera.
+du¿± wydajno¶æ bez ograniczania API specyficznego dla serwera.
+
+%description -l ru
+FastCGI - ÒÁÓÛÉÒÅÎÉÅ CGI, ËÏÔÏÒÏÅ ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ×ÏÚÍÏÖÎÏÓÔØ ÓÏÚÄÁ×ÁÔØ
+×ÙÓÏËÏÐÒÏÉÚ×ÏÄÉÔÅÌØÎÙÅ Internet-ÐÒÉÌÏÖÅÎÉÑ ÂÅÚ ÎÅÏÂÈÏÄÉÍÏÓÔÉ
+ÉÓÐÏÌØÚÏ×ÁÔØ ÓÐÅÃÉÆÉÞÅÓËÉÅ ÄÌÑ ËÁÖÄÏÇÏ web-ÓÅÒ×ÅÒÁ API.
+
+óËÏÒÏÓÔØ API web-ÓÅÒ×ÅÒÏ× ÓÏ ×ÓÅÍÉ ÐÒÅÉÍÕÝÅÓÔ×ÁÍÉ CGI.
+
+%description -l uk
+FastCGI - ÒÏÚÛÉÒÅÎÎÑ CGI, ÑËÅ ÎÁÄÁ¤ ÍÏÖÌÉצÓÔØ ÓÔ×ÏÒÀ×ÁÔÉ
+×ÉÓÏËÏÐÒÏÄÕËÔÉ×Φ Internet-ÐÒÏÇÒÁÍÉ ÂÅÚ ÎÅÏÂȦÄÎÏÓÔ¦ ×ÉËÏÒÉÓÔÁÎÎÑ
+ÓÐÅÃÉƦÞÎÉÈ ÄÌÑ ËÏÖÎÏÇÏ web-ÓÅÒ×ÅÒÕ API.
+
+û×ÉÄ˦ÓÔØ API web-ÓÅÒ×ÅҦנڦ ×Ó¦ÍÁ ÐÅÒÅ×ÁÇÁÍÉ CGI.
 
 %prep
-%setup -q -n mod_fastcgi_%{version}
+%setup -q -n mod_%{mod_name}-%{version}
+%patch0 -p1
 
 %build
-apxs -D SUEXEC_BIN="\"\\\"/usr/sbin/suexec\\\"\"" -o mod_fastcgi.so -c *.c
+%if %{_apache1}
+%{apxs} -o mod_%{mod_name}.so -c *.c
+%else
+%{__make} -f Makefile.AP2 top_dir=%{_pkglibdir} INCLUDES="-I%(%{apxs} -q INCLUDEDIR)"
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_htmldocdir}}
 
-install mod_fastcgi.so $RPM_BUILD_ROOT%{_libexecdir}
+%if %{_apache1}
+install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+%else
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+libtool --mode=install install mod_%{mod_name}.la $RPM_BUILD_ROOT%{_pkglibdir}
+install %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/httpd.conf/
+%endif
 
 install docs/*.html $RPM_BUILD_ROOT%{_htmldocdir}
 
-gzip -9nf docs/LICENSE.TERMS CHANGES
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
-%{_sbindir}/apxs -e -a -n fastcgi %{_libexecdir}/mod_fastcgi.so 1>&2
+%if %{_apache1}
+%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+%endif
 if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
+        /etc/rc.d/init.d/httpd 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/httpd start\" to start apache http daemon."
 fi
-
 %preun
 if [ "$1" = "0" ]; then
-       %{_sbindir}/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
-       fi
+%if %{_apache1}
+       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+%endif
+        if [ -f /var/lock/subsys/httpd ]; then
+                /etc/rc.d/init.d/httpd restart 1>&2
+        fi
 fi
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
-%doc docs/*.gz *.gz
-%doc %{_htmldocdir}
-%attr(755,root,root) %{_libexecdir}/*
+%doc docs/LICENSE.TERMS CHANGES
+%doc %{_htmldocdir}/*
+%attr(755,root,root) %{_pkglibdir}/*.so
+%if ! %{_apache1}
+%config %{_sysconfdir}/httpd.conf/*.conf
+%endif
This page took 0.042003 seconds and 4 git commands to generate.