X-Git-Url: https://code.delx.au/refind/blobdiff_plain/bd37f32c146acb559e60bf3b8af85a92957e13b3..278bed1cfa0a2bc31db18617cad24170014c05b3:/debian/rules diff --git a/debian/rules b/debian/rules index ab1f351..e18c5c3 100755 --- a/debian/rules +++ b/debian/rules @@ -1,16 +1,41 @@ #!/usr/bin/make -f -DH_VERBOSE=1 + +export DH_VERBOSE := 1 + +DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) +ifeq (amd64, $(DEB_HOST_ARCH_CPU)) + EFI_ARCH := x64 +else +ifeq (i386, $(DEB_HOST_ARCH_CPU)) + EFI_ARCH := ia32 +else +ifeq (arm64, $(DEB_HOST_ARCH_CPU)) + EFI_ARCH := aa64 +else + $(warning EFI architecture for $(DEB_HOST_ARCH_CPU) is unknown) + EFI_ARCH := $(DEB_HOST_ARCH_CPU) +endif +endif +endif + %: dh $@ override_dh_auto_clean: - rm -rf $$(pwd)/debian/files $$(pwd)/debian/refind.* $$(pwd)/debian/refind - $(MAKE) clean - rm -f $$(pwd)/drivers*/* + dh_auto_clean + rm -rf drivers_*/ override_dh_auto_build: $(MAKE) gnuefi $(MAKE) fs_gnuefi override_dh_auto_install: - $$(pwd)/debian/debinstall $$(pwd)/debian/refind + # "make install" actually runs "efi-install" for the current system, so let's not do that :) + +override_dh_install: + dh_install + mkdir -p debian/refind/usr/share/refind/refind/tools_$(EFI_ARCH) + cp gptsync/gptsync_$(EFI_ARCH).efi debian/refind/usr/share/refind/refind/tools_$(EFI_ARCH)/ + +override_dh_installchangelogs: + dh_installchangelogs NEWS.txt