Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > by-pkgid > b8e64e52210f06bd566e451214855c1d > files > 2

libnl-1.0-0.pre5.2mdv2007.0.src.rpm

%define	name libnl
%define version  1.0
%define pre pre5
%if %{pre}
%define release  %mkrel 0.%{pre}.2
%define fullversion %{version}-%{pre}
%else
%define release  %mkrel 1
%define fullversion %{version}
%endif
%define major 1
%define libname %mklibname nl %major

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	Library for applications dealing with netlink sockets
License:	GPL
Group:		System/X11
URL:		http://people.suug.ch/~tgr/libnl/
Source0:	http://people.suug.ch/~tgr/libnl/files/libnl-%{fullversion}.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
libnl is a library for applications dealing with netlink sockets.
The library provides an interface for raw netlink messaging and 
various netlink family specific interfaces.

#--------------------------------------------------------------------

%package -n %libname
Group:		System/Libraries
Summary:	Library for applications dealing with netlink sockets
Provides:	%name = %version-%release

%description -n %libname
libnl is a library for applications dealing with netlink sockets.
The library provides an interface for raw netlink messaging and
various netlink family specific interfaces.

%post -n %libname -p /sbin/ldconfig
%postun -n %libname -p /sbin/ldconfig

%files -n %libname
%defattr(-,root,root)
%{_libdir}/libnl.so.1
%{_libdir}/libnl.so.1.0-pre5


#--------------------------------------------------------------------
%package -n %libname-devel
Group:    Development/C
Summary:  Header files of libnl
Requires: %name = %version
Provides: %name-devel = %version-%release

%description -n %libname-devel
libnl is a library for applications dealing with netlink sockets.
The library provides an interface for raw netlink messaging and
various netlink family specific interfaces.

%files -n %libname-devel
%defattr(-,root,root)
%{_includedir}/netlink/*.h
%{_includedir}/netlink/route/*.h
%{_includedir}/netlink/route/cls/*.h
%{_includedir}/netlink/route/sch/*.h
%{_libdir}/libnl.so
%{_libdir}/pkgconfig/%{name}-%{major}.pc
#---------------------------------------------------------------------

%prep

%setup -q -n %{name}-%{fullversion}

%build

%configure2_5x
%make

%install
rm -rf %buildroot

%{makeinstall_std}

install -d %{buildroot}%{_libdir}/pkgconfig/
cat << EOF > %{buildroot}%{_libdir}/pkgconfig/%{name}-%{major}.pc
prefix=%{_prefix}
exec_prefix=\${prefix}
libdir=%{_libdir}
includedir=%{_includedir}

Name: libnl
Description: Convenience library for netlink sockets
Version: %{fullversion}
Libs: -L\${libdir} -lnl
Cflags:
EOF

%clean
rm -rf %buildroot



%changelog
* Tue Jul 18 2006 blino
+ 2006-07-18 16:10:22 (41536)
- bump release

* Tue Jul 18 2006 blino
+ 2006-07-18 16:09:17 (41535)
- add pkgconfig file (required for NetworkManager)

* Tue Jul 18 2006 blino
+ 2006-07-18 15:36:04 (41534)
- define fullversion to work easily with pre version

* Wed Jul 12 2006 Nicolas Lécureuil <neoclust@mandriva.org>
+ 2006-07-12 18:28:32 (40979)
- import libnl-1.0-0.pre5.1mdv2007.0