You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
osx/Makefile

47 lines
1.1 KiB

# You need to run the following to let make work:
# sudo xcodebuild -license accept
# install the following to /Applications before proceeding:
# * CreateUserPkg
# * AutoDMG.app
7 years ago
# * the OSX installer (Install macOS High Sierra.app)
# * Xcode.app
# to /Applications before proceeding.
8 years ago
# Put additional big packages (e.g. printer drivers)
# in ~/Documents/packages.10.12/ before running
7 years ago
OSX := /Applications/Install macOS High Sierra.app
AUTODMG := /Applications/AutoDMG.app/Contents/MacOS/AutoDMG
7 years ago
OUTPUT := $(shell date +%Y%m%d).osx.$(shell sw_vers -productVersion).adminadmin.dmg
default: $(OUTPUT)
prepare:
sudo pmset -a sleep 180
sudo pmset -a displaysleep 180
$(AUTODMG) update
8 years ago
custompkg/custom.pkg:
cd custompkg && make
$(OUTPUT): prepare custompkg/custom.pkg
-$(AUTODMG) \
--log-level 7 \
--logfile - \
build \
-n "root" \
7 years ago
--filesystem apfs \
8 years ago
-u -U \
-o /tmp/output.dmg \
"$(OSX)" \
/Applications/Xcode.app \
/Applications/AutoDMG.app \
"$(OSX)" \
6 years ago
"$(PWD)"/custompkg/custom.pkg \
"$(PWD)"/pkgs/*.pkg && \
cp /tmp/output.dmg "$(PWD)"/$@
clean:
8 years ago
rm -f *.dmg /tmp/output.dmg custompkg/*.pkg