From 5c57371692be6800d1737fd2c6bd54a06484784a Mon Sep 17 00:00:00 2001 From: TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com> Date: Mon, 29 Apr 2019 07:39:49 -0400 Subject: [PATCH] new package: duktape --- packages/duktape/build.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 packages/duktape/build.sh diff --git a/packages/duktape/build.sh b/packages/duktape/build.sh new file mode 100644 index 000000000..22cb897af --- /dev/null +++ b/packages/duktape/build.sh @@ -0,0 +1,31 @@ +TERMUX_PKG_HOMEPAGE=https://www.duktape.org/ +TERMUX_PKG_DESCRIPTION="The Duktape JavaScript interpreter" +TERMUX_PKG_LICENSE="MIT" +TERMUX_PKG_VERSION=2.3.0 +TERMUX_PKG_SKIP_SRC_EXTRACT=1 +TERMUX_PKG_BUILD_IN_SRC=yes + +termux_step_extract_package() { + git clone --depth=1 https://github.com/svaarala/duktape.git -b v${TERMUX_PKG_VERSION} ${TERMUX_PKG_SRCDIR} +} + +termux_step_make() { + make libduktape.so.1.0.0 duk CC=${CC} GXX=${CXX} +} + +termux_step_make_install() { + cp libduktape.so.1.0.0 ${TERMUX_PREFIX}/lib/libduktape.so + cp duk ${TERMUX_PREFIX}/bin + cp prep/nondebug/*.h ${TERMUX_PREFIX}/include +} + +termux_step_post_make_install() { + # Add a pkg-config file for the system zlib + cat > "$PKG_CONFIG_LIBDIR/duktape.pc" <<-HERE + Name: Duktape + Description: Shared library for the Duktape interpreter + Version: $TERMUX_PKG_VERSION + Requires: + Libs: -lduktape -lm + HERE +}