packages: apache1-mod_rpaf/apache1-mod_rpaf.spec, apache1-mod_rpaf/tests.pa...

glen glen at pld-linux.org
Thu Dec 22 16:40:35 CET 2011


Author: glen                         Date: Thu Dec 22 15:40:35 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- run tests

---- Files affected:
packages/apache1-mod_rpaf:
   apache1-mod_rpaf.spec (1.27 -> 1.28) , tests.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/apache1-mod_rpaf/apache1-mod_rpaf.spec
diff -u packages/apache1-mod_rpaf/apache1-mod_rpaf.spec:1.27 packages/apache1-mod_rpaf/apache1-mod_rpaf.spec:1.28
--- packages/apache1-mod_rpaf/apache1-mod_rpaf.spec:1.27	Fri Oct 23 16:03:10 2009
+++ packages/apache1-mod_rpaf/apache1-mod_rpaf.spec	Thu Dec 22 16:40:29 2011
@@ -2,29 +2,43 @@
 #
 # 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
-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
+Patch1:		tests.patch
 URL:		http://stderr.net/apache/rpaf/
-%{?with_ipv6:BuildRequires:	apache1(ipv6)-devel}
 BuildRequires:	apache1-devel >= 1.3.39
 BuildRequires:	rpmbuild(macros) >= 1.268
-%{!?with_ipv6:BuildConflicts:	apache1(ipv6)-devel}
 Requires:	apache1(EAPI)
-%{?with_ipv6:Requires:	apache1(ipv6)}
 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)
@@ -53,16 +67,22 @@
 %setup -qc
 mv mod_%{mod_name}-%{version}/* .
 %patch0 -p1
+%patch1 -p1
 
 %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 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
@@ -87,6 +107,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.28  2011/12/22 15:40:29  glen
+- run tests
+
 Revision 1.27  2009/10/23 14:03:10  glen
 - unique topdir
 

================================================================
Index: packages/apache1-mod_rpaf/tests.patch
diff -u /dev/null packages/apache1-mod_rpaf/tests.patch:1.1
--- /dev/null	Thu Dec 22 16:40:35 2011
+++ packages/apache1-mod_rpaf/tests.patch	Thu Dec 22 16:40:29 2011
@@ -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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/apache1-mod_rpaf/apache1-mod_rpaf.spec?r1=1.27&r2=1.28&f=u



More information about the pld-cvs-commit mailing list