%define name libupnp %define version 1.2.1a %define verroot 1.2.1 %define release 3mdk %define major 0 %define libname %mklibname upnp %major Name: %{name} Summary: Library and tools for the UPnP protocol Version: %{version} Release: %{release} Source: http://prdownloads.sourceforge.net/upnp/%{name}-%{version}.tar.bz2 Patch0: libupnp-1.2.1a-buildfix.patch.bz2 Patch1: libupnp-1.2.1a-sofix.patch.bz2 URL: http://upnp.sourceforge.net/ License: BSD Group: System/Libraries BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: doc++ tetex-latex tetex-dvips ghostscript %description The Linux SDK for UPnP Devices (libupnp) provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification. %package -n %{libname} Summary: Dynamic libraries from %name Group: System/Libraries %description -n %{libname} Dynamic libraries from %name. %package -n %{libname}-devel Summary: Header files and static libraries from %name Group: Development/C Requires: %{libname} >= %{version} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %name-devel %description -n %{libname}-devel Libraries and includes files for developing programs based on %name. %prep %setup -q %patch0 %patch1 -p1 #perl -pi -e "s|version|%verroot|" ixml/src/Makefile threadutil/src/Makefile upnp/src/makefile perl -pi -e "s|-Os|$RPM_OPT_FLAGS||g" `find -name makefile` perl -pi -e "s|-Os|$RPM_OPT_FLAGS||g" `find -name Makefile` chmod 644 `find -type f` %build cd upnp %make make doc %install rm -rf $RPM_BUILD_ROOT mkdir -p %buildroot/%_includedir/upnp cp upnp/inc/* %buildroot/%_includedir/upnp mkdir -p %buildroot/%_libdir cp upnp/bin/libixml.so %buildroot/%_libdir/libixml.so.0 cp upnp/bin/libthreadutil.so %buildroot/%_libdir/libthreadutil.so.0 cp upnp/bin/libupnp.so %buildroot/%_libdir/libupnp.so.0 cd %buildroot/%_libdir ln -s libixml.so.0 libixml.so ln -s libthreadutil.so.0 libthreadutil.so ln -s libupnp.so.0 libupnp.so %clean rm -rf $RPM_BUILD_ROOT %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %doc LICENSE README upnp/doc/html upnp/doc/*.pdf %{_includedir}/* %{_libdir}/*.so %changelog * Sun Aug 14 2005 Austin Acton <austin@mandriva.org> 1.2.1a-3mdk - debian fix is better than mine * Sat Aug 13 2005 Austin Acton <austin@mandriva.org> 1.2.1a-2mdk - some fancy footwork to: - follow libification policy - follow multiarch policy * Sat Aug 13 2005 Austin Acton <austin@mandrake.org> 1.2.1a-1mdk - initial package