2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
|
|
|
|
TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
|
2016-08-28 13:35:27 +02:00
|
|
|
TERMUX_PKG_DEPENDS="liblzma, dpkg, gpgv"
|
2016-07-19 14:42:38 +02:00
|
|
|
# Wait with updating to later version until the NDK supports std::to_string() and other
|
2017-01-22 22:31:50 +01:00
|
|
|
# functions (hopefully in r15, https://github.com/android-ndk/ndk/issues/82).
|
|
|
|
# Updating to apt 1.4 will also get rid of the build hacks used as apt has transitioned
|
|
|
|
# to a clean cmake build system.
|
2016-05-25 00:38:29 +02:00
|
|
|
TERMUX_PKG_VERSION=1.2.12
|
2017-01-11 07:21:42 +01:00
|
|
|
TERMUX_PKG_REVISION=1
|
2016-07-19 14:42:38 +02:00
|
|
|
# TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
|
|
|
|
TERMUX_PKG_SRCURL=https://launchpad.net/ubuntu/+archive/primary/+files/apt_${TERMUX_PKG_VERSION}.tar.xz
|
2017-03-03 13:40:42 +01:00
|
|
|
TERMUX_PKG_SHA256=e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6
|
2017-01-22 22:31:50 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="\
|
|
|
|
--no-create
|
|
|
|
ac_cv_c_bigendian=no
|
|
|
|
ac_cv_lib_bz2_BZ2_bzopen=no"
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_FOLDERNAME=apt-${TERMUX_PKG_VERSION}
|
2017-01-22 22:31:50 +01:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=yes
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_ESSENTIAL=yes
|
2016-03-03 23:56:35 +01:00
|
|
|
TERMUX_PKG_CONFFILES="etc/apt/sources.list"
|
2015-06-13 01:03:31 +02:00
|
|
|
|
|
|
|
termux_step_pre_configure () {
|
2016-09-03 23:48:41 +02:00
|
|
|
# Some files use STD*_FILENO without including <unistd.h> where they are declared.
|
|
|
|
# Define them here to avoid having to patch files:
|
|
|
|
CXXFLAGS+=" -DSTDIN_FILENO=0 -DSTDOUT_FILENO=1 -DSTDERR_FILENO=2 -DAI_IDN=0"
|
|
|
|
|
2016-09-22 20:20:01 +02:00
|
|
|
cp $TERMUX_SCRIPTDIR/scripts/config.{guess,sub} $TERMUX_PKG_SRCDIR/buildlib
|
2016-09-03 23:48:41 +02:00
|
|
|
perl -p -i -e "s/TERMUX_ARCH/$TERMUX_ARCH/" $TERMUX_PKG_SRCDIR/configure
|
2015-12-04 12:27:24 +01:00
|
|
|
|
|
|
|
rm $TERMUX_PKG_SRCDIR/apt-pkg/{cdrom.cc,indexcopy.cc}
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install () {
|
2017-01-22 22:31:50 +01:00
|
|
|
cp $TERMUX_PKG_BUILDDIR/build/bin/apt{,-get,-cache,-config,-key} $TERMUX_PREFIX/bin/
|
|
|
|
cp $TERMUX_PKG_BUILDDIR/build/bin/libapt-{pkg.so.5.0.0,private.so.0.0} $TERMUX_PREFIX/lib/
|
2015-12-04 16:27:43 +01:00
|
|
|
(cd $TERMUX_PREFIX/lib; ln -s -f libapt-pkg.so.5.0.0 libapt-pkg.so.5.0; ln -s -f libapt-pkg.so.5.0.0 libapt-pkg.so )
|
2017-01-22 22:31:50 +01:00
|
|
|
mkdir -p $TERMUX_PREFIX/lib/apt/methods $TERMUX_PREFIX/share/man/man{5,8}
|
|
|
|
cp $TERMUX_PKG_BUILDDIR/build/docs/apt{,-cache,-get}.8 $TERMUX_PREFIX/share/man/man8/
|
|
|
|
cp $TERMUX_PKG_BUILDDIR/build/docs/{apt.conf,sources.list}.5 $TERMUX_PREFIX/share/man/man5/
|
|
|
|
cp $TERMUX_PKG_BUILDDIR/build/bin/methods/{copy,file,gpgv,gzip,http,https,store} $TERMUX_PREFIX/lib/apt/methods
|
|
|
|
(cd $TERMUX_PREFIX/lib/apt/methods; ln -f -s gzip xz)
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2017-01-22 22:31:50 +01:00
|
|
|
mkdir -p $TERMUX_PREFIX/etc/apt
|
|
|
|
printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] http://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2017-01-22 22:31:50 +01:00
|
|
|
# The trusted.gpg was created with "apt-key add public-key.key":
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
|
2016-01-28 15:00:41 +01:00
|
|
|
|
|
|
|
mkdir -p $TERMUX_PREFIX/etc/bash_completion.d/
|
|
|
|
cp $TERMUX_PKG_SRCDIR/completions/bash/apt \
|
|
|
|
$TERMUX_PREFIX/etc/bash_completion.d/
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|