Package building: cleanup of /S/L/E/HoRNDIS.kext

Cleaning up the /System/Library/Extensions: old installer
would use that location too, while we do not.
This commit is contained in:
Mikhail Iakhiaev
2018-07-09 19:51:53 +03:00
parent 97d69e7e8e
commit 4120dee6e0
2 changed files with 7 additions and 1 deletions
Makefile
package/scripts

@ -48,7 +48,7 @@ build/pkg/root: build/Release/HoRNDIS.kext
cp -R build/Release/HoRNDIS.kext build/pkg/root/Library/Extensions/
build/pkg/HoRNDIS-kext.pkg: build/pkg/root
pkgbuild --identifier com.joshuawise.kexts.HoRNDIS --root $< $@
pkgbuild --identifier com.joshuawise.kexts.HoRNDIS --scripts package/scripts --root $< $@
# The variable is to be resolved first time it's used:
VERSION = $(shell defaults read $(PWD)/build/Release/HoRNDIS.kext/Contents/Info.plist CFBundleVersion)

6
package/scripts/postinstall Executable file

@ -0,0 +1,6 @@
#!/bin/sh
# Cleans-up after the old HoRDNIS installations.
# These would install into both /Library/Extensions and
# /System/Library/Extensions, while we only use the former location.
sudo rm -rf /System/Library/Extensions/HoRNDIS.kext
sudo touch /System/Library/Extensions