Finish off the last bit of debinstall
authorTianon Gravi <tianon@debian.org>
Wed, 25 Nov 2015 20:07:00 +0000 (12:07 -0800)
committerTianon Gravi <tianon@debian.org>
Wed, 25 Nov 2015 20:07:00 +0000 (12:07 -0800)
debian/debinstall [deleted file]
debian/refind.install
debian/rules

diff --git a/debian/debinstall b/debian/debinstall
deleted file mode 100755 (executable)
index 47f7f36..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-set -e
-
-BUILD_ROOT=$1
-
-UNAMEARCH=`uname -m`
-if [[ $UNAMEARCH == "x86_64" ]] ; then
-   EFIARCH=x64
-elif [[ $UNAMEARCH == "i686" || $UNAMEARCH == "i586" || $UNAMEARCH == "i486" || $UNAMEARCH == "i386" ]] ; then
-   EFIARCH=ia32
-else
-   EFIARCH=$UNAMEARCH
-fi
-
-mkdir -p $BUILD_ROOT/usr/share/refind/refind/
-
-install -Dp -m0644 gptsync/gptsync_$EFIARCH.efi $BUILD_ROOT/usr/share/refind/refind/tools_$EFIARCH/gptsync_$EFIARCH.efi
-
-echo "*** Exiting debinstall! ***"
index bac49b2..0d7031f 100644 (file)
@@ -1,8 +1,10 @@
 drivers_* usr/share/refind/refind
-icons usr/share/refind/refind
 refind.conf-sample usr/share/refind/refind
 refind/refind*.efi usr/share/refind/refind
 
+icons/*.png usr/share/refind/refind/icons
+icons/README usr/share/refind/refind/icons
+
 banners usr/share/refind
 fonts usr/share/refind
 
index af060f9..6f9c7f2 100755 (executable)
@@ -2,6 +2,18 @@
 
 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
+       $(warning EFI architecture for $(DEB_HOST_ARCH_CPU) is unknown)
+       EFI_ARCH := $(DEB_HOST_ARCH_CPU)
+endif
+endif
+
 %:
        dh $@
 
@@ -15,12 +27,11 @@ override_dh_auto_build:
 
 override_dh_auto_install:
        # "make install" actually runs "efi-install" for the current system, so let's not do that :)
-       ./debian/debinstall ./debian/refind
 
 override_dh_install:
        dh_install
-       rm -r debian/refind/usr/share/refind/refind/icons/svg # we don't want the SVGs installed
-       # TODO gptsync into tools_...?
+       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