]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- add .registry
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 28 Sep 2005 23:29:13 +0000 (23:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pearize.sh -> 1.5

pearize.sh

index 0c5890d20ee4615053716d88957391c91c14ab66..06debd307ffab8a4786579d6215467791a6b2d47 100644 (file)
@@ -8,7 +8,7 @@ tarball=$(rpm -q --qf '../SOURCES/%{name}-%{version}.tgz' --specfile "$spec" | s
 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 @@ d
 
 ' $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
This page took 0.066415 seconds and 4 git commands to generate.