chiark / gitweb /
less: Bump revision after enabling pcre
[termux-packages] / packages / alpine / build.sh
1 TERMUX_PKG_HOMEPAGE=http://repo.or.cz/alpine.git
2 TERMUX_PKG_DESCRIPTION="Fast, easy to use email client"
3 TERMUX_PKG_VERSION=2.21
4 TERMUX_PKG_REVISION=2
5 TERMUX_PKG_SHA256=6030b6881b8168546756ab3a5e43628d8d564539b0476578e287775573a77438
6 TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/alpine-$TERMUX_PKG_VERSION.tar.xz
7 TERMUX_PKG_DEPENDS="libcrypt, ncurses, openssl-tool"
8 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
9 --disable-debug
10 --with-c-client-target=lnx
11 --without-krb5
12 --without-ldap
13 --without-pthread
14 --without-tcl
15 --with-system-pinerc=${TERMUX_PREFIX}/etc/pine.conf
16 --with-passfile=$TERMUX_ANDROID_HOME/.pine-passfile
17 "
18 TERMUX_PKG_BUILD_IN_SRC=yes
19
20 termux_step_pre_configure () {
21         export TCC=$CC
22         export TRANLIB=$RANLIB
23         export SPELLPROG=${TERMUX_PREFIX}/bin/hunspell
24         export alpine_SSLVERSION=old
25         export TPATH=$PATH
26
27         LDFLAGS+=" -lcrypt -llog"
28
29         # To get S_IREAD and friends:
30         CPPFLAGS+=" -D__USE_BSD"
31
32         cp $TERMUX_PKG_BUILDER_DIR/getpass.c $TERMUX_PKG_SRCDIR/include/
33         cp $TERMUX_PKG_BUILDER_DIR/getpass.h $TERMUX_PKG_SRCDIR/include/
34         cp $TERMUX_PKG_BUILDER_DIR/pine.conf $TERMUX_PREFIX/etc/pine.conf
35
36         touch $TERMUX_PKG_SRCDIR/imap/lnxok
37 }
38
39 termux_step_post_configure() {
40         cd pith
41         $CC_FOR_BUILD help_c_gen.c -o help_c_gen
42         $CC_FOR_BUILD help_h_gen.c -o help_h_gen
43         touch -d "next hour" help_c_gen help_h_gen
44 }
45 termux_step_create_debscripts () {
46
47         echo "#!$TERMUX_PREFIX/bin/sh" >> postinst
48         echo "if [ ! -e $TERMUX_ANDROID_HOME/.alpine-smime/.pwd/MasterPassword.crt ] && [ ! -e $HOME/.alpine-smime/.pwd/MasterPassword.key ]; then" >> postinst
49         echo "echo 'warning making a passwordless masterpasword file'" >> postinst
50         echo "mkdir -p \$HOME/.alpine-smime/public \$HOME/.alpine-smime/.pwd \$HOME/.alpine-smime/private \$HOME/.alpine-smime/ca" >> postinst
51         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
52         echo "touch \$HOME/.pine-passfile" >> postinst
53         echo "fi" >> postinst
54 }
55