X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/64701b2aa178dd33fe3e585a89237da1461d98d5..3c0c4460acbba3191c9fa4a98e1bd68babd7d04d:/packages/alpine/build.sh diff --git a/packages/alpine/build.sh b/packages/alpine/build.sh index 9a6394be..cb116b24 100644 --- a/packages/alpine/build.sh +++ b/packages/alpine/build.sh @@ -1,8 +1,9 @@ -TERMUX_PKG_HOMEPAGE=http://alpine.freeiz.com +TERMUX_PKG_HOMEPAGE=http://repo.or.cz/alpine.git TERMUX_PKG_DESCRIPTION="Fast, easy to use email client" TERMUX_PKG_VERSION=2.21 -TERMUX_PKG_SRCURL=http://alpine.freeiz.com/alpine/release/src/alpine-${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_DEPENDS="libcrypt, ncurses, openssl" +TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/alpine-$TERMUX_PKG_VERSION.tar.xz +TERMUX_PKG_DEPENDS="libcrypt, ncurses, openssl-tool" +TERMUX_PKG_REVISION=1 TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --disable-debug --with-c-client-target=lnx @@ -11,22 +12,11 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --without-pthread --without-tcl --with-system-pinerc=${TERMUX_PREFIX}/etc/pine.conf ---with-passfile=$TERMUX_ANDROID_HOME/.pine-passfile +--with-passfile=$TERMUX_ANDROID_HOME/.pine-passfile " TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_SHA256=6030b6881b8168546756ab3a5e43628d8d564539b0476578e287775573a77438 -termux_step_post_extract_package() { - # requires installing autopoint default docker image doesn't have that installed as yet. - # adding huge patchsets to termux-packages repo is not optimal so we do it this way for now. - local file="$TERMUX_PKG_CACHEDIR/maildir.patch.gz" - termux_download \ - http://alpine.freeiz.com/alpine/patches/alpine-${TERMUX_PKG_VERSION}/maildir.patch.gz \ - "$file" \ - 1229ea9ec4e150dda1d2da866730a777148874e4667c54cd2c488101b5db8099 - gunzip -c $file | patch -s -p1 -} - termux_step_pre_configure () { export TCC=$CC export TRANLIB=$RANLIB @@ -36,6 +26,9 @@ termux_step_pre_configure () { LDFLAGS+=" -lcrypt -llog" + # To get S_IREAD and friends: + CPPFLAGS+=" -D__USE_BSD" + cp $TERMUX_PKG_BUILDER_DIR/getpass.c $TERMUX_PKG_SRCDIR/include/ cp $TERMUX_PKG_BUILDER_DIR/getpass.h $TERMUX_PKG_SRCDIR/include/ cp $TERMUX_PKG_BUILDER_DIR/pine.conf $TERMUX_PREFIX/etc/pine.conf @@ -49,4 +42,14 @@ termux_step_post_configure() { $CC_FOR_BUILD help_h_gen.c -o help_h_gen touch -d "next hour" help_c_gen help_h_gen } +termux_step_create_debscripts () { + + echo "#!$TERMUX_PREFIX/bin/sh" >> postinst + echo "if [ ! -e $TERMUX_ANDROID_HOME/.alpine-smime/.pwd/MasterPassword.crt ] && [ ! -e $HOME/.alpine-smime/.pwd/MasterPassword.key ]; then" >> postinst + echo "echo 'warning making a passwordless masterpasword file'" >> postinst + echo "mkdir -p \$HOME/.alpine-smime/public \$HOME/.alpine-smime/.pwd \$HOME/.alpine-smime/private \$HOME/.alpine-smime/ca" >> postinst + echo "openssl req -x509 -newkey rsa:2048 -keyout \$HOME/.alpine-smime/.pwd/MasterPassword.key -out \$HOME/.alpine-smime/.pwd/MasterPassword.crt -days 10000 -nodes -subj '/C=US/ST=dont/L=use/O=this Name/OU=for/CN=anything.com.termux'" >> postinst + echo "touch \$HOME/.pine-passfile" >> postinst + echo "fi" >> postinst +}