2019-12-12 00:11:29 +01:00
TERMUX_PKG_HOMEPAGE = https://www.borgbackup.org/
TERMUX_PKG_DESCRIPTION = "Deduplicating and compressing backup program"
TERMUX_PKG_LICENSE = "BSD 3-Clause"
2020-11-04 20:45:42 +01:00
TERMUX_PKG_VERSION = 1.1.14
2019-12-12 00:11:29 +01:00
TERMUX_PKG_SRCURL = https://github.com/borgbackup/borg/releases/download/${ TERMUX_PKG_VERSION } /borgbackup-${ TERMUX_PKG_VERSION } .tar.gz
2020-11-04 20:45:42 +01:00
TERMUX_PKG_SHA256 = 7dbb0747cc948673f695cd6de284af215f810fed2eb2a615ef26ddc7c691edba
2019-12-30 02:11:07 +01:00
TERMUX_PKG_DEPENDS = "libacl, liblz4, openssl, python, zstd"
2019-12-12 00:11:29 +01:00
TERMUX_PKG_BUILD_IN_SRC = true
2019-12-30 02:11:07 +01:00
2020-10-08 17:54:24 +02:00
_PYTHON_VERSION = 3.9
2019-12-30 02:11:07 +01:00
2019-12-13 11:56:10 +01:00
TERMUX_PKG_RM_AFTER_INSTALL = "
2019-12-30 02:11:07 +01:00
lib/python${ _PYTHON_VERSION } /site-packages/easy-install.pth
lib/python${ _PYTHON_VERSION } /site-packages/site.py
2019-12-30 02:32:27 +01:00
lib/python${ _PYTHON_VERSION } /site-packages/__pycache__
2019-12-13 11:56:10 +01:00
"
2019-12-12 00:11:29 +01:00
2019-12-30 02:11:07 +01:00
termux_step_make_install( ) {
export PYTHONPATH = $TERMUX_PREFIX /lib/python${ _PYTHON_VERSION } /site-packages
export CPPFLAGS += " -I ${ TERMUX_PREFIX } /include/python ${ _PYTHON_VERSION } "
export LDFLAGS += " -lpython ${ _PYTHON_VERSION } "
export LDSHARED = " $CC -shared "
export BORG_OPENSSL_PREFIX = $TERMUX_PREFIX
export BORG_LIBLZ4_PREFIX = $TERMUX_PREFIX
export BORG_LIBZSTD_PREFIX = $TERMUX_PREFIX
python${ _PYTHON_VERSION } setup.py install --prefix= $TERMUX_PREFIX --force
}
termux_step_create_debscripts( ) {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo " ./borgbackup- ${ TERMUX_PKG_VERSION } -py ${ _PYTHON_VERSION } -linux-x86_64.egg " >> $TERMUX_PREFIX /lib/python${ _PYTHON_VERSION } /site-packages/easy-install.pth
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
sed -i " /\.\/borgbackup- ${ TERMUX_PKG_VERSION } -py ${ _PYTHON_VERSION } -linux-x86_64\.egg/d " $TERMUX_PREFIX /lib/python${ _PYTHON_VERSION } /site-packages/easy-install.pth
EOF
2019-12-12 00:11:29 +01:00
}