[packages/xbelld] - added link patch to fix build with as-needed - pass more compiler/linker flags, disable debugging

qboosh qboosh at pld-linux.org
Thu Jun 6 09:42:05 CEST 2013


commit 5c4e0aab1b62ebc6a4c437faac5c0a537a92a948
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jun 6 09:41:50 2013 +0200

    - added link patch to fix build with as-needed
    - pass more compiler/linker flags, disable debugging code
    - BR: pkgconfig (used in Makefile)

 xbelld-link.patch | 11 +++++++++++
 xbelld.spec       | 11 +++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/xbelld.spec b/xbelld.spec
index d70751e..4f74236 100644
--- a/xbelld.spec
+++ b/xbelld.spec
@@ -8,8 +8,10 @@ Group:		X11/Applications
 #Source0-Download: https://code.google.com/p/xbelld/downloads/list
 Source0:	http://xbelld.googlecode.com/files/%{name}-%{version}.tbz2
 # Source0-md5:	97bdba8c9c306af51e1abf228df3d9b9
+Patch0:		%{name}-link.patch
 URL:		http://code.google.com/p/xbelld/
 BuildRequires:	alsa-lib-devel
+BuildRequires:	pkgconfig
 BuildRequires:	xorg-lib-libX11-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -45,11 +47,16 @@ sygnału równocześnie ze zdefiniowaną akcją).
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
+CFLAGS="%{rpmcflags}" \
+CPPFLAGS="%{rpmcppflags}" \
+LDFLAGS="%{rpmldflags}" \
 %{__make} \
-	CFLAGS="%{rpmcflags} -Wall -DVERSION="\\\"%{version}\\\"" -DHAVE_ALSA" \
-	LDFLAGS="%{rpmldflags} -lm"
+	CC="%{__cc}" \
+	LOADLIBES="-lm" \
+	%{!?debug:NO_DEBUG=1}
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/xbelld-link.patch b/xbelld-link.patch
new file mode 100644
index 0000000..cbca35b
--- /dev/null
+++ b/xbelld-link.patch
@@ -0,0 +1,11 @@
+--- xbelld-0.3.4/Makefile.orig	2013-06-01 05:50:37.000000000 +0200
++++ xbelld-0.3.4/Makefile	2013-06-06 09:38:06.803649982 +0200
+@@ -34,7 +34,7 @@
+ 	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+ 
+ xbelld: $(objects) features.mk
+-	$(CC) $(LDFLAGS) $(LOADLIBES) $(LDLIBS) $(objects) -o xbelld
++	$(CC) $(LDFLAGS) $(objects) $(LOADLIBES) $(LDLIBS) -o xbelld
+ 
+ .PHONY: clean
+ clean:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xbelld.git/commitdiff/5c4e0aab1b62ebc6a4c437faac5c0a537a92a948



More information about the pld-cvs-commit mailing list