#!/usr/bin/make -f export QT_SELECT=qt5 export DEB_BUILD_MAINT_OPTIONS=hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk # The build system doesn't use CPPFLAGS, pass them to CFLAGS/CXXFLAGS to # enable the missing (hardening) flags DEB_CFLAGS_MAINT_APPEND = -MMD -Wall $(shell dpkg-buildflags --get CPPFLAGS) DEB_CXXFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS) DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export DEB_CFLAGS_MAINT_APPEND DEB_CXXFLAGS_MAINT_APPEND DEB_LDFLAGS_MAINT_APPEND UCFLAGS = -MMD -Wall -fPIC $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS) BINDIR = /sbin V = 1 PKG_CONFIG ?= $(DEB_HOST_GNU_TYPE)-pkg-config export CC BINDIR V PKG_CONFIG DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) HOSTAPD_DOT_CONFIG := debian/config/hostapd/$(DEB_HOST_ARCH_OS) WPASUPPLICANT_DOT_CONFIG := debian/config/wpasupplicant/$(DEB_HOST_ARCH_OS) WPASUPPLICANT_UDEB_DOT_CONFIG := debian/config/wpasupplicant/$(DEB_HOST_ARCH_OS)-udeb ### start dh overrides override_dh_auto_configure: dh_auto_configure --sourcedirectory=wpa_supplicant/wpa_gui-qt4 \ --buildsystem=qmake override_dh_auto_build: # build documentation dh_auto_build --sourcedirectory=wpa_supplicant/doc/docbook \ --buildsystem=makefile \ -- man # build wpasupplicant-udeb cp -v --remove-destination $(WPASUPPLICANT_UDEB_DOT_CONFIG) wpa_supplicant/.config CFLAGS="$(UCFLAGS)" dh_auto_build --sourcedirectory=wpa_supplicant \ --buildsystem=makefile mv -v wpa_supplicant/wpa_supplicant wpa_supplicant/wpa_supplicant-udeb dh_auto_clean --sourcedirectory=wpa_supplicant \ --buildsystem=makefile # build wpasupplicant cp -v --remove-destination $(WPASUPPLICANT_DOT_CONFIG) wpa_supplicant/.config dh_auto_build --sourcedirectory=wpa_supplicant \ --buildsystem=makefile # build wpa_gui-qt4 dh_auto_build --sourcedirectory=wpa_supplicant/wpa_gui-qt4 \ --buildsystem=qmake dh_auto_clean --sourcedirectory=src --buildsystem=makefile # build hostapd cp -v --remove-destination $(HOSTAPD_DOT_CONFIG) hostapd/.config dh_auto_build --sourcedirectory=hostapd \ --buildsystem=makefile dh_auto_clean --sourcedirectory=src --buildsystem=makefile override_dh_auto_clean: dh_auto_clean --sourcedirectory=wpa_supplicant/doc/docbook \ --buildsystem=makefile dh_auto_clean --sourcedirectory=wpa_supplicant \ --buildsystem=makefile dh_auto_clean --sourcedirectory=wpa_supplicant/wpa_gui-qt4 \ --buildsystem=qmake -find wpa_supplicant/wpa_gui-qt4 -type d -name \.moc -exec rm -rf {} \; -find wpa_supplicant/wpa_gui-qt4 -type d -name \.ui -exec rm -rf {} \; -find wpa_supplicant/wpa_gui-qt4 -type d -name \.obj -exec rm -rf {} \; dh_auto_clean --sourcedirectory=hostapd \ --buildsystem=makefile override_dh_auto_install: $(info Skip dh_auto_install ...) override_dh_clean: # make sure to remove the staging directory for the udeb rm -rf debian/wpasupplicant-udeb dh_clean override_dh_install: dh_install # install D-Bus service activation files & configuration install --mode=644 -D wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ debian/wpasupplicant/etc/dbus-1/system.d/wpa_supplicant.conf # Install udeb install --mode=755 -D wpa_supplicant/wpa_supplicant-udeb \ debian/wpasupplicant-udeb/sbin/wpa_supplicant override_dh_installchangelogs: dh_installchangelogs --package=hostapd hostapd/ChangeLog dh_installchangelogs --package=wpasupplicant wpa_supplicant/ChangeLog dh_installchangelogs --package=wpagui wpa_supplicant/ChangeLog ### end dh overrides %: dh ${@} get-orig-source: chmod +x $(CURDIR)/debian/get-orig-source $(CURDIR)/debian/get-orig-source $(CURDIR)