mirror of
https://github.com/termux/termux-packages
synced 2024-06-27 00:27:08 +00:00
62 lines
1.9 KiB
Bash
62 lines
1.9 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://cfengine.com/
|
|
TERMUX_PKG_DESCRIPTION="CFEngine is a configuration management technology"
|
|
TERMUX_PKG_LICENSE="GPL-3.0"
|
|
TERMUX_PKG_MAINTAINER="@craigcomstock"
|
|
TERMUX_PKG_VERSION=1:3.20.0
|
|
TERMUX_PKG_SRCURL=https://github.com/cfengine/core.git
|
|
TERMUX_PKG_GIT_BRANCH=${TERMUX_PKG_VERSION#*:}
|
|
TERMUX_PKG_DEPENDS="libandroid-glob, liblmdb, libxml2, libyaml, openssl, pcre"
|
|
# core doesn't work with out-of-tree builds
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|
--with-workdir=$TERMUX_PREFIX/var/lib/cfengine
|
|
--without-pam
|
|
--without-selinux-policy
|
|
--without-systemd-service
|
|
--with-lmdb=$TERMUX_PREFIX
|
|
--with-openssl=$TERMUX_PREFIX
|
|
--with-yaml=$TERMUX_PREFIX
|
|
--with-pcre=$TERMUX_PREFIX
|
|
--with-prefix=$TERMUX_PREFIX
|
|
--with-libxml2=$TERMUX_PREFIX
|
|
"
|
|
|
|
termux_step_post_get_source() {
|
|
local _MASTERFILES_VERSION=${TERMUX_PKG_VERSION#*:}
|
|
local _MASTERFILES_SRCURL=https://github.com/cfengine/masterfiles/archive/${_MASTERFILES_VERSION}.zip
|
|
local _MASTERFILES_SHA256=094f9361f693ad5949d7f9c7634d47104225e08589c72f54f3743e74b41ee4d2
|
|
local _MASTERFILES_FILE=${TERMUX_PKG_CACHEDIR}/masterfiles-${_MASTERFILES_VERSION}.zip
|
|
termux_download \
|
|
${_MASTERFILES_SRCURL} \
|
|
${_MASTERFILES_FILE} \
|
|
${_MASTERFILES_SHA256}
|
|
local d=$(unzip -qql ${_MASTERFILES_FILE} | \
|
|
head -n1 | tr -s ' ' | cut -d' ' -f5-)
|
|
unzip -q ${_MASTERFILES_FILE}
|
|
mv ${d} masterfiles
|
|
}
|
|
|
|
termux_step_pre_configure() {
|
|
export EXPLICIT_VERSION=${TERMUX_PKG_VERSION#*:}
|
|
export LDFLAGS+=" -landroid-glob"
|
|
NO_CONFIGURE=1 ./autogen.sh
|
|
}
|
|
|
|
termux_step_post_make_install() {
|
|
cd masterfiles
|
|
./autogen.sh \
|
|
--prefix=$TERMUX_PREFIX/var/lib/cfengine \
|
|
--bindir=$TERMUX_PREFIX/bin
|
|
make install
|
|
}
|
|
|
|
termux_step_create_debscripts() {
|
|
cat <<-EOF > ./postinst
|
|
#!$TERMUX_PREFIX/bin/sh
|
|
# Generate a host key
|
|
if [ ! -f $TERMUX_PREFIX/var/lib/cfengine/ppkeys/localhost.priv ]; then
|
|
$TERMUX_PREFIX/bin/cf-key >/dev/null || :
|
|
fi
|
|
EOF
|
|
}
|