summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2016-04-29 15:02:43 +0200
committerAndrew Shadura <andrew@shadura.me>2016-04-29 15:02:43 +0200
commita982189dd7869f36dd4f7df85452bdcbbf49bac8 (patch)
treef5253d100c395276fa3a1c97c15dbb439fd40f3e
parent2c991e5c060b46201f22c2b6826fa76bee105566 (diff)
Detect where libXft.so and libX11.so are located at build time.
-rwxr-xr-xdebian/rules7
1 files changed, 5 insertions, 2 deletions
diff --git a/debian/rules b/debian/rules
index 4cbd056..68ebd72 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,9 @@
#!/usr/bin/make -f
-export CFLAGS := -Wall -W $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
+LIBX11_SO := $(shell readlink /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/libX11.so | sed -ne 's,\.[0-9]\+\.[0-9]\+$$,,p')
+LIBXFT_SO := $(shell readlink /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/libXft.so | sed -ne 's,\.[0-9]\+\.[0-9]\+$$,,p')
+
+export CFLAGS := -Wall -W $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) -DLIBX11_SO=\\\"$(LIBX11_SO)\\\" -DLIBXFT_SO=\\\"$(LIBXFT_SO)\\\"
export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
ifeq "$(origin CC)" "default"
export CC := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)-gcc
@@ -11,7 +14,7 @@ export WMII_HGVERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\(
dh $@ --with python2
override_dh_auto_build:
- CFLAGS="$(CFLAGS)" $(MAKE) CC="$(CC) -c" PREFIX=/usr ETC=/etc/X11 STATIC="" LIBDIR="/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/wmii"
+ CFLAGS='$(CFLAGS)' $(MAKE) CC="$(CC) -c" PREFIX=/usr ETC=/etc/X11 STATIC="" LIBDIR="/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/wmii"
override_dh_auto_install:
$(MAKE) DESTDIR=$(CURDIR)/debian/wmii PREFIX=/usr ETC=/etc/X11 LIBDIR="/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/wmii" install