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