Author: glen                         Date: Wed Sep 28 23:36:52 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- include tests package, if available

---- Files affected:
SPECS:
   pearize.sh (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SPECS/pearize.sh
diff -u SPECS/pearize.sh:1.5 SPECS/pearize.sh:1.6
--- SPECS/pearize.sh:1.5        Thu Sep 29 01:29:13 2005
+++ SPECS/pearize.sh    Thu Sep 29 01:36:47 2005
@@ -7,6 +7,9 @@
 tarball=$(rpm -q --qf '../SOURCES/%{name}-%{version}.tgz' --specfile "$spec" | 
sed -e 's,php-pear-,,')
 template=$(rpm -q --qf '%{name}-%{version}.spec' --specfile "$spec")
 
+if [ ! -f $tarball ]; then
+       ./builder -g $spec
+fi
 pear makerpm $tarball
 ls -l $spec $template
 
@@ -34,6 +37,7 @@
 
 /^rm -rf/{p
 a\
+install -d $RPM_BUILD_ROOT%{php_pear_dir}\
 %pear_package_install\
 
 }
@@ -62,5 +66,34 @@
                $done = 1;
        }
 ' $spec
+
+if grep -q '^%files tests' $template; then
+       sed -i -e '
+/^%define date/{
+i\
+%files tests\
+%defattr(644,root,root,755)\
+%{php_pear_dir}/tests/*\
+
+}
+
+/^%prep/{
+i\
+%package tests\
+Summary:       Tests for PEAR::%{_pearname}\
+Summary(pl):   Testy dla PEAR::%{_pearname}\
+Group:         Development\
+Requires:      %{name} = %{epoch}:%{version}-%{release}\
+AutoReq:       no\
+\
+%description tests\
+Tests for PEAR::%{_pearname}.\
+\
+%description tests -l pl\
+Testy dla PEAR::%{_pearname}.\
+
+}
+' $spec
+fi
 
 vim -o $spec $template
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/pearize.sh?r1=1.5&r2=1.6&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to