From 3c323c69ae453dcb02b5d52bbbe09c1a09922e95 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 24 May 2016 18:38:29 -0400 Subject: [PATCH] Docker and build updates - Update to build on ubuntu 16.04. - Docker: Set FORCE_UNSAFE_CONFIGURE=1. Fixes #275. - Docker: Various fixes. - Neovim: No longer require lua. - Some minor package updates. --- Dockerfile | 81 +++++----------------- README.md | 34 +++++----- build-package.sh | 2 +- install-sdk.sh | 8 --- packages/apt/build.sh | 2 +- packages/apt/doc-makefile.patch | 13 ++++ packages/dnsutils/build.sh | 1 + packages/dpkg/DEBUG.patch | 24 ------- packages/dpkg/build.sh | 3 +- packages/dpkg/configure.patch | 21 ++++++ packages/emacs/build.sh | 15 +++-- packages/ldns/build.sh | 1 + packages/ldns/doc-doxyparse.pl.patch | 105 +++++++++++++++++++++++++++++ packages/neovim/build.sh | 4 +- packages/picolisp/build.sh | 2 +- packages/ranger/build.sh | 7 +- scripts/install-sdk.sh | 7 ++ ubuntu-setup.sh => scripts/ubuntu-setup.sh | 9 ++- 18 files changed, 205 insertions(+), 134 deletions(-) delete mode 100755 install-sdk.sh create mode 100644 packages/apt/doc-makefile.patch delete mode 100644 packages/dpkg/DEBUG.patch create mode 100644 packages/dpkg/configure.patch create mode 100644 packages/ldns/doc-doxyparse.pl.patch create mode 100755 scripts/install-sdk.sh rename ubuntu-setup.sh => scripts/ubuntu-setup.sh (78%) diff --git a/Dockerfile b/Dockerfile index 0cc33f83..520dac32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,71 +1,26 @@ -FROM ubuntu:15.10 -MAINTAINER Alex Cornejo +FROM ubuntu:16.04 -# to prevent dialog warnings -ENV DEBIAN_FRONTEND noninteractive -# to fix locale to avoid warnings +# Fix locale to avoid warnings: RUN locale-gen en_US.UTF-8 RUN dpkg-reconfigure locales -RUN apt-get update && apt-get install -y \ - sudo \ - git \ - asciidoc \ - automake \ - bison \ - flex \ - cmake \ -# Used for fetching sources - curl \ -# Provides 'msgfmt' which the apt build uses - gettext \ - help2man \ - libacl1-dev \ -# Needed by luajit host part - libc6-dev-i386 \ -# Needed by apt build - libcurl4-openssl-dev \ -# Provides 'gkd-pixbuf-query-loaders' which the librsvg build uses - libgdk-pixbuf2.0-dev \ -# Provides 'glib-genmarshal' which the glib build uses - libglib2.0-dev \ - libncurses5-dev \ - libssl-dev \ - libtool \ - libtool-bin \ - lua-lpeg \ - luarocks \ - lzip \ - m4 \ - pkg-config \ - scons \ - subversion \ - texinfo \ - xmlto \ -# Provides u'makedepend' which the openssl build uses - xutils-dev \ -# Needed for android-sdk - openjdk-7-jdk +# Add this folder to the container and set as working directory: +ADD . /root/termux-packages +WORKDIR /root/termux-packages +# Allow configure to be run as root: +ENV FORCE_UNSAFE_CONFIGURE 1 -RUN cd /tmp && \ - curl -O http://dl.google.com/android/android-sdk_r24.3.4-linux.tgz && \ - tar xzvf /tmp/android-sdk_r24.3.4-linux.tgz && \ +RUN apt-get update && \ + apt-get install -y sudo && \ + USER=root /root/termux-packages/scripts/ubuntu-setup.sh && \ + # Setup Android SDK and NDK: + mkdir -p /root/lib && \ + cd /root/lib && \ + curl -o sdk.tgz http://dl.google.com/android/android-sdk_r24.3.4-linux.tgz && \ + tar xzvf sdk.tgz && \ + mv android-sdk-linux android-sdk && \ curl -o ndk.zip http://dl.google.com/android/repository/android-ndk-r11-linux-x86_64.zip && \ unzip ndk.zip && \ - mkdir /root/lib && \ - mv /tmp/android-sdk-linux /root/lib/android-sdk && \ - mv /tmp/android-ndk-r11 /root/lib/android-ndk && \ - rm -fr /tmp/* - -RUN mkdir -p /data/data/com.termux/files/usr && mkdir -p /root/termux-packages && \ -# Install neovim dependencies - luarocks install lpeg && \ - luarocks install mpack && \ - luarocks install luabitop - -ADD scripts /root/termux-packages/scripts -ADD *.sh /root/termux-packages/ -ADD *.spec /root/termux-packages/ -ADD packages /root/termux-packages/packages -ADD ndk_patches /root/termux-packages/ndk_patches + mv android-ndk-r11 android-ndk && \ + /root/termux-packages/scripts/install-sdk.sh diff --git a/README.md b/README.md index 971d589c..18d3c40e 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,11 @@ feedback if you find incorrect our outdated things! Initial setup ============= -Building packages are for now only tested to work on Ubuntu 15.10. Perform the following -setup steps: +Packages are normally built using Ubuntu 16.04. Most packages should build also under +other Linux distributions (or even on OS X), but those environments will need manual setup +adapted from the below setup for Ubuntu: -* Run `ubuntu-setup.sh` to install required packages and setup the `/data/` folder (see below). +* Run `scripts/ubuntu-setup.sh` to install required packages and setup the `/data/` folder (see below). * Install the Android SDK at `$HOME/lib/android-sdk`. Override this by setting the environment variable `$ANDROID_HOME` to point at another location. @@ -26,17 +27,14 @@ variable `$ANDROID_HOME` to point at another location. * Install the Android NDK, version r11, at `$HOME/lib/android-ndk`. Override this by setting the environment variable `$NDK` to point at another location. -Alternatively a Dockerfile is provided which sets up a pristine image -suitable for building packages. To build the docker image, run the -following command: +Alternatively a Dockerfile is provided which sets up a pristine image suitable for building +packages. To build the docker image, run the following command: - docker build --rm=true -t termux . + docker build -t termux . -After build is successful, you can open an interactive prompt inside the -container using: - - docker run --rm=true -ti termux /bin/bash +After build is successful, you can open an interactive prompt inside the container using: + docker run -ti termux bash Building a package ================== @@ -45,19 +43,19 @@ which is why every package is installed inside the private file area of the Term PREFIX=/data/data/com.termux/files/usr -For simplicity while developing and building, the build scripts here assume that a /data -folder is reserved for use on the host builder and install everything there. +For simplicity while developing and building, the build scripts here uses a /data +folder that is reserved for use on the host builder and install everything there. -The basic flow is then to run "./build-package.sh $PKG", which: -* Sets up a patched stand-alone Android NDK toolchain +The basic flow is then to run `./build-package.sh $PKG`, which: +* Sets up a patched stand-alone Android NDK toolchain if necessary. * Reads packages/$PKG/build.sh to find out where to find the source code of the package and how to build it. -* Applies all patches in packages/$PKG/\*.patch +* Applies all patches in packages/$PKG/\*.patch. -* Builds the package and installs it to $PREFIX +* Builds the package and installs it to `$PREFIX`. -* Creates a dpkg package file for distribution. +* Creates a dpkg package file for distribution in `$HOME/termux/_deb`. Reading and following build-package.sh is the best way to understand what's going on here. diff --git a/build-package.sh b/build-package.sh index a19b8bb1..79df22db 100755 --- a/build-package.sh +++ b/build-package.sh @@ -47,7 +47,7 @@ if [ "$TERMUX_CLANG" = "" ]; then else : ${TERMUX_STANDALONE_TOOLCHAIN:="$HOME/lib/android-standalone-toolchain-${TERMUX_ARCH}-api${TERMUX_API_LEVEL}-clang38"} fi -: ${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="23.0.2"} +: ${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="23.0.3"} # We do not put all of build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/ into PATH # to avoid stuff like arm-linux-androideabi-ld there to conflict with ones from # the standalone toolchain. diff --git a/install-sdk.sh b/install-sdk.sh deleted file mode 100755 index a5456e7f..00000000 --- a/install-sdk.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# Read settings from .termuxrc if existing -test -f $HOME/.termuxrc && . $HOME/.termuxrc -: ${ANDROID_HOME:="${HOME}/lib/android-sdk"} - -$ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "build-tools-23.0.2" -$ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "android-23" diff --git a/packages/apt/build.sh b/packages/apt/build.sh index 05b4b991..6bdb1a80 100644 --- a/packages/apt/build.sh +++ b/packages/apt/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager" TERMUX_PKG_DEPENDS="liblzma, libgnustl, dpkg, gnupg" -TERMUX_PKG_VERSION=1.2.11 +TERMUX_PKG_VERSION=1.2.12 TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz 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" # When ready to drop bz2 support: diff --git a/packages/apt/doc-makefile.patch b/packages/apt/doc-makefile.patch new file mode 100644 index 00000000..a0cc7191 --- /dev/null +++ b/packages/apt/doc-makefile.patch @@ -0,0 +1,13 @@ +diff -u -r ../apt-1.2.12/doc/makefile ./doc/makefile +--- ../apt-1.2.12/doc/makefile 2016-05-11 08:57:51.000000000 +0000 ++++ ./doc/makefile 2016-05-24 20:14:30.535233236 +0000 +@@ -10,7 +10,7 @@ + LC = en + include $(DOCBOOK_H) + +-doc: manpages docbook ++doc: manpages + + examples/sources.list: ../vendor/current/sources.list + ln -sf '$(abspath $^)' $@ + diff --git a/packages/dnsutils/build.sh b/packages/dnsutils/build.sh index 60198786..7bf76a5a 100644 --- a/packages/dnsutils/build.sh +++ b/packages/dnsutils/build.sh @@ -5,6 +5,7 @@ TERMUX_PKG_SRCURL="ftp://ftp.isc.org/isc/bind9/${TERMUX_PKG_VERSION}/bind-${TERM TERMUX_PKG_FOLDERNAME="bind-$TERMUX_PKG_VERSION" TERMUX_PKG_DEPENDS="openssl, readline, resolv-conf" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --with-gssapi=no --with-randomdev=/dev/random -with-ecdsa=no --with-gost=no --with-libxml2=no --with-libtool" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-openssl=$TERMUX_PREFIX" export BUILD_AR=ar export BUILD_CC=gcc diff --git a/packages/dpkg/DEBUG.patch b/packages/dpkg/DEBUG.patch deleted file mode 100644 index 01a99ece..00000000 --- a/packages/dpkg/DEBUG.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -u -r ../dpkg-1.17.10/configure ./configure ---- ../dpkg-1.17.10/configure 2014-06-05 21:06:21.000000000 +0200 -+++ ./configure 2014-07-11 16:43:38.654247015 +0200 -@@ -23547,7 +23547,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dpkg cpu type" >&5 - $as_echo_n "checking dpkg cpu type... " >&6; } - --cpu_type=$($srcdir/run-script $PERL scripts/dpkg-architecture.pl -t$host -qDEB_HOST_ARCH_CPU 2>/dev/null) -+cpu_type=TERMUX_ARCH - - if test "x$cpu_type" = "x"; then - cpu_type=$host_cpu -@@ -23587,9 +23587,9 @@ - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dpkg architecture name" >&5 --$as_echo_n "checking dpkg architecture name... " >&6; } -+$as_echo_n "checking dpkg architecture name... $srcdir/run-script $PERL scripts/dpkg-architecture.pl -t$host -qDEB_HOST_ARCH" >&6; } - --dpkg_arch=$($srcdir/run-script $PERL scripts/dpkg-architecture.pl -t$host -qDEB_HOST_ARCH 2>/dev/null) -+dpkg_arch=TERMUX_ARCH - - if test "x$dpkg_arch" = "x"; then - as_fn_error $? "cannot determine host dpkg architecture" "$LINENO" 5 diff --git a/packages/dpkg/build.sh b/packages/dpkg/build.sh index a03d2456..f4d5acf4 100755 --- a/packages/dpkg/build.sh +++ b/packages/dpkg/build.sh @@ -1,7 +1,6 @@ TERMUX_PKG_HOMEPAGE=https://packages.debian.org/dpkg TERMUX_PKG_DESCRIPTION="Debian package management system" -TERMUX_PKG_VERSION=1.18.4 -TERMUX_PKG_BUILD_REVISION=2 +TERMUX_PKG_VERSION=1.18.7 TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-dselect --disable-shared --disable-start-stop-daemon --disable-largefile --disable-update-alternatives --host=${TERMUX_ARCH}-linux --without-selinux dpkg_cv_c99_snprintf=yes ac_cv_lib_selinux_setexecfilecon=no HAVE_SETEXECFILECON_FALSE=#" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --without-bz2" diff --git a/packages/dpkg/configure.patch b/packages/dpkg/configure.patch new file mode 100644 index 00000000..0ff14275 --- /dev/null +++ b/packages/dpkg/configure.patch @@ -0,0 +1,21 @@ +diff -u -r ../dpkg-1.18.7/configure ./configure +--- ../dpkg-1.18.7/configure 2016-05-08 22:09:16.000000000 -0400 ++++ ./configure 2016-05-24 16:52:40.683774088 -0400 +@@ -24862,7 +24862,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dpkg cpu type" >&5 + $as_echo_n "checking dpkg cpu type... " >&6; } + +-cpu_type=$(PERL=$PERL $srcdir/run-script scripts/dpkg-architecture.pl -t$host -qDEB_HOST_ARCH_CPU 2>/dev/null) ++cpu_type=TERMUX_ARCH + + if test "x$cpu_type" = "x"; then + cpu_type=$host_cpu +@@ -24904,7 +24904,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dpkg architecture name" >&5 + $as_echo_n "checking dpkg architecture name... " >&6; } + +-dpkg_arch=$(PERL=$PERL $srcdir/run-script scripts/dpkg-architecture.pl -t$host -qDEB_HOST_ARCH 2>/dev/null) ++dpkg_arch=TERMUX_ARCH + + if test "x$dpkg_arch" = "x"; then + as_fn_error $? "cannot determine host dpkg architecture" "$LINENO" 5 diff --git a/packages/emacs/build.sh b/packages/emacs/build.sh index 8328315e..20fc403e 100644 --- a/packages/emacs/build.sh +++ b/packages/emacs/build.sh @@ -25,14 +25,21 @@ termux_step_post_extract_package () { # XXX: We have to start with new host build each time # to avoid build error when cross compiling. rm -Rf $TERMUX_PKG_HOSTBUILD_DIR + + # We cannot run a dumped emacs on Android 5.0+ due to the pie requirement. + # Also, the native emacs we build (bootstrap-emacs) cannot used dumps when + # building inside docker: https://github.com/docker/docker/issues/22801 + export CANNOT_DUMP=yes } termux_step_host_build () { # Build a bootstrap-emacs binary to be used in termux_step_post_configure. - $TERMUX_PKG_SRCDIR/configure --prefix=$TERMUX_PREFIX --without-x --with-xpm=no --with-jpeg=no \ - --with-png=no --with-tiff=no --without-gconf --without-gsettings --without-all - make - export CANNOT_DUMP=yes + local NATIVE_PREFIX=$TERMUX_PKG_TMPDIR/emacs-native + mkdir -p $NATIVE_PREFIX/share/emacs/$TERMUX_PKG_VERSION + ln -s $TERMUX_PKG_SRCDIR/lisp $NATIVE_PREFIX/share/emacs/$TERMUX_PKG_VERSION/lisp + + $TERMUX_PKG_SRCDIR/configure --prefix=$NATIVE_PREFIX --without-all --with-x-toolkit=no + make -j $TERMUX_MAKE_PROCESSES } termux_step_post_configure () { diff --git a/packages/ldns/build.sh b/packages/ldns/build.sh index e1b5ed4e..63b390ea 100755 --- a/packages/ldns/build.sh +++ b/packages/ldns/build.sh @@ -3,4 +3,5 @@ TERMUX_PKG_DESCRIPTION="Library for simplifying DNS programming and supporting r TERMUX_PKG_DEPENDS="openssl" TERMUX_PKG_VERSION=1.6.17 TERMUX_PKG_SRCURL=http://www.nlnetlabs.nl/downloads/ldns/ldns-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ssl=$TERMUX_PREFIX" TERMUX_PKG_RM_AFTER_INSTALL="bin/ldns-config share/man/man1/ldns-config.1" diff --git a/packages/ldns/doc-doxyparse.pl.patch b/packages/ldns/doc-doxyparse.pl.patch new file mode 100644 index 00000000..0dec1028 --- /dev/null +++ b/packages/ldns/doc-doxyparse.pl.patch @@ -0,0 +1,105 @@ +Patch allowing building with perl 5.22. + +Will be included in the next ldns release: + http://git.nlnetlabs.nl/ldns/commit/?h=develop&id=168ee09a + +diff --git a/doc/doxyparse.pl b/doc/doxyparse.pl +index 96a1732..a09b2e8 100755 +--- a/doc/doxyparse.pl ++++ b/doc/doxyparse.pl +@@ -57,10 +57,15 @@ This manpage was automaticly generated from the ldns source code by + use of Doxygen and some perl. + "; + +-getopts("m:",\%options); ++getopts("em:",\%options); + # if -m manpage file is given process that file + # parse the file which tells us what manpages go together + my $functions, $see_also; ++my $i = -1; ++my $report_errors = defined $options{'e'}; ++my $errors = 0; ++my %unique; ++ + if (defined $options{'m'}) { + # process + open(MAN, "<$options{'m'}") or die "Cannot open $options{'m'}"; +@@ -68,18 +73,35 @@ if (defined $options{'m'}) { + # func1, func2, .. | see_also1, see_also2, ... + while() { + chomp; ++ $i += 1; + if (/^#/) { next; } + if (/^$/) { next; } +- ($functions, $see_also) = split /[\t ]*\|[\t ]*/, $_; +- #print "{$functions}\n"; +- #print "{$see_also}\n"; ++ my @parts = split /[\t ]*\|[\t ]*/, $_; ++ $functions = shift @parts; ++ $see_also = join ', ', @parts; ++ print "{$functions}\n"; ++ print "{$see_also}\n"; + my @funcs = split /[\t ]*,[\t ]*/, $functions; + my @also = split /[\t ]*,[\t ]*/, $see_also; + $manpages{$funcs[0]} = \@funcs; + $see_also{$funcs[0]} = \@also; ++ foreach (@funcs) { ++ if ($unique{$_}) { ++ push $unique{$_}, ($i,); ++ } else { ++ $unique{$_} = [$i]; ++ } ++ } + #print "[", $funcs[0], "]\n"; + } + close(MAN); ++ while (($func, $lines) = each %unique ) { ++ if (scalar @$lines > 1) { ++ print STDERR "$func in function_manpages on lines: " ++ . join(", ",@$lines) . "\n" if $report_errors; ++ $errors += 1; ++ } ++ } + } else { + print "Need -m file to process the .h files\n"; + exit 1; +@@ -95,7 +117,7 @@ mkdir "doc/man"; + mkdir "doc/man/man$MAN_SECTION"; + + $state = 0; +-my $i; ++$i = 0; + my @lines = ; + my $max = @lines; + +@@ -273,7 +295,7 @@ foreach (keys %manpages) { + + print MAN $MAN_MIDDLE; + +- if (defined(@$also)) { ++ if (@$also) { + print MAN "\n.SH SEE ALSO\n\\fI"; + print MAN join "\\fR, \\fI", @$also; + print MAN "\\fR.\nAnd "; +@@ -290,7 +312,7 @@ foreach (keys %manpages) { + # create symlinks + chdir("$BASE/man$MAN_SECTION"); + foreach (@$name) { +- print STDERR $_,"\n"; ++ print STDOUT $_,"\n"; + my $new_file = $_ . "." . $MAN_SECTION; + if ($new_file eq $symlink_file) { + next; +@@ -301,3 +323,12 @@ foreach (keys %manpages) { + chdir("../../.."); # and back, tricky and fragile... + close(MAN); + } ++foreach (keys %api) { ++ next if (/ / || /^$/); ++ if (not $unique{$_}) { ++ print STDERR "no man page for $_\n" if $report_errors; ++ $errors += 1; ++ } ++} ++ ++exit ($report_errors and $errors != 0); diff --git a/packages/neovim/build.sh b/packages/neovim/build.sh index 7379b32a..cd8b456a 100644 --- a/packages/neovim/build.sh +++ b/packages/neovim/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Ambitious Vim-fork focused on extensibility and agility TERMUX_PKG_VERSION=0.1.5.`date "+%Y%m%d%H%M"` TERMUX_PKG_SRCURL=https://github.com/neovim/neovim/archive/master.zip TERMUX_PKG_NO_SRC_CACHE=yes -TERMUX_PKG_DEPENDS="libuv, libmsgpack, libandroid-support, libluajit, libvterm, libtermkey, libutil" +TERMUX_PKG_DEPENDS="libuv, libmsgpack, libandroid-support, libvterm, libtermkey, libutil" TERMUX_PKG_FOLDERNAME="neovim-master" TERMUX_PKG_HOSTBUILD=true @@ -15,8 +15,6 @@ termux_step_host_build () { } termux_step_configure () { - # Install dependencies on ubuntu: - # apt install lua-lpeg luarocks; luarocks install lpeg; luarocks install mpack; luarocks install luabitop cd $TERMUX_PKG_BUILDDIR cmake -G "Unix Makefiles" .. \ -DCMAKE_AR=`which ${TERMUX_HOST_PLATFORM}-ar` \ diff --git a/packages/picolisp/build.sh b/packages/picolisp/build.sh index 83e641b7..a24d8943 100644 --- a/packages/picolisp/build.sh +++ b/packages/picolisp/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Lisp interpreter and application server framework" TERMUX_PKG_DEPENDS="libcrypt, openssl" _PICOLISP_YEAR=16 _PICOLISP_MONTH=5 -_PICOLISP_DAY=13 +_PICOLISP_DAY=18 TERMUX_PKG_VERSION=${_PICOLISP_YEAR}.${_PICOLISP_MONTH}.${_PICOLISP_DAY} TERMUX_PKG_SRCURL=http://software-lab.de/picoLisp.tgz TERMUX_PKG_FOLDERNAME=picoLisp diff --git a/packages/ranger/build.sh b/packages/ranger/build.sh index 44ea55c7..466d0587 100644 --- a/packages/ranger/build.sh +++ b/packages/ranger/build.sh @@ -9,14 +9,9 @@ TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_PLATFORM_INDEPENDENT=yes termux_step_make_install () { - python3.4 setup.py install --prefix=$TERMUX_PREFIX --force + python3.5 setup.py install --prefix=$TERMUX_PREFIX --force } termux_step_post_massage () { find . -path '*/__pycache__*' -delete - - # Work around python 3.5 not being available on ubuntu 15.04: - perl -p -i -e 's|python3.4|python3.5|g' bin/* - mv lib/python3.4 lib/python3.5 - mv lib/python3.5/site-packages/ranger-${TERMUX_PKG_VERSION}-py3.{4,5}.egg-info } diff --git a/scripts/install-sdk.sh b/scripts/install-sdk.sh new file mode 100755 index 00000000..73bfeb20 --- /dev/null +++ b/scripts/install-sdk.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Install desired parts of the Android SDK: +test -f $HOME/.termuxrc && . $HOME/.termuxrc +: ${ANDROID_HOME:="${HOME}/lib/android-sdk"} +echo y | $ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "build-tools-23.0.3" +echo y | $ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "android-23" diff --git a/ubuntu-setup.sh b/scripts/ubuntu-setup.sh similarity index 78% rename from ubuntu-setup.sh rename to scripts/ubuntu-setup.sh index 76222110..e700320c 100755 --- a/ubuntu-setup.sh +++ b/scripts/ubuntu-setup.sh @@ -10,20 +10,23 @@ PACKAGES="$PACKAGES flex" PACKAGES="$PACKAGES gettext" # Provides 'msgfmt' which the apt build uses PACKAGES="$PACKAGES help2man" PACKAGES="$PACKAGES libc6-dev-i386" # Needed by luajit host part of the build for -PACKAGES="$PACKAGES libcurl4-openssl-dev" # Needed by apt build +PACKAGES="$PACKAGES libcurl4-openssl-dev" # XXX: Needed by apt build PACKAGES="$PACKAGES libgdk-pixbuf2.0-dev" # Provides 'gkd-pixbuf-query-loaders' which the librsvg build uses PACKAGES="$PACKAGES libglib2.0-dev" # Provides 'glib-genmarshal' which the glib build uses PACKAGES="$PACKAGES libncurses5-dev" PACKAGES="$PACKAGES libtool" PACKAGES="$PACKAGES lzip" +PACKAGES="$PACKAGES subversion" # Used by the netpbm build. +PACKAGES="$PACKAGES tar" +PACKAGES="$PACKAGES unzip" PACKAGES="$PACKAGES m4" +PACKAGES="$PACKAGES openjdk-8-jdk" # Used for android-sdk. PACKAGES="$PACKAGES pkg-config" PACKAGES="$PACKAGES scons" PACKAGES="$PACKAGES texinfo" PACKAGES="$PACKAGES xmlto" PACKAGES="$PACKAGES xutils-dev" # Provides u'makedepend' which the openssl build uses -PACKAGES="$PACKAGES git" -sudo apt install $PACKAGES +sudo apt-get install -y $PACKAGES sudo mkdir -p /data/data/com.termux/files/usr sudo chown -R $USER /data -- 2.11.0