PKG_BUILD_DIR="$PWD/osxpkgbuild"
PKG_DIR="$PKG_BUILD_DIR/${PKG_NAME}.mpkg"
PKG_RSRC_DIR="$PKG_BUILD_DIR/${PKG_NAME}.mpkg/Contents/Resources"
-PKG_VERSION="4.5"
+
+# TODO: make that arguments
+PKG_MAJOR_VERSION=4
+PKG_MINOR_VERSION=5
+PKG_SUBMINOR_VERSION=trunk
+
+PKG_VERSION="${PKG_MAJOR_VERSION}.${PKG_MINOR_VERSION}.${PKG_SUBMINOR_VERSION}"
ROOT_DIR="$PKG_BUILD_DIR/Packages"
CHECK_XML="yes"
echo >>$F "<plist version=\"1.0\">"
echo >>$F " <dict>"
- plistWriteString >>$F IFMajorVersion 4
- plistWriteString >>$F IFMinorVersion 5
+ plistWriteString >>$F IFMajorVersion ${PKG_MAJOR_VERSION}
+ plistWriteString >>$F IFMinorVersion ${PKG_MINOR_VERSION}
plistWriteDate >>$F IFPkgBuildDate "`date -u +%Y-%m-%dT%H:%M:%SZ`"
plistWriteString >>$F IFPkgBuildVersion "${PKG_VERSION}"
echo >>$F "<plist version=\"1.0\">"
echo >>$F " <dict>"
+ # TODO: find out about BuildVersion
plistWriteString >>$F BuildVersion 4
- plistWriteString >>$F CFBundleShortVersionString "4.5"
+
+ plistWriteString >>$F CFBundleShortVersionString "${PKG_VERSION}"
plistWriteString >>$F ProjectName "${PKG_NAME}"
- plistWriteString >>$F SourceVersion 45000
+ plistWriteString >>$F SourceVersion ${PKG_MAJOR_VERSION}${PKG_MINOR_VERSION}000
# close plist
echo >>$F " </dict>"
function genPkgVersionFile() {
F="${PKG_RSRC_DIR}/package_version"
echo -n " gen package_version: $F .."
- echo >$F "major: 4"
- echo >>$F "minor: 5"
+ echo >$F "major: ${PKG_MAJOR_VERSION}"
+ echo >>$F "minor: ${PKG_MINOR_VERSION}"
echo ".. done."
}
PKG_BUILD_DIR="$PWD/osxpkgbuild"
PKG_DIR="$PKG_BUILD_DIR/${PKG_NAME}.pkg"
PKG_RSRC_DIR="$PKG_BUILD_DIR/${PKG_NAME}.pkg/Contents/Resources"
-PKG_VERSION="4.5"
+
+# TODO: make that arguments
+PKG_MAJOR_VERSION=4
+PKG_MINOR_VERSION=5
+PKG_SUBMINOR_VERSION=trunk
+
+PKG_VERSION="${PKG_MAJOR_VERSION}.${PKG_MINOR_VERSION}.${PKG_SUBMINOR_VERSION}"
ROOT_DIR="$PKG_BUILD_DIR/root"
CHECK_XML="yes"
plistWriteString >>$F CFBundleName "${PKG_NAME}"
plistWriteString >>$F CFBundleShortVersionString "${PKG_VERSION}"
- plistWriteString >>$F IFMajorVersion 4
- plistWriteString >>$F IFMinorVersion 5
+ plistWriteString >>$F IFMajorVersion ${PKG_MAJOR_VERSION}
+ plistWriteString >>$F IFMinorVersion ${PKG_MINOR_VERSION}
plistWriteDate >>$F IFPkgBuildDate "`date -u +%Y-%m-%dT%H:%M:%SZ`"
plistWriteString >>$F IFPkgBuildVersion "${PKG_VERSION}"
function genPkgVersionFile() {
F="${PKG_RSRC_DIR}/package_version"
echo -n " gen package_version: $F .."
- echo >$F "major: 4"
- echo >>$F "minor: 5"
+ echo >$F "major: ${PKG_MAJOR_VERSION}"
+ echo >>$F "minor: ${PKG_MINOR_VERSION}"
echo ".. done."
}