1 TERMUX_PKG_HOMEPAGE
=https
://packages.debian.org
/apt
2 TERMUX_PKG_DESCRIPTION
="Front-end for the dpkg package manager"
3 TERMUX_PKG_DEPENDS
="liblzma, libgnustl, dpkg, gnupg"
4 # Wait with updating to later version until the NDK supports std::to_string() and other
5 # functions (hopefully in r13):
6 TERMUX_PKG_VERSION
=1.2.12
7 # TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
8 TERMUX_PKG_SRCURL
=https
://launchpad.net
/ubuntu
/+archive
/primary
/+files
/apt_
${TERMUX_PKG_VERSION}.
tar.xz
9 TERMUX_PKG_EXTRA_CONFIGURE_ARGS
="--host=${TERMUX_ARCH}-linux --disable-rpath acl_cv_rpath=$TERMUX_PREFIX/lib gt_cv_func_CFPreferencesCopyAppValue=no gt_cv_func_CFLocaleCopyCurrent=no ac_cv_c_bigendian=no --no-create"
10 # When ready to drop bz2 support:
11 TERMUX_PKG_EXTRA_CONFIGURE_ARGS
+=" ac_cv_lib_bz2_BZ2_bzopen=no"
12 TERMUX_PKG_FOLDERNAME
=apt-
${TERMUX_PKG_VERSION}
13 TERMUX_PKG_ESSENTIAL
=yes
14 TERMUX_PKG_CONFFILES
="etc/apt/sources.list"
16 # $NDK/docs/STANDALONE-TOOLCHAIN.html: "If you use the GNU libstdc++, you will need to explicitly link with libsupc++ if you use these features"
17 export LDFLAGS
="$LDFLAGS -lgnustl_shared" # -lsupc++"
19 # Some files use STD*_FILENO without including <unistd.h> where they are declared.
20 # Define them here to avoid having to patch files:
21 CXXFLAGS
+=" -DSTDIN_FILENO=0 -DSTDOUT_FILENO=1 -DSTDERR_FILENO=2 -DAI_IDN=0"
23 termux_step_pre_configure
() {
24 cp $TERMUX_COMMON_CACHEDIR/config.
{guess
,sub
} $TERMUX_PKG_SRCDIR/buildlib
25 perl
-p
-i
-e
"s/TERMUX_ARCH/$TERMUX_ARCH/" $TERMUX_PKG_SRCDIR/configure
27 rm $TERMUX_PKG_SRCDIR/apt-pkg
/{cdrom.cc
,indexcopy.cc
}
30 termux_step_post_configure
() {
31 # This is needed to generate makefile, but does not work due to configure arguments not being remembered
44 termux_step_make_install
() {
45 cp $TERMUX_PKG_BUILDDIR/bin
/apt
{,-get
,-cache
,-config
,-key
} $TERMUX_PREFIX/bin
/
46 cp $TERMUX_PKG_BUILDDIR/bin
/libapt-
{pkg.so
.5.0.0,private.so
.0.0} $TERMUX_PREFIX/lib
/
47 (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
)
48 mkdir
-p
$TERMUX_PREFIX/lib
/apt
/methods
$TERMUX_PREFIX/share
/man
/man
{5,8}
49 cp $TERMUX_PKG_BUILDDIR/docs
/apt
{,-cache
,-get
}.8 $TERMUX_PREFIX/share
/man
/man8
/
50 cp $TERMUX_PKG_BUILDDIR/docs
/{apt.conf
,sources.list
}.5 $TERMUX_PREFIX/share
/man
/man5
/
51 cp $TERMUX_PKG_BUILDDIR/bin
/methods
/{copy
,file,gpgv
,gzip,http
,https
,store
} $TERMUX_PREFIX/lib
/apt
/methods
52 (cd $TERMUX_PREFIX/lib
/apt
/methods
; ln -f
-s
gzip xz
)
54 mkdir
-p
$TERMUX_PREFIX/etc
/apt
55 printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] http://termux.net stable main\n" > $TERMUX_PREFIX/etc
/apt
/sources.list
57 # The trusted.gpg was created with "apt-key add public-key.key":
58 cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg
$TERMUX_PREFIX/etc
/apt
/
60 mkdir
-p
$TERMUX_PREFIX/etc
/bash_completion.d
/
61 cp $TERMUX_PKG_SRCDIR/completions
/bash
/apt \
62 $TERMUX_PREFIX/etc
/bash_completion.d
/