Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > d0e35b5940e21a9ffb93606ac7f1dd57 > files > 4

misdn-3.4-0.20061023.3mdv2009.0.src.rpm

%define	snap 20061023

%define	major 0
%define libname	%mklibname misdn %{major}

Summary:	Modular ISDN (mISDN) libraries
Name:		misdn
Version:	3.4
Release:	%mkrel 0.%{snap}.3
Group:		System/Libraries
License:	GPL
URL:		http://isdn.jolly.de/
Source0:	mISDNuser-%{snap}.tar.bz2
Source1:	mISDN.tar.bz2
# Build shared libraries, use optflags:
Patch0:		mISDNuser-shared.diff
Epoch:		1
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
Provides:	%{name}-devel = %{epoch}:%{version}-%{release}
Provides:	lib%{name}-devel = %{epoch}:%{version}-%{release}
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 mISDNuser -a1

# fix strange perms
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

# cvs cleanup
for i in `find . -type d -name CVS` `find . -type d -name .svn` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -r $i; fi >&/dev/null
done

%patch0 -p1
    
%build

%make LDFLAGS="%ldflags"

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_libdir}
install -d %{buildroot}%{_includedir}/mISDNuser

# install static libs
install -m0644 i4lnet/libisdnnet.a %{buildroot}%{_libdir}/
install -m0644 lib/libmISDN.a %{buildroot}%{_libdir}/
install -m0644 suppserv/libsuppserv.a %{buildroot}%{_libdir}/
install -m0644 tenovis/lib/libtenovis.a %{buildroot}%{_libdir}/

install -m0644 i4lnet/libisdnnet_pic.a %{buildroot}%{_libdir}/
install -m0644 lib/libmISDN_pic.a %{buildroot}%{_libdir}/
install -m0644 suppserv/libsuppserv_pic.a %{buildroot}%{_libdir}/

# install shared libs
install -m0755 i4lnet/libisdnnet.so.%{major} %{buildroot}%{_libdir}/
install -m0755 lib/libmISDN.so.%{major} %{buildroot}%{_libdir}/
install -m0755 suppserv/libsuppserv.so.%{major} %{buildroot}%{_libdir}/
install -m0755 tenovis/lib/libtenovis.so.%{major} %{buildroot}%{_libdir}/

# make some softlinks
ln -s libisdnnet.so.%{major} %{buildroot}%{_libdir}/libisdnnet.so
ln -s libmISDN.so.%{major} %{buildroot}%{_libdir}/libmISDN.so
ln -s libsuppserv.so.%{major} %{buildroot}%{_libdir}/libsuppserv.so
ln -s libtenovis.so.%{major} %{buildroot}%{_libdir}/libtenovis.so

# install headers
install -m0644 i4lnet/*.h %{buildroot}%{_includedir}/mISDNuser/
install -m0644 include/*.h %{buildroot}%{_includedir}/mISDNuser/
install -m0644 tenovis/lib/*.h %{buildroot}%{_includedir}/mISDNuser/
install -m0644 suppserv/*.h %{buildroot}%{_includedir}/mISDNuser/

# hack the headers...
pushd %{buildroot}%{_includedir}/mISDNuser
    for h in *.h; do
	perl -pi -e "s|\"${h}\"|\<mISDNuser/${h}\>|g" *.h
    done
    perl -pi -e "s|\<mISDNif.h\>|\<mISDNuser/mISDNif.h\>|g" mISDNlib.h
popd

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc COPYING.LIB LICENSE
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%dir %{_includedir}/mISDNuser
%{_includedir}/mISDNuser/*.h
%{_libdir}/*.so
%{_libdir}/*.a




%changelog
* Mon Jun 16 2008 Anssi Hannula <anssi@mandriva.org> 1:3.4-0.20061023.3mdv2009.0
+ Revision: 219464
- fix broken symlink in -devel package
- use %%ldflags and fix underlinking

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Mon Dec 17 2007 Thierry Vignaud <tvignaud@mandriva.com> 1:3.4-0.20061023.2mdv2008.1
+ Revision: 130007
- kill re-definition of %%buildroot on Pixel's request


* Tue Oct 24 2006 Oden Eriksson <oeriksson@mandriva.com> 3.4-0.20061023.2mdv2007.0
+ Revision: 72069
- make it actually work...
- update to the latest code from cvs (3.4+)
- rediff the shared patch
- bundle the kernel headers as a tar ball
- Import misdn

* Thu Aug 03 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0-1mdv2007.0
- rebuild

* Sun Feb 19 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0-2mdk
- rebuild

* Sun Feb 19 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0-1mdk
- 3.0
- change include dir name to match asterisk-1.2.4+

* Sun Oct 30 2005 Oden Eriksson <oeriksson@mandriva.com> 1:3.0-0.beta.3mdk
- added one gcc4 fix

* Sun Apr 10 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1:3.0-0.beta.2mdk
- fix deps (forgot epoch, oops!)

* Sun Apr 03 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