[mingw-wpcap: 21/22] Modernize the spec file

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 18:13:47 UTC 2012


commit 0a5e764aa841c179b9b676ee5b38efb33717ce4d
Author: Kalev Lember <kalevlember at gmail.com>
Date:   Wed Mar 7 20:08:57 2012 +0200

    Modernize the spec file

 mingw-wpcap.spec |   28 +++++++---------------------
 1 files changed, 7 insertions(+), 21 deletions(-)
---
diff --git a/mingw-wpcap.spec b/mingw-wpcap.spec
index 2450851..1ec9408 100644
--- a/mingw-wpcap.spec
+++ b/mingw-wpcap.spec
@@ -1,3 +1,7 @@
+%global __strip %{_mingw32_strip}
+%global __objdump %{_mingw32_objdump}
+%define __debug_install_post %{_mingw32_debug_install_post}
+
 %global versionmajor 4
 %global versionminor 1
 %global versionsuffix 2
@@ -18,10 +22,9 @@ Source1:        wpcap.pc
 Patch0:         wpcap.patch
 Patch1:         wpcap-w2k.patch
 Patch2:         winpcap-mingw-w64-compatibility.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
-BuildRequires:  mingw32-filesystem >= 52
+BuildRequires:  mingw32-filesystem
 BuildRequires:  mingw32-gcc
 BuildRequires:  doxygen
 BuildRequires:  unzip
@@ -34,7 +37,6 @@ MinGW Windows pcap library.
 
 %package -n mingw32-wpcap
 Summary:        MinGW user-level packet capture
-Requires:       mingw32-filesystem >= 50
 
 %description -n mingw32-wpcap
 MinGW Windows pcap library.
@@ -56,16 +58,7 @@ Requires:       mingw32-wpcap = %{version}
 %description -n mingw32-wpcap-docs
 This package contains the Windows pcap library documentation.
 
-%global _use_internal_dependency_generator 0
-%global __find_requires %{_mingw32_findrequires}
-%global __find_provides %{_mingw32_findprovides}
-
-%global __strip %{_mingw32_strip}
-%global __objdump %{_mingw32_objdump}
-
-%define __debug_install_post %{_mingw32_debug_install_post}
-
-%{_mingw32_debug_package}
+%{?_mingw32_debug_package}
 
 %prep
 %setup -q -n winpcap
@@ -99,7 +92,6 @@ popd
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/%{_mingw32_bindir}
 install -d $RPM_BUILD_ROOT/%{_mingw32_libdir}/pkgconfig
 install -m0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_mingw32_libdir}/pkgconfig
@@ -137,12 +129,7 @@ rm -rf $RPM_BUILD_ROOT/%{wpcapexamples}/pcap/winpcap_stress
 rm -rf $RPM_BUILD_ROOT/%{wpcapexamples}/pcap/stats
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files -n mingw32-wpcap
-%defattr(-,root,root,-)
 %doc wpcap/libpcap/LICENSE
 %{_mingw32_libdir}/pkgconfig/wpcap.pc
 %{_mingw32_bindir}/packet.dll
@@ -154,17 +141,16 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw32_includedir}/wpcap
 
 %files -n mingw32-wpcap-docs
-%defattr(-,root,root,-)
 %{wpcapdoc}/WinPcap_docs.html
 %{wpcapdoc}/html
 
 %files -n mingw32-wpcap-examples
-%defattr(-,root,root,-)
 %{wpcapexamples}
 
 %changelog
 * Wed Mar 07 2012 Kalev Lember <kalevlember at gmail.com> - 4.1.final2-6
 - Renamed the source package to mingw-wpcap (#801038)
+- Modernize the spec file
 
 * Mon Feb 27 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 4.1.final2-5
 - Rebuild against the mingw-w64 toolchain


More information about the scm-commits mailing list