]> git.pld-linux.org Git - packages/apache1-mod_rpaf.git/commitdiff
- run tests
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 22 Dec 2011 15:40:29 +0000 (15:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache1-mod_rpaf.spec -> 1.28
    tests.patch -> 1.1

apache1-mod_rpaf.spec
tests.patch [new file with mode: 0644]

index bae44146c6e98cee43ed9837fdd3f010e89f890d..bd57c84514bce480d74954e1dc8bae1f09f33174 100644 (file)
@@ -1,29 +1,43 @@
 #
 # Conditional build:
 %bcond_without ipv6            # disable IPv6 support
 #
 # Conditional build:
 %bcond_without ipv6            # disable IPv6 support
-#
+%bcond_without tests   # do not perform "make test"
+
 %define                mod_name        rpaf
 %define        apxs            %{_sbindir}/apxs1
 Summary:       Reverse proxy add forward module for Apache
 Summary(pl.UTF-8):     Moduł Apache'a dodający przekazywanie dla odwrotnych proxy
 Name:          apache1-mod_%{mod_name}
 Version:       0.6
 %define                mod_name        rpaf
 %define        apxs            %{_sbindir}/apxs1
 Summary:       Reverse proxy add forward module for Apache
 Summary(pl.UTF-8):     Moduł Apache'a dodający przekazywanie dla odwrotnych proxy
 Name:          apache1-mod_%{mod_name}
 Version:       0.6
-Release:       1
+Release:       2
 License:       Apache
 Group:         Networking/Daemons
 Source0:       http://stderr.net/apache/rpaf/download/mod_rpaf-%{version}.tar.gz
 # Source0-md5: ba2b89274e1dd4c0f96f8d034fa305b1
 Source1:       %{name}.conf
 Patch0:                mod_rpaf_degtine.patch
 License:       Apache
 Group:         Networking/Daemons
 Source0:       http://stderr.net/apache/rpaf/download/mod_rpaf-%{version}.tar.gz
 # Source0-md5: ba2b89274e1dd4c0f96f8d034fa305b1
 Source1:       %{name}.conf
 Patch0:                mod_rpaf_degtine.patch
+Patch1:                tests.patch
 URL:           http://stderr.net/apache/rpaf/
 URL:           http://stderr.net/apache/rpaf/
-%{?with_ipv6:BuildRequires:    apache1(ipv6)-devel}
 BuildRequires: apache1-devel >= 1.3.39
 BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: apache1-devel >= 1.3.39
 BuildRequires: rpmbuild(macros) >= 1.268
-%{!?with_ipv6:BuildConflicts:  apache1(ipv6)-devel}
 Requires:      apache1(EAPI)
 Requires:      apache1(EAPI)
-%{?with_ipv6:Requires: apache1(ipv6)}
 Provides:      apache(mod_rpaf)
 Provides:      apache(mod_rpaf)
-%{!?with_ipv6:Conflicts:       apache1(ipv6)}
+%if %{with ipv6}
+BuildRequires: apache1(ipv6)-devel
+Requires:      apache1(ipv6)
+%else
+BuildConflicts:        apache1(ipv6)-devel
+Conflicts:     apache1(ipv6)
+%endif
+%if %{with tests}
+BuildRequires: apache1-base
+BuildRequires: apache1-mod_alias
+BuildRequires: apache1-mod_cgi
+BuildRequires: apache1-mod_log_config
+BuildRequires: apache1-mod_mime
+BuildRequires: apache1-mod_rewrite
+BuildRequires: perl-libwww
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
@@ -52,16 +66,22 @@ od wersji 1.3.25.
 %setup -qc
 mv mod_%{mod_name}-%{version}/* .
 %patch0 -p1
 %setup -qc
 mv mod_%{mod_name}-%{version}/* .
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
 
 
 %build
 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
 
+%if %{with tests}
+ln -sf %{_libdir}/apache1 modules
+%{__make} test
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
 
-install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/99_mod_%{mod_name}.conf
+install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/99_mod_%{mod_name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/tests.patch b/tests.patch
new file mode 100644 (file)
index 0000000..4e40512
--- /dev/null
@@ -0,0 +1,55 @@
+--- apache1-mod_rpaf-0.6/gen_tests.sh  2007-12-13 05:40:22.000000000 +0200
++++ apache1-mod_rpaf-0.6-tests/gen_tests.sh    2011-12-22 17:22:21.742653887 +0200
+@@ -1,23 +1,21 @@
+ #!/bin/sh
+ PATH=$PATH:/home/thomas/build/apache-dev/bin
+ DIRECTORY=`pwd`/t
+-HTTPD=`which httpd`
+-HTTPD2=`which apache2`
++HTTPD=`which /usr/sbin/apache 2>/dev/null`
++APACHE2=`which /usr/sbin/httpd 2>/dev/null`
+-cat test-Makefile-template | sed -s "s|\@\@HTTPD\@\@|$HTTPD|" | sed -s "s|\@\@HTTPD2\@\@|$HTTPD2|" > t/Makefile
++cat test-Makefile-template | sed -s "s|\@\@HTTPD\@\@|$HTTPD|" | sed -s "s|\@\@HTTPD2\@\@|$APACHE2|" > t/Makefile
+-if [ "$HTTPD" != "" ]; then
++if [ -x "$HTTPD" ]; then
+   echo "Found httpd as $HTTPD"
+   echo "Creating test configuration for apache 1.3.x"
+   echo "in directory $DIRECTORY"
+   cat httpd-rpaf.conf-template | sed -s "s|\@\@DIR\@\@|$DIRECTORY|" > t/httpd-rpaf.conf
+ fi
+-APACHE2=`which apache2`
+-
+-if [ "$APACHE2" != "" ]; then
+-  echo "Found apache2 as $HTTPD"
++if [ -x "$APACHE2" ]; then
++  echo "Found apache2 as $APACHE2"
+   echo "Creating test configuration for apache 2.x.x"
+   echo "in directory $DIRECTORY"
+   cat httpd-rpaf.conf-template-2.0 | sed -s "s|\@\@DIR\@\@|$DIRECTORY|" > t/httpd-rpaf.conf-2.0
+--- apache1-mod_rpaf-0.6/httpd-rpaf.conf-template      2008-01-01 05:03:15.000000000 +0200
++++ apache1-mod_rpaf-0.6-tests/httpd-rpaf.conf-template        2011-12-22 17:36:42.348061324 +0200
+@@ -1,10 +1,18 @@
+ ServerType standalone
+ PidFile httpd.pid
+-Port 2500
+-ServerName 127.0.0.1
++
++#Port 2500
++#ServerName 127.0.0.1
++Listen 127.0.0.1 2500
++
+ #ServerRoot @@DIR@@
+ DocumentRoot @@DIR@@/htdocs/
+ ErrorLog rpaf-error_log
++LoadModule alias_module ../modules/mod_alias.so
++LoadModule cgi_module ../modules/mod_cgi.so
++LoadModule mime_module ../modules/mod_mime.so
++LoadModule rewrite_module ../modules/mod_rewrite.so
++LoadModule log_config_module ../modules/mod_log_config.so
+ LoadModule rpaf_module ../mod_rpaf.so
+ ScriptAlias /cgi-bin @@DIR@@/htdocs/cgi-bin
+ TypesConfig /dev/null
This page took 0.05455 seconds and 4 git commands to generate.