#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 nv_libs_Debian += nvidia-driver-libs [!armhf] | nv_libs_Debian += nvidia-tesla-535-driver-libs [amd64 i386 arm64 ppc64el] | nv_libs_Debian += nvidia-driver-libs-any | nv_libs_Debian += bumblebee-nvidia | nv_libs_Ubuntu += bumblebee-nvidia | VENDOR := $(shell dpkg-vendor --derives-from Ubuntu && echo Ubuntu || echo Debian) DPKG_EXPORT_BUILDFLAGS = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/default.mk include /usr/share/dpkg/architecture.mk ifeq ($(VENDOR),Ubuntu) PRIMUS_libGLa=/usr/lib/$(DEB_HOST_MULTIARCH)/mesa/libGL.so.1 PRIMUS_libGLd=/usr/lib/$(DEB_HOST_MULTIARCH)/mesa/libGL.so.1 else PRIMUS_libGLa=/usr/lib/$(DEB_HOST_MULTIARCH)/libGL.so.1 PRIMUS_libGLd=/usr/lib/$(DEB_HOST_MULTIARCH)/libGL.so.1 endif # Where to put the resulting library during build BUILD_LIBDIR ?= lib %: dh $@ execute_after_dh_auto_clean: rm -rf $(BUILD_LIBDIR) override_dh_auto_build: dh_auto_build -- LIBDIR=$(BUILD_LIBDIR) \ PRIMUS_libGLd=$(PRIMUS_libGLd) \ PRIMUS_libGLa=$(PRIMUS_libGLa) override_dh_gencontrol: dh_gencontrol -- -V'nvidia:Depends=$(nv_libs_$(VENDOR))'