[meego-commits] 10827: Changes to devel:resourcepolicy/swi-prolog

Kalle Lampila no_reply at build.meego.com
Fri Dec 10 18:13:46 UTC 2010


Hi,
I have made the following changes to swi-prolog in project devel:resourcepolicy. Please review and accept ASAP.

Thank You,
Kalle Lampila

[This message was auto-generated]

---

Request #10827:

  submit:   home:kalle.lampila:branches:devel:resourcepolicy/swi-prolog(r3)(cleanup) -> devel:resourcepolicy/swi-prolog


Message:
    New version

State:   new          2010-12-10T10:13:41 kalle.lampila
Comment: None



changes files:
--------------
--- swi-prolog.changes
+++ swi-prolog.changes
@@ -0,0 +1,4 @@
+* Thu Dec 09 2010 Kalle Lampila <kalle.lampila at cybercom.com> - 5.6.50
+- Generate a pkgconfig file and include it in the dev subpackage.
+- Part of FEA#6701
+

old:
----
  swi-prolog-5.6.50-rpmlintrc

new:
----
  swi-prolog-rpmlintrc
  swi-prolog.pc.in

spec files:
-----------
--- swi-prolog.spec
+++ swi-prolog.spec
@@ -6,9 +6,11 @@
 Group: Development/Languages
 URL: http://www.swi-prolog.org/
 Source0: %{name}-%{version}.tar.gz
-Source100: %{name}-%{version}-rpmlintrc
+Source1: swi-prolog.pc.in
+Source100: %{name}-rpmlintrc
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Provides: pl
+Provides: libpl.so
 
 %package devel
 Summary: Headers files and libraries for swi-prolog
@@ -25,6 +27,7 @@
 Summary: Library of SWI Prolog predicates
 Group: Development/Languages
 Requires: %{name} = %{version}
+Requires: %{name}-lib-core = %{version}
 
 %package doc
 Summary: Documentation for SWI Prolog
@@ -61,7 +64,7 @@
 This package contains SWI-Prolog documentation (manual pages, README, etc.).
 
 %prep
-%setup -q -n swi-prolog
+%setup -q
 
 %build
 ARCH=$RPM_ARCH PL=swipl \
@@ -102,7 +105,8 @@
     grep -v '/Manual/' | grep -v '/man/' | grep -v '/MANUAL$' | \
     grep -v '/include/' | grep -v '/libpl.a$' | \
     grep -v '/demo/' | grep -v '/dotfiles/' | \
-    grep -v '/plld$' | grep -v '/plrc$' \
+    grep -v '/plld$' | grep -v '/plrc$' | \
+    grep -v '/swi-prolog.pc' \
     > $PKGDIR/swi-prolog.install
 
 cd $RPM_BUILD_ROOT && find . -type l | \
@@ -110,7 +114,15 @@
     grep -v '/Manual/' | grep -v '/man/' | grep -v '/MANUAL$' | \
     grep -v '/include/' | grep -v '/libpl.a$' | \
     grep -v '/demo/' | grep -v '/dotfiles/' | \
-    grep -v '/plld$' | grep -v '/plrc$' \
+    grep -v '/plld$' | grep -v '/plrc$' | \
+    grep -v '/swi-prolog.pc' \
+    >> $PKGDIR/swi-prolog.install
+
+# Put a libpl.so symlink under /usr/lib.
+switop=%{_libdir}/swipl-5.6.50 && \
+  cd $RPM_BUILD_ROOT && \
+  ln -s -f $switop/lib/$RPM_ARCH/libpl.so ./%{_libdir}/libpl.so && \
+  echo "%{_libdir}/libpl.so" \
     >> $PKGDIR/swi-prolog.install
 
 # Generate file list for the lib-core subpackage.
@@ -192,6 +204,25 @@
 cd $RPM_BUILD_ROOT && find . -type l | \
     grep '/plrc$' >> $PKGDIR/swi-prolog-devel.install || :
 
+# Generate a pkgconfig file and include it in the dev subpackage.
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig && \
+switop=$RPM_BUILD_ROOT%{_libdir}/swipl-5.6.50 && \
+    prfx=$RPM_BUILD_ROOT && \
+    cd $RPM_BUILD_ROOT && \
+    eval `LD_LIBRARY_PATH=$switop/lib/$RPM_ARCH \
+          $switop/bin/$RPM_ARCH/swipl --dump-runtime-variables | \
+    sed "s#$prfx/#/#g" | \
+        while read line; do echo export SWI$line; done` && \
+        set && \
+        cat %{SOURCE1} | \
+        sed "s#PLBASE#$SWIPLBASE#g" | \
+        sed "s#PLLDFLAGS#$SWIPLLDFLAGS#g" | \
+        sed "s#PLLIBS#$SWIPLLIBS#g" \
+        > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/swi-prolog.pc && \
+    echo "%{_libdir}/pkgconfig/swi-prolog.pc" \
+    >> $PKGDIR/swi-prolog-devel.install || :
+
+
 # Generate file list for the doc subpackage.
 cd $RPM_BUILD_ROOT && find . -type f | \
     grep '/Manual/' > $PKGDIR/swi-prolog-doc.install || :

other changes:
--------------

++++++ swi-prolog-5.6.50.tar.gz
116497 lines of diff (skipped)

++++++ swi-prolog-rpmlintrc (new)
--- swi-prolog-rpmlintrc
+++ swi-prolog-rpmlintrc
+# This line is mandatory to access the configuration functions
+from Config import *
+
+addFilter(".* devel-file-in-non-devel-package")

++++++ swi-prolog.pc.in (new)
--- swi-prolog.pc.in
+++ swi-prolog.pc.in
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+base=PLBASE
+
+Name: swi-prolog
+Description: SWI prolog interpreter runtime library.
+Version: 5.6.50
+Libs: -L${libdir} PLLDFLAGS PLLIBS
+Cflags: -IPLBASE/include

++++++ deleted files:
--- swi-prolog-5.6.50-rpmlintrc




More information about the MeeGo-commits mailing list