Add 'make deb' to make debian firmware package.

This commit is contained in:
Nick Bartos
2016-07-02 13:26:32 -07:00
parent 5a7083bd98
commit 2c9e539540
2 changed files with 19 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
SHELL = /bin/bash
DEB_NAME:=facetimehd-firmware
DEB_VER:=0.1-1
DEB_BASE_DIR:=debian
DMG:=osxupd10.11.3.dmg
OSX_DRV:=AppleCameraInterface
OSX_DRV_DIR:=System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS
@@ -20,6 +24,12 @@ FW_DIR:="$(FW_DIR_BASE)/facetimehd"
all: $(OSX_DRV)
@./extract-firmware.sh -x "$(OSX_DRV)"
deb: all
@install -D -m 644 "firmware.bin" "$(DEB_BASE_DIR)/$(DEB_NAME)_$(DEB_VER)/lib/firmware/facetimehd/firmware.bin"
@mkdir -p "$(DEB_BASE_DIR)/$(DEB_NAME)_$(DEB_VER)/DEBIAN"
@(sed -e "s|^Package:.*|Package: $(DEB_NAME)|g" -e "s|^Version:.*|Version: $(DEB_VER)|g" "$(DEB_BASE_DIR)/control.template" > "$(DEB_BASE_DIR)/$(DEB_NAME)_$(DEB_VER)/DEBIAN/control")
@fakeroot dpkg-deb --build "$(DEB_BASE_DIR)/$(DEB_NAME)_$(DEB_VER)"
$(OSX_DRV):
@echo ""
@echo "Checking dependencies for driver download..."
@@ -40,4 +50,5 @@ install:
clean:
rm -f AppleCamera{Interface,.sys}
rm -f firmware.bin
rm -rf "$(DEB_BASE_DIR)/$(DEB_NAME)_$(DEB_VER)"
rm -f "$(DEB_BASE_DIR)"/*.deb