%define name wbxml2 %define ver 0.9.2 %define rel 1 %define libmajor 0 %define libname %mklibname wbxml 2 %{libmajor} %{?!mkrel:%define mkrel(c:) %{-c: 0.%{-c*}.}%{!?_with_unstable:%(perl -e '$_="%{1}";m/(.\*)(\\d+)$/;$rel=${2}-1;re;print "$1$rel";').%{?subrel:%subrel}%{!?subrel:1}.%{?distversion:%distversion}%{?!distversion:%(echo $[%{mdkversion}/10])}}%{?_with_unstable:%{1}}%{?distsuffix:%distsuffix}%{?!distsuffix:mdk}} %define release %mkrel %rel Summary: WBXML parser and compiler library Name: %name Version: %ver Release: %release License: GPL URL: http://libwbxml.aymerick.com/ Group: File tools Source: http://prdownloads.sourceforge.net/wbxmllib/%{name}-%{ver}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{ver}-root Requires: expat >= 1.95.4 BuildRequires: expat-devel >= 1.95.4 popt-devel zlib-devel %description wbxml2 is a library that includes a WBXML parser and a WBXML compiler. (WBXML is the WAP Binary XML format used by many mobile devices) Unlike wbxml, it does not depend on libxml2 but on expat, making it faster and more portable. This package includes a wbxml2xml utility for converting from WBXML to XML %package -n %{libname} Group: System/Libraries License: GPL Summary: Library for parsing WAP Binary XML %description -n %libname wbxml2 is a library that includes a WBXML parser and a WBXML compiler. (WBXML is the WAP Binary XML format used by many mobile devices) Unlike wbxml, it does not depend on libxml2 but on expat, making it faster and more portable. This package contains just the library for use by other applications. %package -n %{libname}-devel Group: Development/C License: GPL Summary: Library for developing applications that parse WAP Binary XML Provides: %{name}-devel = %{version}-%{release} Provides: %{_lib}%{name}-devel = %{version}-%{release} Requires: %{libname} = %{version}-%{release} %description -n %libname-devel wbxml2 is a library that includes a WBXML parser and a WBXML compiler. (WBXML is the WAP Binary XML format used by many mobile devices) Unlike wbxml, it does not depend on libxml2 but on expat, making it faster and more portable. This package contains the headers and other development files required to compile applications that need to parse WBXML. %package -n %{libname}-static-devel Group: Development/C License: GPL Summary: Static Library for developing applications that parse WAP Binary XML Provides: %{name}-static-devel = %{version}-%{release} Requires: %{libname}-devel = %{version}-%{release} %description -n %libname-static-devel wbxml2 is a library that includes a WBXML parser and a WBXML compiler. (WBXML is the WAP Binary XML format used by many mobile devices) Unlike wbxml, it does not depend on libxml2 but on expat, making it faster and more portable. This package contains the static library that is required to compile applications that need to parse WBXML without depending on the shared library. %prep %setup -q #rm -Rf `find . -type d -name 'CVS'` %build sh ./bootstrap %configure perl -pi -e 's/\s+install-data-local//g' Makefile %make %install rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_DIR/file.list.wbxml make install-strip DESTDIR=$RPM_BUILD_ROOT rm -Rf %{buildroot}/%{_datadir}/doc %clean rm -rf $RPM_BUILD_ROOT %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %files %defattr(-,root,root) %{_bindir}/* %defattr(644,root,root,755) %doc ChangeLog AUTHORS %files -n %libname %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.so %{_libdir}/*.la %{_libdir}/pkgconfig/libwbxml2.pc %defattr(644,root,root,755) %doc README References TODO %files -n %{libname}-static-devel %defattr(-,root,root) %{_libdir}/*.a %changelog * Sat Aug 19 2006 Buchan Milne <bgmilne@mandriva.org> 0.9.2-1mdv2007.0 - New release 0.9.2 - drop p0 * Thu Dec 23 2004 Buchan Milne <bgmilne@linux-mandrake.com> 0.9.0-1mdk - first Mandrake package based on spec in source - include patch for nokia6600