-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·49 lines (37 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/xcrun make -f
TEMPORARY_FOLDER?=/tmp/StarLanes.dst
XCODEFLAGS=-scheme 'starlanes' DSTROOT=$(TEMPORARY_FOLDER)
INTERNAL_PACKAGE=StarLanesApp.pkg
OUTPUT_PACKAGE=StarLanes.pkg
BINARIES_FOLDER=/usr/local/bin
DISTRIBUTION_PLIST=InstallerResources/Distribution.plist
RM=rm -f
RMD=rm -rf
SUDO=sudo
.PHONY: all clean install package uninstall
all:
xcodebuild $(XCODEFLAGS) build
clean:
$(RM) "$(INTERNAL_PACKAGE)"
$(RM) "$(OUTPUT_PACKAGE)"
$(RMD) "$(TEMPORARY_FOLDER)"
xcodebuild $(XCODEFLAGS) clean
install: package
$(SUDO) installer -pkg $(OUTPUT_PACKAGE) -target /
uninstall:
$(RM) "$(BINARIES_FOLDER)/starlanes"
installables: clean
xcodebuild $(XCODEFLAGS) install
find /tmp/StarLanes.dst
package: installables
pkgbuild \
--identifier "mmpub.starlanes" \
--install-location "/" \
--root "$(TEMPORARY_FOLDER)" \
--version "1.0.0" \
"$(INTERNAL_PACKAGE)"
productbuild \
--resources ./InstallerResources \
--distribution "$(DISTRIBUTION_PLIST)" \
--package-path "$(INTERNAL_PACKAGE)" \
"$(OUTPUT_PACKAGE)"