[packages/dropwatch] adapter, our cc/ldflags
glen
glen at pld-linux.org
Fri Oct 10 14:55:38 CEST 2014
commit 5258d031ef31a2f8ec7c61db0e746b46f6a8f1f9
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Oct 10 15:55:08 2014 +0300
adapter, our cc/ldflags
note: our eu-strip fails with this package
dropwatch.spec | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/dropwatch.spec b/dropwatch.spec
index 82f903e..087c951 100644
--- a/dropwatch.spec
+++ b/dropwatch.spec
@@ -2,16 +2,17 @@ Summary: Kernel dropped packet monitor
Name: dropwatch
Version: 1.4
Release: 1
+License: GPL v2+
+Group: Applications/System
Source0: https://fedorahosted.org/releases/d/r/dropwatch/%{name}-%{version}.tbz2
# Source0-md5: 5145753b3e9255bd9b190251ba4d3bbf
-License: GPLv2+
-Group: Applications/System
URL: http://fedorahosted.org/dropwatch
BuildRequires: binutils-devel
BuildRequires: libnl-devel
BuildRequires: linux-libc-headers
BuildRequires: pkgconfig
BuildRequires: readline-devel
+BuildRequires: sed >= 4.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -21,17 +22,23 @@ dropped network packets.
%prep
%setup -q
-%build
cd src
-export CFLAGS=$RPM_OPT_FLAGS
-%{__make}
+%{__sed} -i -e 's,gcc,$(CC),g' Makefile
+%{__sed} -i -e '/^CFLAGS/ s/$/ $(EXTRA_CFLAGS)/' Makefile
+%{__sed} -i -e '/^LDFLAGS/ s/$/ $(EXTRA_LDFLAGS)/' Makefile
+
+%build
+%{__make} -C src \
+ CC="%{__cc}"
+ EXTRA_CFLAGS="%{rpmcflags}" \
+ EXTRA_LDFLAGS="%{rpmldflags}" \
+ %{nil}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
-install src/dropwatch $RPM_BUILD_ROOT%{_bindir}
-install doc/dropwatch.1 $RPM_BUILD_ROOT%{_mandir}/man1
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
+install -p src/dropwatch $RPM_BUILD_ROOT%{_bindir}
+cp -p doc/dropwatch.1 $RPM_BUILD_ROOT%{_mandir}/man1
%clean
rm -rf $RPM_BUILD_ROOT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dropwatch.git/commitdiff/5258d031ef31a2f8ec7c61db0e746b46f6a8f1f9
More information about the pld-cvs-commit
mailing list