[slock] Use a different approach to config patching (#965482)
Petr Šabata
psabata at fedoraproject.org
Fri May 24 08:18:29 UTC 2013
commit bb677522f831a353abf293081c558f1a1039e897
Author: Petr Šabata <contyk at redhat.com>
Date: Fri May 24 10:18:25 2013 +0200
Use a different approach to config patching (#965482)
slock-1.0-config.patch | 17 -----------------
slock-1.1-config.patch | 15 +++++++++++++++
slock.spec | 12 ++++++++++--
3 files changed, 25 insertions(+), 19 deletions(-)
---
diff --git a/slock-1.1-config.patch b/slock-1.1-config.patch
new file mode 100644
index 0000000..50bb2e5
--- /dev/null
+++ b/slock-1.1-config.patch
@@ -0,0 +1,15 @@
+diff --git a/config.mk b/config.mk
+index 982d7a6..76b01f6 100644
+--- a/config.mk
++++ b/config.mk
+@@ -15,8 +15,8 @@ LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext
+
+ # flags
+ CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"\#005577\"
+-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+-LDFLAGS = -s ${LIBS}
++CFLAGS += -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
++LDFLAGS += ${LIBS}
+
+ # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS and add -DHAVE_BSD_AUTH
+ # On OpenBSD and Darwin remove -lcrypt from LIBS
diff --git a/slock.spec b/slock.spec
index 2aadb44..90bdc08 100644
--- a/slock.spec
+++ b/slock.spec
@@ -1,12 +1,14 @@
+%global _hardened_build 1
+
Name: slock
Version: 1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Simple X display locker
Group: User Interface/X
License: MIT
URL: http://tools.suckless.org/%{name}
Source0: http://dl.suckless.org/tools/%{name}-%{version}.tar.gz
-Patch0: slock-1.0-config.patch
+Patch0: slock-1.1-config.patch
BuildRequires: libX11-devel libXext-devel
%description
@@ -19,6 +21,9 @@ are out with friends or fetching some food from the local pub.
%patch0 -p1 -b .config
%build
+export CFLAGS="%{optflags}"
+export LDFLAGS="%{?__global_ldflags}"
+sed -i 's/^\t@/\t/' Makefile
make %{?_smp_mflags}
%install
@@ -31,6 +36,9 @@ make install PREFIX=%{buildroot}/usr
# binary for light windowmanagers, and it shouldn't appear in applications menu
%changelog
+* Thu May 23 2013 Petr Šabata <contyk at redhat.com> - 1.1-3
+- Use a different approach to config patching (#965482)
+
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list