diff options
-rw-r--r-- | debian/patches/cross.patch | 25 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 4 |
3 files changed, 28 insertions, 2 deletions
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch new file mode 100644 index 0000000..68582cc --- /dev/null +++ b/debian/patches/cross.patch @@ -0,0 +1,25 @@ +--- brightd-0.4.1.orig/Makefile ++++ brightd-0.4.1/Makefile +@@ -1,3 +1,4 @@ ++INSTALL ?= install + PREFIX=$(DESTDIR)/usr + BINDIR=bin/ + #NO_X11=1 # (Uncomment this to disable X11 Support) +@@ -14,14 +15,14 @@ + all: brightd brightd.1 + + brightd: brightd.c +- gcc $@.c $(CFLAGS) $(A_CFLAGS) -o $@ ++ $(CC) $@.c $(CFLAGS) $(A_CFLAGS) -o $@ + + brightd.1: + sed -re 's/^\.nr no_x11 [01]/.nr no_x11 $(MAN_NO_X11)/' brightd.1.tpl > brightd.1 + + install: +- install -Ds brightd $(PREFIX)/$(BINDIR)/brightd +- install -D brightd.1 $(PREFIX)/share/man/man1/brightd.1 ++ $(INSTALL) -Ds brightd $(PREFIX)/$(BINDIR)/brightd ++ $(INSTALL) -D brightd.1 $(PREFIX)/share/man/man1/brightd.1 + + uninstall: + rm $(PREFIX)/$(BINDIR)/brightd diff --git a/debian/patches/series b/debian/patches/series index 2f2fce5..0e6aad9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 0003-Use-int-for-brightness-not-char.patch 0004-Reorder-gcc-arguments.patch 0005-Reword-the-contradiction-in-the-e-option-description.patch +cross.patch diff --git a/debian/rules b/debian/rules index cf2f64a..99ca9d0 100755 --- a/debian/rules +++ b/debian/rules @@ -8,10 +8,10 @@ dh $@ override_dh_auto_build: - $(MAKE) CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get LDFLAGS)" + dh_auto_build -- CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get LDFLAGS)" override_dh_auto_install: - $(MAKE) DESTDIR=$(CURDIR)/debian/brightd install + dh_auto_install -- INSTALL='install --strip-program=true' chmod 4755 $(CURDIR)/debian/brightd/usr/bin/brightd install -m 0644 -D debian/brightd-xsession $(CURDIR)/debian/brightd/etc/X11/Xsession.d/90brightd |