From e99416456afd4aa8bde42016826f9a345291cbf3 Mon Sep 17 00:00:00 2001 From: Matthew Poletiek Date: Tue, 8 Dec 2020 21:03:16 -0600 Subject: Initial Commit --- build/chirp.app/Contents/Info.plist | 26 +++++++++++++ build/chirp.app/Contents/MacOS/chirp | 19 +++++++++ build/chirp.app/Contents/PkgInfo | 1 + build/chirp.app/Contents/Resources/.placeholder | 0 build/macos/make_pango.sh | 51 +++++++++++++++++++++++++ build/make_source_release.sh | 23 +++++++++++ build/version | 1 + 7 files changed, 121 insertions(+) create mode 100644 build/chirp.app/Contents/Info.plist create mode 100755 build/chirp.app/Contents/MacOS/chirp create mode 100644 build/chirp.app/Contents/PkgInfo create mode 100644 build/chirp.app/Contents/Resources/.placeholder create mode 100644 build/macos/make_pango.sh create mode 100755 build/make_source_release.sh create mode 100644 build/version (limited to 'build') diff --git a/build/chirp.app/Contents/Info.plist b/build/chirp.app/Contents/Info.plist new file mode 100644 index 0000000..673eeeb --- /dev/null +++ b/build/chirp.app/Contents/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + chirp + CFBundleIconFile + Chirp + CFBundleIdentifier + com.danplanet.chirp + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + chirp + CFBundleShortVersionString + 0.1 + CFBundleVersion + 0.1 + LSHasLocalizedDisplayName + + LSMinimumSystemVersion + 10.5 + + diff --git a/build/chirp.app/Contents/MacOS/chirp b/build/chirp.app/Contents/MacOS/chirp new file mode 100755 index 0000000..d0ff86e --- /dev/null +++ b/build/chirp.app/Contents/MacOS/chirp @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +LOCATION=$(dirname "${BASH_SOURCE}") + +PYTHON=/opt/kk7ds/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python + +not_translocated () { + security translocate-status-check "${LOCATION}" 2>&1 | grep -q -e NOT -e unknown -e "not found" +} + +if [ ! -x $PYTHON ]; then + PYTHON=/opt/kk7ds/bin/python2.7 +elif not_translocated; then + ln -s $PYTHON "${LOCATION}/../CHIRP" + PYTHON=${LOCATION}/../CHIRP + export PYTHONPATH=/opt/kk7ds/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages +fi + +exec "$PYTHON" "${LOCATION}/../Resources/chirp/chirpw" diff --git a/build/chirp.app/Contents/PkgInfo b/build/chirp.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/build/chirp.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/build/chirp.app/Contents/Resources/.placeholder b/build/chirp.app/Contents/Resources/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/build/macos/make_pango.sh b/build/macos/make_pango.sh new file mode 100644 index 0000000..57d3429 --- /dev/null +++ b/build/macos/make_pango.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +make_pango_modules() { + local src=$1 + local dst=$2 + local sf=${src}/etc/pango/pango.modules + local df=${dst}/etc/pango/pango.modules + + cat $sf | sed 's/\/opt\/.*\/lib/..\/Resources/' > $df +} + +make_pango_rc() { + local src=$1 + local dst=$2 + local sf=${src}/etc/pango/pangorc + local df=${dst}/etc/pango/pangorc + + cat $sf | sed 's/\/opt\/.*\/etc/.\/etc/' > $df +} + +make_pangox_aliases() { + local src=$1 + local dst=$2 + + cp ${src}/etc/pango/pangox.aliases ${dst}/etc/pango +} + +usage() { + echo 'Usage: make_pango.sh [PATH_TO_MACPORTS] [PATH_TO_APP]' + echo 'Example:' + echo ' make_pango.sh /opt/local dist/d-rats.app' +} + +if [ -z "$1" ]; then + usage + exit 1 +fi + +if [ -z "$2" ]; then + usage + exit 1 +fi + +base=$1 +app="$2/Contents/Resources" + +mkdir -p ${app}/etc/pango + +make_pango_modules $base $app +make_pango_rc $base $app +make_pangox_aliases $base $app diff --git a/build/make_source_release.sh b/build/make_source_release.sh new file mode 100755 index 0000000..2a5af86 --- /dev/null +++ b/build/make_source_release.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +VERSION=$(cat build/version) +INCLUDE="COPYING" +TMP=$(mktemp -d) +EXCLUDE="" + +sed -i 's/^CHIRP_VERSION.*$/CHIRP_VERSION=\"'$VERSION'\"/' chirp/__init__.py + +RELDIR=chirp-${VERSION} + +DST="${TMP}/${RELDIR}" + +mkdir -p $DST + +cp -rav --parents chirp/*.py chirp/drivers/*.py csvdump/*.py chirp/ui/* $DST +cp -av *.py ${DST} + +cp -rav $INCLUDE ${DST} + +(cd $TMP && tar czf - $RELDIR) > ${RELDIR}.tar.gz + +rm -Rf ${TMP}/${RELDIR} diff --git a/build/version b/build/version new file mode 100644 index 0000000..8508cef --- /dev/null +++ b/build/version @@ -0,0 +1 @@ +0.3.0dev -- cgit v1.2.3