Debian Codegraph @

builds/install/arch-specific/darwin/Makefile.in

raw
1 TARGET ?= Release
2
3 # EKU: taken from Makefile.in.firebird
4 ROOT=..
5
6 include $(ROOT)/gen/make.defaults
7 include $(ROOT)/gen/make.platform
8 include $(ROOT)/gen/make.rules
9 include $(ROOT)/gen/make.shared.variables
10
11 all: package
12
13 FB_INST_VERS:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/buildsuffix.c | tail -2 | sed -e 's/" "//g' -e 's/"//g' -e 's/Firebird[ ]*//' -e 's/Release Candidate/RC/' -e 's/ /-/g')
14 FB_VER_SUFFIX:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/buildsuffix.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
15 FB_VER_SUFFIX_SM:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/buildsuffix.c | tail -2 | sed -e 's/" "//g' -e 's/"//g' -e 's/Firebird[ ]*//' -e 's/Release Candidate/RC/')
16 FB_VER_SUFFIX_M:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/buildsuffix.c | tail -2 | sed -e 's/" "//g' -e 's/"//g' -e 's/Release Candidate/RC/')
17 FB_MAJOR_VERS:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/majorvers.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
18 FB_MINOR_VERS:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/minorvers.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
19 FB_REV_NO:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/revno.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
20 FB_BUILD_NO:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/buildno.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
21 FB_PLATFORM:=$(CpuType)
22
23 package: package_firebird
24
25 package_firebird: INST_NM=Firebird-$(FB_MAJOR_VERS).$(FB_MINOR_VERS).$(FB_REV_NO)-$(FB_BUILD_NO)-$(FB_PLATFORM)
26 package_firebird:
27 sed -e 's/_FB_BUILD_SUFFIX_/$(FB_VER_SUFFIX)/g' \
28 -e 's/_SMFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_SM)/g' \
29 -e 's/_MFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_M)/g' \
30 -e 's/_MAJOR_VERS_/$(FB_MAJOR_VERS)/g' \
31 -e 's/_MINOR_VERS_/$(FB_MINOR_VERS)/g' \
32 -e 's/_REV_NO_/$(FB_REV_NO)/g' \
33 ../builds/install/arch-specific/darwin/Info.plist \
34 > $(ROOT)/gen/$(TARGET)/frameworks/Firebird4.framework/Resources/Info.plist
35 sed -e 's/_FB_BUILD_SUFFIX_/$(FB_VER_SUFFIX)/g' \
36 -e 's/_SMFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_SM)/g' \
37 -e 's/_MFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_M)/g' \
38 -e 's/_MAJOR_VERS_/$(FB_MAJOR_VERS)/g' \
39 -e 's/_MINOR_VERS_/$(FB_MINOR_VERS)/g' \
40 -e 's/_REV_NO_/$(FB_REV_NO)/g' \
41 ../builds/install/arch-specific/darwin/Description.plist \
42 > $(ROOT)/gen/$(TARGET)/frameworks/Firebird4.framework/Resources/Description.plist
43
44 rm -fr $(ROOT)/gen/$(TARGET)/scripts
45 mkdir $(ROOT)/gen/$(TARGET)/scripts
46 cp ../builds/install/arch-specific/darwin/install-script \
47 $(ROOT)/gen/$(TARGET)/scripts/postinstall
48 cp ../builds/install/arch-specific/darwin/preupgrade-script \
49 $(ROOT)/gen/$(TARGET)/scripts/preinstall
50 chmod u+x $(ROOT)/gen/$(TARGET)/scripts/postinstall
51 chmod u+x $(ROOT)/gen/$(TARGET)/scripts/preinstall
52
53 rm -fr $(ROOT)/gen/$(TARGET)/resources
54 mkdir $(ROOT)/gen/$(TARGET)/resources
55 cp ../builds/install/arch-specific/darwin/Welcome.txt \
56 $(ROOT)/gen/$(TARGET)/resources/Welcome.txt
57 cp ../builds/install/arch-specific/darwin/Readme.txt \
58 $(ROOT)/gen/$(TARGET)/resources/Readme.txt
59 cp ../builds/install/arch-specific/darwin/License.txt \
60 $(ROOT)/gen/$(TARGET)/resources/License.txt
61 cp ../builds/install/arch-specific/darwin/Distribution.xml \
62 $(ROOT)/gen/$(TARGET)/Distribution.xml
63
64 rm -fr $(TARGET)/packages
65 mkdir $(TARGET)/packages
66 pkgbuild --root $(ROOT)/gen/$(TARGET)/frameworks/Firebird4.framework \
67 --identifier com.firebirdsql.Firebird \
68 --install-location /Library/Frameworks/Firebird.framework \
69 --scripts $(ROOT)/gen/$(TARGET)/scripts \
70 $(TARGET)/packages/Firebird.pkg
71
72 productbuild --distribution $(TARGET)/Distribution.xml \
73 --resources $(TARGET)/resources \
74 --package-path $(TARGET)/packages \
75 $(TARGET)/$(INST_NM).pkg
76
77
78