diff --git a/srcpkgs/light/patches/00-no-help2man.patch b/srcpkgs/light/patches/00-no-help2man.patch new file mode 100644 index 0000000000..fbf232cd5d --- /dev/null +++ b/srcpkgs/light/patches/00-no-help2man.patch @@ -0,0 +1,31 @@ +--- Makefile.orig 2016-05-10 01:34:59.000000000 +0000 ++++ Makefile 2016-12-15 13:22:36.601576649 +0000 +@@ -9,27 +9,21 @@ + HELP2MAN_VERSION := $(shell help2man --version 2>/dev/null) + + all: +-ifndef HELP2MAN_VERSION +-$(error "help2man is not installed") +-endif + $(CC) $(CFLAGS) -g -o light src/helpers.c src/light.c src/main.c + exp: + $(CC) $(CFLAGS) -E src/helpers.c src/light.c + man: + help2man $(MANFLAGS) ./light | gzip - > light.1.gz + +-install: all man ++install: all + mkdir -p $(BINDIR) + cp -f ./light $(BINDIR)/light + chown root $(BINDIR)/light + chmod 4755 $(BINDIR)/light +- mkdir -p $(MANDIR) +- mv light.1.gz $(MANDIR) + + uninstall: + rm $(BINDIR)/light + rm -rf /etc/light +- rm $(MANDIR)/light.1.gz + + clean: + rm -vfr *~ light light.1.gz diff --git a/srcpkgs/light/patches/01-fix-pie.patch b/srcpkgs/light/patches/01-fix-pie.patch new file mode 100644 index 0000000000..a85d517a79 --- /dev/null +++ b/srcpkgs/light/patches/01-fix-pie.patch @@ -0,0 +1,18 @@ +--- Makefile.orig 2016-12-15 13:28:15.000000000 +0000 ++++ Makefile 2016-12-15 13:29:23.893597661 +0000 +@@ -3,13 +3,13 @@ + MANDIR=$(PREFIX)/share/man/man1 + + CC=gcc +-CFLAGS=-std=c89 -O2 -pedantic -Wall -I"./include" ++ORG_CFLAGS=-std=c89 -O2 -pedantic -Wall -I"./include" + MANFLAGS=-h -h -v -V + + HELP2MAN_VERSION := $(shell help2man --version 2>/dev/null) + + all: +- $(CC) $(CFLAGS) -g -o light src/helpers.c src/light.c src/main.c ++ $(CC) $(CFLAGS) $(ORG_CFLAGS) $(LDFLAGS) -g -o light src/helpers.c src/light.c src/main.c + exp: + $(CC) $(CFLAGS) -E src/helpers.c src/light.c + man: diff --git a/srcpkgs/light/template b/srcpkgs/light/template index 9d03acf877..b151e01ff8 100644 --- a/srcpkgs/light/template +++ b/srcpkgs/light/template @@ -1,6 +1,6 @@ # Template file for 'light' pkgname=light -version=0.9 +version=1.0 revision=1 build_style=gnu-makefile short_desc="Program to control backlight controllers" @@ -8,12 +8,7 @@ maintainer="Dennis Kraus " license="GPL-3" homepage="http://haikarainen.github.io/light/" distfiles="https://github.com/haikarainen/light/archive/v${version}.tar.gz" -checksum=a6015bad4d2b17507a140896d7f30b4ab47eb7a0faef670edf3f1e30de9cdfb6 - -pre_build() { - sed -i 's|^CFLAGS=|override CFLAGS+=|g' Makefile - sed -i 's|src/main.c$|src/main.c $(LDFLAGS)|' Makefile -} +checksum=974608ee42ffe85cfd23184306d56d86ec4e6f4b0518bafcb7b3330998b1af64 do_install() { vbin light