From 2c9e539540364812c510763ea6ff9a05575f4659 Mon Sep 17 00:00:00 2001 From: Nick Bartos Date: Sat, 2 Jul 2016 13:26:32 -0700 Subject: [PATCH] Add 'make deb' to make debian firmware package. --- firmware/Makefile | 13 ++++++++++++- firmware/debian/control.template | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 firmware/debian/control.template diff --git a/firmware/Makefile b/firmware/Makefile index 32e2b88..32a6773 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -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 diff --git a/firmware/debian/control.template b/firmware/debian/control.template new file mode 100644 index 0000000..cb99e64 --- /dev/null +++ b/firmware/debian/control.template @@ -0,0 +1,7 @@ +Package: +Version: +Section: Miscellaneous - Text Based +Priority: optional +Maintainer: Patrik Jakobsson +Architecture: all +Description: Firmware for facetimehd