[libwbxml-compat] Import
Petr Pisar
ppisar at fedoraproject.org
Wed Aug 31 08:44:45 UTC 2011
commit 94fc42c54ed570dabce2fc0e9a7c3f784a01f1a3
Author: Petr Písař <ppisar at redhat.com>
Date: Wed Aug 31 10:42:27 2011 +0200
Import
.gitignore | 1 +
...onfig-module-links-against-compat-library.patch | 23 +++++
libwbxml-compat.spec | 88 ++++++++++++++++++++
sources | 1 +
4 files changed, 113 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..38f2802 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libwbxml-0.10.9.tar.bz2
diff --git a/libwbxml-0.10.9-pkg-config-module-links-against-compat-library.patch b/libwbxml-0.10.9-pkg-config-module-links-against-compat-library.patch
new file mode 100644
index 0000000..db64bf7
--- /dev/null
+++ b/libwbxml-0.10.9-pkg-config-module-links-against-compat-library.patch
@@ -0,0 +1,23 @@
+From ee689b20f9eaa96348760f44bb0a1310a3a40deb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Mon, 29 Aug 2011 14:30:50 +0200
+Subject: [PATCH] pkg-config module links against compat library
+
+---
+ libwbxml2.pc.cmake | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libwbxml2.pc.cmake b/libwbxml2.pc.cmake
+index f745434..dc739bd 100644
+--- a/libwbxml2.pc.cmake
++++ b/libwbxml2.pc.cmake
+@@ -7,5 +7,5 @@ Name: libwbxml2
+ Description: C wbxml library
+ Version: @LIBWBXML_VERSION@
+ Requires: libxml-2.0 >= 2.6
+-Libs: -L${libdir} -lwbxml2
++Libs: -L${libdir} -lwbxml2-compat-0
+ Cflags: -I${includedir}
+--
+1.7.6.1
+
diff --git a/libwbxml-compat.spec b/libwbxml-compat.spec
new file mode 100644
index 0000000..851c6d8
--- /dev/null
+++ b/libwbxml-compat.spec
@@ -0,0 +1,88 @@
+%global base_name libwbxml
+Name: %{base_name}-compat
+Version: 0.10.9
+Release: 1%{?dist}
+Summary: Library to parse, encode and handle WBXML documents
+Group: System Environment/Libraries
+# Library is LGPLv2+, xml2wbxml_tool is GPLv2+
+License: LGPLv2+ and GPLv2+
+URL: https://libwbxml.opensync.org/
+Source: http://downloads.sourceforge.net/%{base_name}/%{base_name}-%{version}.tar.bz2
+Patch0: libwbxml-0.10.9-pkg-config-module-links-against-compat-library.patch
+BuildRequires: cmake, expat-devel, perl
+Obsoletes: wbxml2 <= 0.9.3
+
+%description
+WBXML parses, encodes and handles WBXML documents. The WBXML format is
+a binary representation of XML, defined by the Wap Forum, and used to reduce
+bandwidth in mobile communications.
+
+This WBXML library is compatible library to provide old API of libwbxml before
+0.11.0 version. Latest WBXML library and WBXML tools are available in
+`libwbxml' package.
+
+
+%package devel
+Group: Development/Libraries
+Summary: Development files of %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: libxml2-devel, pkgconfig
+Provides: wbxml2-devel = %{version}-%{release}
+Obsoletes: wbxml2-devel <= 0.9.3
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{base_name} before 0.11.0 version. The
+linking library and pkg-config module are called `libwbxml2-compat-0'.
+
+
+%prep
+%setup -q -n %{base_name}-%{version}
+%patch0 -p1 -b .compat
+# no line terminator, add one
+for F in BUGS THANKS; do
+ sed -e '$a\' "$F" > "${F}.new"
+ touch -r "$F"{,.new}
+ mv "$F"{.new,}
+done
+
+%build
+# Upstream does not support in-source-directory building
+mkdir -p %{_target_platform}
+pushd %{_target_platform}
+%cmake ..
+popd
+make -C %{_target_platform} %{?_smp_mflags}
+
+%install
+make -C %{_target_platform} install/fast DESTDIR=$RPM_BUILD_ROOT
+rm -r $RPM_BUILD_ROOT/usr/share/doc/%{base_name}
+# Rename pkg-config module not to clash with modern libwbxml
+mv "$RPM_BUILD_ROOT"/%{_libdir}/pkgconfig/libwbxml2{,-compat-0}.pc
+# Remove tools
+rm -r $RPM_BUILD_ROOT/%{_bindir}/*
+# Rename library used for compile-time linking
+mv "$RPM_BUILD_ROOT"/%{_libdir}/libwbxml2{,-compat-0}.so
+
+
+%check
+cd %{_target_platform}
+ctest
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc AUTHORS BUGS ChangeLog COPYING GNU-LGPL NEWS README References THANKS TODO
+%{_libdir}/libwbxml2.so.*
+
+%files devel
+%{_includedir}/*
+%{_libdir}/libwbxml2-compat-0.so
+%{_libdir}/pkgconfig/libwbxml2-compat-0.pc
+
+%changelog
+* Mon Aug 29 2011 Petr Pisar <ppisar at redhat.com> - 0.10.9-1
+- Spec file based on libwbxml package to provide old libraries before API
+ change (bug #731304)
diff --git a/sources b/sources
index e69de29..bb165dc 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7c015b22fd8d90bcd30f931db855a931 libwbxml-0.10.9.tar.bz2
More information about the scm-commits
mailing list