armbian-build/extras-buildpkgs/libglshim/debian/rules
2016-09-10 17:31:43 +03:00

45 lines
1.1 KiB
Makefile

#!/usr/bin/make -f
#export DH_VERBOSE=1
# Get the architecture triplet:
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS=hardening=-all,+format,+stackprotector,+pie
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
DEB_HOST_DISTRIBUTION = Ubuntu
else
DEB_HOST_DISTRIBUTION = Debian
endif
ifeq ($(DEB_HOST_DISTRIBUTION), Ubuntu)
private_dir = glshim
else
private_dir =
endif
override_dh_auto_configure:
for file in debian/*.in; \
do \
sed -e"s,\$${DEB_HOST_MULTIARCH},$(DEB_HOST_MULTIARCH),g" \
-e"s,\$${private_dir},${private_dir},g" \
-e"s,\$${distribution},${DEB_HOST_DISTRIBUTION},g" \
$${file} > $${file%%.in}; \
done
dh_auto_configure -- -DCMAKE_VERBOSE_MAKEFILE=OFF -DPRIVATEDIR=$(private_dir)
override_dh_auto_build:
dh_auto_build -- GL preload
override_dh_install:
dh_install
ifeq ($(DEB_HOST_DISTRIBUTION), Ubuntu)
echo "/usr/lib/$(DEB_HOST_MULTIARCH)/$(private_dir)" > $(CURDIR)/debian/libglshim1/usr/lib/$(DEB_HOST_MULTIARCH)/$(private_dir)/ld.so.conf
endif
override_dh_strip:
%:
dh $@