Skip to content

Commit

Permalink
Add kext code signing to build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwise committed Sep 12, 2014
1 parent 879dad6 commit 530e413
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Expand Up @@ -14,21 +14,26 @@ ifeq (joshua,$(USER))
CODESIGN_INST ?= "Developer ID Installer: Joshua Wise (54GTJ2AU36)"
endif

all: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext
all: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext build/HoRNDIS.pkg

build/Release/HoRNDIS.kext: HoRNDIS.cpp HoRNDIS.h HoRNDIS-Info.plist HoRNDIS.xcodeproj HoRNDIS.xcodeproj/project.pbxproj
$(XCODEBUILD)

build/HoRNDIS-kext.pkg: build/Release/HoRNDIS.kext
pkgbuild --component $< --install-location /System/Library/Extensions/ $@

build/HoRNDIS.pkg: build/HoRNDIS-kext.pkg package/Distribution.xml
build/HoRNDIS-signed-kext.pkg: build/signed/HoRNDIS.kext
pkgbuild --component $< --install-location /Library/Extensions/ $@

build/HoRNDIS.pkg: build/HoRNDIS-kext.pkg build/HoRNDIS-signed-kext.pkg package/Distribution.xml
productbuild --distribution package/Distribution.xml --package-path build --resources package/resources $(if $(CODESIGN_INST),--sign $(CODESIGN_INST)) build/HoRNDIS.pkg

ifeq (,$(CODESIGN_KEXT))

build/signed/%: build/Release/%
@echo not building $@ because we have no key to sign with
@echo ...but, you can still use $<, if you want
@exit 1

else

Expand Down
2 changes: 2 additions & 0 deletions package/Distribution.xml
Expand Up @@ -14,6 +14,8 @@
<choice id="default"/>
<choice id="com.joshuawise.kexts.HoRNDIS" visible="false">
<pkg-ref id="kext-unsigned"/>
<pkg-ref id="kext-signed"/>
</choice>
<pkg-ref id="kext-unsigned" version="6.0.0" onConclusion="none">HoRNDIS-kext.pkg</pkg-ref>
<pkg-ref id="kext-signed" version="6.0.0" onConclusion="none">HoRNDIS-signed-kext.pkg</pkg-ref>
</installer-gui-script>

0 comments on commit 530e413

Please sign in to comment.