[yap] Package clpbn examples and clean spec file

Petr Pisar ppisar at fedoraproject.org
Tue Jan 4 10:46:25 UTC 2011


commit 04310f956ac82b3a8dc19c1b67827754b3eb899f
Author: Petr Písař <ppisar at redhat.com>
Date:   Wed Dec 22 16:59:38 2010 +0100

    Package clpbn examples and clean spec file

 yap.spec |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/yap.spec b/yap.spec
index 5f204eb..7da8f7e 100644
--- a/yap.spec
+++ b/yap.spec
@@ -72,9 +72,8 @@ Documentation for Yap.
 # Regerenate configure because of patching
 autoconf
 
-find -name CVS -print0 | xargs -0 rm -rf
 # chr and clpqr are optional and they are a copy from SWI Prolog
-#cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} LGPL/chr
+# TODO: Bundle chr and clpqr libraries: cp %%{SOURCE1} LGPL/chr
 
 # remove redundant rpath
 sed -i '/-Wl,-R/d' configure
@@ -83,9 +82,7 @@ sed -i 's/\(@YAPLIB@\)/\1.%{version}/g' Makefile.in
 sed -i 's/\(@DYNYAPLIB@\)/\1.%{version}/g' Makefile.in
 sed -i 's/\(@YAPLIB_LD@\)/\1 -Wl,-soname=@YAPLIB at .%{version} /g' Makefile.in
 
-find -name Makefile.in | xargs sed -i 's|$(ROOTDIR)/lib|$(ROOTDIR)/%{_lib}|'
-find -name Makefile.in | xargs sed -i 's|$(EROOTDIR)/lib|$(EROOTDIR)/%{_lib}|'
-
+# TODO: Bumdle SWI chr and clpqr libraries
 ## Hack LGPL/chr build environment to run just build interpreter
 ## yap-6.2.0 have those SWI compatible libraries optional and separate. Package
 ## them as standalone package in the future and remove this ugly thing:
@@ -115,6 +112,9 @@ done
 
 # Fix file permissions
 chmod -x COPYING
+# Permissions for debuginfo content
+find -name '*.h' -exec chmod 0644 '{}' ';'
+find -name '*.c' -exec chmod 0644 '{}' ';'
 
 
 %build
@@ -139,16 +139,17 @@ make DESTDIR=$RPM_BUILD_ROOT install_info
 # fix permissions and flags
 chmod 0644 $RPM_BUILD_ROOT%{_datadir}/Yap/pl/*
 chmod 0644 $RPM_BUILD_ROOT%{_includedir}/Yap/*
-find -name '*.lgt' -exec chmod 0644 '{}' ';'
-find -name '*.h' -exec chmod 0644 '{}' ';'
-find -name '*.c' -exec chmod 0644 '{}' ';'
 
 (cd $RPM_BUILD_ROOT%{_libdir}; ln -sf libYap.so.%{version} libYap.so)
 
-# move examples to docdir
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-#mv $RPM_BUILD_ROOT%%{_datadir}/Yap/examples $RPM_BUILD_ROOT%%{_docdir}/%%{name}-%%{version}
-rm -rf $RPM_BUILD_ROOT%{_datadir}/Yap/clpbn/examples
+# move examples to docs dir
+%global documentation docs-documentation
+for P in clpbn; do 
+    mkdir -p "%{documentation}/examples/${P}"
+    mv "$RPM_BUILD_ROOT%{_datadir}/Yap/${P}/examples/"* \
+        "%{documentation}/examples/${P}"
+    rmdir "$RPM_BUILD_ROOT%{_datadir}/Yap/${P}/examples"
+done
 
 # Remove empty files
 for F in $RPM_BUILD_ROOT%{_datadir}/Yap/myddas_top_level.yap; do
@@ -195,6 +196,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 %doc LGPL/pillow/doc/pillow_doc_html/*
 %doc LGPL/pillow/doc/article.ps.gz
+%doc %{documentation}/*
 
 
 %changelog
@@ -212,6 +214,7 @@ rm -rf $RPM_BUILD_ROOT
 - Remove empty myddas_top_level.yap file
 - Fix soname injection
 - Fix BuildRequires
+- Package clpbn examples
 
 * Wed Dec 08 2010 Petr Pisar <ppisar at redhat.com> - 5.1.3-3
 - Hack SWI-compatible libraries build system to be compilable (bug #660965)


More information about the scm-commits mailing list