SPECS: pearize.sh - add .registry
glen
glen at pld-linux.org
Thu Sep 29 01:29:19 CEST 2005
Author: glen Date: Wed Sep 28 23:29:19 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add .registry
---- Files affected:
SPECS:
pearize.sh (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SPECS/pearize.sh
diff -u SPECS/pearize.sh:1.4 SPECS/pearize.sh:1.5
--- SPECS/pearize.sh:1.4 Thu Sep 29 01:03:48 2005
+++ SPECS/pearize.sh Thu Sep 29 01:29:13 2005
@@ -8,7 +8,7 @@
template=$(rpm -q --qf '%{name}-%{version}.spec' --specfile "$spec")
pear makerpm $tarball
-ls -l $template
+ls -l $spec $template
# adjust template
# remove false sectons
@@ -43,23 +43,24 @@
' $spec
-instdoc=$(grep '^%doc install' $template)
+instdoc=$(grep '^%doc install' $template || :)
sed -i -e "
/%defattr(644,root,root,755)/a\
$instdoc
" $spec
-doc=$(grep '^%doc docs/%{_pearname}/' $template)
+doc=$(grep '^%doc docs/%{_pearname}/' $template || :)
if [ "$doc" ]; then
sed -i -e '/^%doc/a\
%doc docs/%{_pearname}/*
' $spec
fi
-sed -i -e '/^%{php_pear_dir}/i\
-%{php_pear_dir}/.registry/*.reg
+perl -pi -e '
+ if (/^%{php_pear_dir}/ && !$done) {
+ print "%{php_pear_dir}/.registry/*.reg\n";
+ $done = 1;
+ }
' $spec
vim -o $spec $template
-
-exit 1
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/pearize.sh?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list