2019-11-28 16:54:50 +01:00
|
|
|
TARGET ?= Release
|
|
|
|
|
2003-07-09 00:59:57 +02:00
|
|
|
# EKU: taken from Makefile.in.firebird
|
2007-03-09 11:32:58 +01:00
|
|
|
ROOT=..
|
|
|
|
|
2008-01-18 15:12:26 +01:00
|
|
|
include $(ROOT)/gen/make.defaults
|
|
|
|
include $(ROOT)/gen/make.platform
|
|
|
|
include $(ROOT)/gen/make.rules
|
|
|
|
include $(ROOT)/gen/make.shared.variables
|
2007-03-09 11:32:58 +01:00
|
|
|
|
|
|
|
all: package
|
|
|
|
|
2015-09-28 15:25:25 +02:00
|
|
|
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')
|
|
|
|
FB_VER_SUFFIX:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/buildsuffix.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
|
|
|
|
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/')
|
|
|
|
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/')
|
|
|
|
FB_MAJOR_VERS:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/majorvers.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
|
|
|
|
FB_MINOR_VERS:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/minorvers.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
|
|
|
|
FB_REV_NO:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/revno.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
|
|
|
|
FB_BUILD_NO:=$(shell cpp -DDARWIN -I. ../builds/install/arch-specific/darwin/buildno.c | tail -2 | sed -e 's/" "//g' -e 's/"//g')
|
2008-01-18 15:12:26 +01:00
|
|
|
FB_PLATFORM:=$(CpuType)
|
2007-03-09 11:32:58 +01:00
|
|
|
|
2019-11-28 16:54:50 +01:00
|
|
|
package: package_firebird
|
2007-03-09 11:32:58 +01:00
|
|
|
|
2019-11-28 16:54:50 +01:00
|
|
|
package_firebird: INST_NM=Firebird-$(FB_MAJOR_VERS).$(FB_MINOR_VERS).$(FB_REV_NO)-$(FB_BUILD_NO)-$(FB_PLATFORM)
|
|
|
|
package_firebird:
|
2007-03-09 11:32:58 +01:00
|
|
|
sed -e 's/_FB_BUILD_SUFFIX_/$(FB_VER_SUFFIX)/g' \
|
|
|
|
-e 's/_SMFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_SM)/g' \
|
|
|
|
-e 's/_MFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_M)/g' \
|
|
|
|
-e 's/_MAJOR_VERS_/$(FB_MAJOR_VERS)/g' \
|
|
|
|
-e 's/_MINOR_VERS_/$(FB_MINOR_VERS)/g' \
|
2007-06-11 16:21:33 +02:00
|
|
|
-e 's/_REV_NO_/$(FB_REV_NO)/g' \
|
|
|
|
../builds/install/arch-specific/darwin/Info.plist \
|
2019-11-28 16:54:50 +01:00
|
|
|
> $(ROOT)/gen/$(TARGET)/frameworks/Firebird4.framework/Resources/Info.plist
|
2007-03-09 11:32:58 +01:00
|
|
|
sed -e 's/_FB_BUILD_SUFFIX_/$(FB_VER_SUFFIX)/g' \
|
|
|
|
-e 's/_SMFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_SM)/g' \
|
|
|
|
-e 's/_MFB_BUILD_SUFFIX_/$(FB_VER_SUFFIX_M)/g' \
|
|
|
|
-e 's/_MAJOR_VERS_/$(FB_MAJOR_VERS)/g' \
|
|
|
|
-e 's/_MINOR_VERS_/$(FB_MINOR_VERS)/g' \
|
2007-06-11 16:21:33 +02:00
|
|
|
-e 's/_REV_NO_/$(FB_REV_NO)/g' \
|
|
|
|
../builds/install/arch-specific/darwin/Description.plist \
|
2019-11-28 16:54:50 +01:00
|
|
|
> $(ROOT)/gen/$(TARGET)/frameworks/Firebird4.framework/Resources/Description.plist
|
2015-10-13 14:10:20 +02:00
|
|
|
|
2019-11-28 16:54:50 +01:00
|
|
|
rm -fr $(ROOT)/gen/$(TARGET)/scripts
|
|
|
|
mkdir $(ROOT)/gen/$(TARGET)/scripts
|
2007-06-11 16:21:33 +02:00
|
|
|
cp ../builds/install/arch-specific/darwin/install-script \
|
2019-11-28 16:54:50 +01:00
|
|
|
$(ROOT)/gen/$(TARGET)/scripts/postinstall
|
2007-06-11 16:21:33 +02:00
|
|
|
cp ../builds/install/arch-specific/darwin/preupgrade-script \
|
2019-11-28 16:54:50 +01:00
|
|
|
$(ROOT)/gen/$(TARGET)/scripts/preinstall
|
|
|
|
chmod u+x $(ROOT)/gen/$(TARGET)/scripts/postinstall
|
|
|
|
chmod u+x $(ROOT)/gen/$(TARGET)/scripts/preinstall
|
2015-10-13 14:10:20 +02:00
|
|
|
|
2019-11-28 16:54:50 +01:00
|
|
|
rm -fr $(ROOT)/gen/$(TARGET)/resources
|
|
|
|
mkdir $(ROOT)/gen/$(TARGET)/resources
|
2015-10-13 14:10:20 +02:00
|
|
|
cp ../builds/install/arch-specific/darwin/Welcome.txt \
|
2019-11-28 16:54:50 +01:00
|
|
|
$(ROOT)/gen/$(TARGET)/resources/Welcome.txt
|
|
|
|
cp ../builds/install/arch-specific/darwin/Readme.txt \
|
|
|
|
$(ROOT)/gen/$(TARGET)/resources/Readme.txt
|
2015-10-13 14:10:20 +02:00
|
|
|
cp ../builds/install/arch-specific/darwin/License.txt \
|
2019-11-28 16:54:50 +01:00
|
|
|
$(ROOT)/gen/$(TARGET)/resources/License.txt
|
|
|
|
cp ../builds/install/arch-specific/darwin/Distribution.xml \
|
|
|
|
$(ROOT)/gen/$(TARGET)/Distribution.xml
|
2015-10-13 14:10:20 +02:00
|
|
|
|
2019-11-28 16:54:50 +01:00
|
|
|
rm -fr $(TARGET)/packages
|
|
|
|
mkdir $(TARGET)/packages
|
|
|
|
pkgbuild --root $(ROOT)/gen/$(TARGET)/frameworks/Firebird4.framework \
|
2015-10-13 14:10:20 +02:00
|
|
|
--identifier com.firebirdsql.Firebird \
|
|
|
|
--install-location /Library/Frameworks/Firebird.framework \
|
2019-11-28 16:54:50 +01:00
|
|
|
--scripts $(ROOT)/gen/$(TARGET)/scripts \
|
|
|
|
$(TARGET)/packages/Firebird.pkg
|
2007-03-09 11:32:58 +01:00
|
|
|
|
2019-11-28 16:54:50 +01:00
|
|
|
productbuild --distribution $(TARGET)/Distribution.xml \
|
|
|
|
--resources $(TARGET)/resources \
|
|
|
|
--package-path $(TARGET)/packages \
|
|
|
|
$(TARGET)/$(INST_NM).pkg
|
2008-06-11 13:58:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|