Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > c7a1f2f22a8e0abdfa6f89eb6866e1d9 > files > 3

lcrzo-4.17.0-6mdk.src.rpm

%define name   lcrzo
%define version 4.17.0
%define so_version 4.17
%define release 6mdk

%define	major 4
%define libname	%mklibname %{name} %{major}

Name:		%{name}
Summary:	Lcrzo is a network library, for network administrators and network hackers
Group:		Networking/Other
Version:	%{version}
Release:	%{release}
License:	LGPL
URL:		http://www.laurentconstantin.com/en/lcrzo/
Provides:	liblcrzo
Source0:	%{name}-%{version}-src.tar.bz2
Patch0:		lcrzo-4.17.0-genemake.patch.bz2
BuildRequires:	libpcap-devel >= 0.7.2
#Requires:	libpcap0 >= 0.7.2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
Lcrzo is a network library, for network administrators and network
hackers. Its objective is to easily create network programs. This library
provides network functionnalities for Ethernet, IP, UDP, TCP, ICMP, ARP
and RARP protocols. It supports spoofing, sniffing, client and server
creation. Furthermore, lcrzo contains high level functions dealing with
data storage and handling. Using all these functions, you can quickly
create a network test program.

%package -n	%{libname}
Summary:	Shared libraries for %{name}
Group:          System/Libraries

%description -n		%{libname}
Lcrzo is a network library, for network administrators and network
hackers. Its objective is to easily create network programs. This library
provides network functionnalities for Ethernet, IP, UDP, TCP, ICMP, ARP
and RARP protocols. It supports spoofing, sniffing, client and server
creation. Furthermore, lcrzo contains high level functions dealing with
data storage and handling. Using all these functions, you can quickly
create a network test program.

%package	-n %{libname}-devel
Summary:	Development library and header files for the %{name} library
Group:		Development/Other
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel lib%{name}-devel
Obsoletes:	%{name}-devel lib%{name}-devel

%description -n %{libname}-devel
Lcrzo is a network library, for network administrators and network
hackers. Its objective is to easily create network programs. This library 
provides network functionnalities for Ethernet, IP, UDP, TCP, ICMP, ARP 
and RARP protocols. It supports spoofing, sniffing, client and server
creation. Furthermore, lcrzo contains high level functions dealing with
data storage and handling. Using all these functions, you can quickly
create a network test program.

%prep

%setup -q -n %{name}-%{version}-src
%patch0 -p0

%build

pushd src
    ./genemake
    %make GCCOPT="%{optflags} -Wall -ansi -fPIC" \
    GCCOPTL="%{optflags} -Wall -ansi -fPIC" \
    GCCOPTP="%{optflags} -Wall -ansi -fPIC" \
    liblcrzo.a

    #make a shared lib the hard way...
    rm -f lib%{name}*.so*
    gcc -Wl,-soname,lib%{name}.so.%{major} -shared %{optflags} -fPIC -o lib%{name}%{major}.so.%{so_version} *.o

popd

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

install -d %{buildroot}%{_libdir}
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_mandir}/man3
install -d %{buildroot}%{_includedir}

install -m0755 src/lcrzo-config %{buildroot}%{_bindir}/lcrzo-config

# install the shared lib
install -m0755 src/lib%{name}%{major}.so.%{so_version} %{buildroot}%{_libdir}/
ln -snf lib%{name}%{major}.so.%{so_version} %{buildroot}%{_libdir}/lib%{name}%{major}.so
ln -snf lib%{name}%{major}.so.%{so_version} %{buildroot}%{_libdir}/lib%{name}.so

# install the static lib
install -m0755 src/liblcrzo.a %{buildroot}%{_libdir}/liblcrzo.a

# install headers
install -m0644 src/lcrzo*.h %{buildroot}%{_includedir}/

# install only english man pages
install -m0644 doc/man/*en.* %{buildroot}%{_mandir}/man3/

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

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%post -n %{libname}-devel -p /sbin/ldconfig

%postun -n %{libname}-devel -p /sbin/ldconfig

%files -n %{libname}
%defattr(-,root,root)
%doc README_EN.TXT
%attr(0755,root,root) %{_libdir}/lib%{name}*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc doc/*en.txt doc/changelog.txt doc/credits.txt doc/todo.txt INSTALLUNIX_EN.TXT
%attr(0755,root,root) %{_bindir}/lcrzo-config
%attr(644,root,root) %{_libdir}/*.a
%attr(0755,root,root) %{_libdir}/*.so
%attr(0644,root,root) %{_includedir}/*
%attr(0644,root,root) %{_mandir}/man3/*

%changelog
* Fri Dec 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.17.0-6mdk
- revert latest "lib64 fixes"

* Tue Dec 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.17.0-5mdk
- lib64 fixes

* Sun Dec 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.17.0-4mdk
- fix deps

* Wed May 05 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.17.0-3mdk
- merge static-devel into the devel package
- misc spec file fixes

* Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.17.0-2mdk
- rebuild

* Thu Jun 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.17.0-1mdk
- 4.17.0
- make it provide
- use the %%mklibname macro
- updated P0
- huge spec file fixes

* Fri Jan 03 2003 Antoine Ginies <aginies@mandrakesoft.com> 4.16.0-2mdk
- rebuild for new glibc
* Wed Oct 23 2002 Antoine Ginies <aginies@mandrakesoft.com> 4.16.0-1mdk
- first release for mandrakesoft