diff --git a/slock-1.0-config.patch b/slock-1.0-config.patch deleted file mode 100644 index 4d50dbc..0000000 --- a/slock-1.0-config.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/config.mk b/config.mk -index addb499..c7ed127 100644 ---- a/config.mk -+++ b/config.mk -@@ -14,9 +14,9 @@ INCS = -I. -I/usr/include -I${X11INC} - 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} -+CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"\#3c6eb4\" -+CFLAGS = -fPIC ${RPM_OPT_FLAGS} ${INCS} ${CPPFLAGS} -+LDFLAGS = -z now ${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-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 - 1.1-3 +- Use a different approach to config patching (#965482) + * Fri Feb 15 2013 Fedora Release Engineering - 1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild