%define name misdn %define fname mISDNuser %define snap 2005_01_28 %define version 3.0 %define major 0 %define libname %mklibname %{name} %{major} %define epoch 1 Summary: Modular ISDN (mISDN) libraries Name: %{name} Version: %{version} Release: %mkrel 0.beta.2 Group: System/Libraries License: GPL URL: http://isdn.jolly.de/ Source0: http://isdn.jolly.de/download/v3.0beta/%{fname}_for_PBX4Linux_%{snap}.tar.bz2 Patch0: mISDNuser-CVS-2004-08-29-shared.diff.bz2 Patch1: mISDNuser-CVS-2004-07-08-cvs_fixes.diff.bz2 Epoch: %{epoch} BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Modular ISDN (mISDN) is the new ISDN stack of the linux kernel version 2.6. This package provides shared and static libraries as well as various header files. %package -n %{libname} Summary: Modular ISDN (mISDN) libraries Group: System/Libraries Epoch: %{epoch} %description -n %{libname} Modular ISDN (mISDN) is the new ISDN stack of the linux kernel version 2.6. This package provides the shared mISDN libraries. %package -n %{libname}-devel Summary: Static library and header files for the mISDN libraries Group: Development/C Obsoletes: %{name}-devel lib%{name}-devel Provides: %{name}-devel lib%{name}-devel Requires: %{libname} = %{epoch}:%{version}-%{release} Epoch: %{epoch} %description -n %{libname}-devel Modular ISDN (mISDN) is the new ISDN stack of the linux kernel version 2.6. This package provides shared and static libraries and header files. %prep %setup -q -n %{fname} %patch0 -p1 %patch1 -p1 %build make CFLAGS="%{optflags} -fPIC -DPIC -I\$(INCLUDEDIR)" %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir} install -d %{buildroot}%{_includedir}/misdn # install static libs install -m0644 i4lnet/libisdnnet.a %{buildroot}%{_libdir}/ install -m0644 lib/libmISDN.a %{buildroot}%{_libdir}/ install -m0644 tenovis/lib/libtenovis.a %{buildroot}%{_libdir}/ # install shared libs install -m0755 i4lnet/libisdnnet.so.%{major} %{buildroot}%{_libdir}/ install -m0755 lib/libmISDN.so.%{major} %{buildroot}%{_libdir}/ install -m0755 tenovis/lib/libtenovis.so.%{major} %{buildroot}%{_libdir}/ ln -s libisdnnet.so.%{major} %{buildroot}%{_libdir}/libisdnnet.so ln -s libmISDN.so.%{major} %{buildroot}%{_libdir}/libmISDN.so ln -s libtenovis.so.%{major} %{buildroot}%{_libdir}/libtenovis.so # install headers install -m0644 i4lnet/*.h %{buildroot}%{_includedir}/misdn/ install -m0644 include/*.h %{buildroot}%{_includedir}/misdn/ install -m0644 tenovis/lib/*.h %{buildroot}%{_includedir}/misdn/ # hack the headers... pushd %{buildroot}%{_includedir}/misdn for h in *.h; do perl -pi -e "s|\"${h}\"|\<misdn/${h}\>|g" *.h done perl -pi -e "s|\<mISDNif.h\>|\<misdn/mISDNif.h\>|g" mISDNlib.h popd %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %{_includedir}/misdn %{_libdir}/*.so %{_libdir}/*.a %changelog * Sat Apr 09 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1:3.0-0.beta.2mdk - fix deps (forgot epoch, oops!) * Sat Apr 02 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.0-0.beta.1mdk - use the jolly code instead (3.0 beta) - use the %%mkrel macro - use epoch * Sun Jan 09 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 20040708-2mdk - hack the headers location * Thu Jan 06 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 20040708-1mdk - initial mandrake package