Skip to content

Commit 530e413

Browse files
committed
Add kext code signing to build.
1 parent 879dad6 commit 530e413

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,26 @@ ifeq (joshua,$(USER))
1414
CODESIGN_INST ?= "Developer ID Installer: Joshua Wise (54GTJ2AU36)"
1515
endif
1616

17-
all: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext
17+
all: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext build/HoRNDIS.pkg
1818

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

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

25-
build/HoRNDIS.pkg: build/HoRNDIS-kext.pkg package/Distribution.xml
25+
build/HoRNDIS-signed-kext.pkg: build/signed/HoRNDIS.kext
26+
pkgbuild --component $< --install-location /Library/Extensions/ $@
27+
28+
build/HoRNDIS.pkg: build/HoRNDIS-kext.pkg build/HoRNDIS-signed-kext.pkg package/Distribution.xml
2629
productbuild --distribution package/Distribution.xml --package-path build --resources package/resources $(if $(CODESIGN_INST),--sign $(CODESIGN_INST)) build/HoRNDIS.pkg
2730

2831
ifeq (,$(CODESIGN_KEXT))
2932

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

3338
else
3439

package/Distribution.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<choice id="default"/>
1515
<choice id="com.joshuawise.kexts.HoRNDIS" visible="false">
1616
<pkg-ref id="kext-unsigned"/>
17+
<pkg-ref id="kext-signed"/>
1718
</choice>
1819
<pkg-ref id="kext-unsigned" version="6.0.0" onConclusion="none">HoRNDIS-kext.pkg</pkg-ref>
20+
<pkg-ref id="kext-signed" version="6.0.0" onConclusion="none">HoRNDIS-signed-kext.pkg</pkg-ref>
1921
</installer-gui-script>

0 commit comments

Comments
 (0)