diff --git a/libnet.spec b/libnet.spec index 4a2826a..6879424 100644 --- a/libnet.spec +++ b/libnet.spec @@ -1,11 +1,14 @@ Summary: C library for portable packet creation and injection Name: libnet Version: 1.1.6 -Release: 6%{?dist} +Release: 7%{?dist} License: BSD Group: System Environment/Libraries URL: http://www.sourceforge.net/projects/libnet-dev/ Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +BuildRequires: autoconf, automake, libtool +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description @@ -19,7 +22,7 @@ complementary functionality. %package devel Summary: Development files for the libnet library Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The libnet-devel package includes header files and libraries necessary @@ -29,6 +32,9 @@ and sample test code for more detailed information. %prep %setup -q +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +autoreconf --force --install +%endif # Keep the sample directory untouched by make rm -rf __dist_sample @@ -36,19 +42,27 @@ mkdir __dist_sample cp -a sample __dist_sample %build -%configure --libdir=%{_libdir} +%if 0%{?fedora} < 17 && 0%{?rhel} < 7 +%configure --libdir=/%{_lib} +%else +%configure +%endif make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install -# Move %%{name}.so to %%{_libdir}, remove static .a and libtool .la files -rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}.{a,la,so} -pushd $RPM_BUILD_ROOT/%{_libdir} -#mkdir -p $RPM_BUILD_ROOT%%{_libdir} -ln -sf ../../%{_libdir}/$(ls %{name}.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/%{name}.so +%if 0%{?fedora} < 17 && 0%{?rhel} < 7 +# Move %{name}.so to %{_libdir}, remove static .a and libtool .la files +rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.{a,la,so} +pushd $RPM_BUILD_ROOT/%{_lib} +mkdir -p $RPM_BUILD_ROOT%{_libdir} +ln -sf ../../%{_lib}/$(ls %{name}.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/%{name}.so popd +%else +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.{a,la} +%endif # Prepare samples directory and perform some fixes rm -rf __dist_sample/sample/win32 @@ -71,7 +85,11 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README doc/CHANGELOG doc/CONTRIB doc/COPYING +%if 0%{?fedora} < 17 && 0%{?rhel} < 7 +/%{_lib}/%{name}.so.* +%else %{_libdir}/%{name}.so.* +%endif %files devel %defattr(-,root,root,-) @@ -84,6 +102,11 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/%{name}*.3* %changelog +* Fri Dec 20 2013 Robert Scheck 1.1.6-7 +- Run autoreconf to recognize aarch64 (#925813) +- Conditionalized usage of %%{_lib} vs %%{_libdir} for RHEL < 7 +- Tight run-time dependencies between sub-packages via %%{?_isa} + * Sat Aug 03 2013 Fedora Release Engineering - 1.1.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild