From 1e64bbc8b0a9954bdb4b3fd4c4675592d7ba771e Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sun, 11 Jul 2021 17:34:37 +0200 Subject: [PATCH] calcurse: split out calcurse-caldav into a subpackage calcurse-caldav requires python and the httplib2 python module, so make subpackage depend on python and install httplib2 through pip in postinst script. --- packages/calcurse/build.sh | 2 ++ packages/calcurse/calcurse-caldav.subpackage.sh | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 packages/calcurse/calcurse-caldav.subpackage.sh diff --git a/packages/calcurse/build.sh b/packages/calcurse/build.sh index cc18c9caf..5f1f51dbe 100644 --- a/packages/calcurse/build.sh +++ b/packages/calcurse/build.sh @@ -3,9 +3,11 @@ TERMUX_PKG_DESCRIPTION="calcurse is a calendar and scheduling application for th TERMUX_PKG_LICENSE="BSD 2-Clause" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=4.7.1 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://calcurse.org/files/calcurse-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=0a7c55d07674569d166c0b0e7587b2972d3da8160cdb7d60b1dbd2895803afb0 TERMUX_PKG_DEPENDS="libandroid-support, ncurses" +TERMUX_PKG_RECOMMENDS="calcurse-caldav" termux_step_pre_configure() { export ac_cv_lib_pthread_pthread_create=yes diff --git a/packages/calcurse/calcurse-caldav.subpackage.sh b/packages/calcurse/calcurse-caldav.subpackage.sh new file mode 100644 index 000000000..08346531f --- /dev/null +++ b/packages/calcurse/calcurse-caldav.subpackage.sh @@ -0,0 +1,10 @@ +TERMUX_SUBPKG_INCLUDE="bin/calcurse-caldav" +TERMUX_SUBPKG_DESCRIPTION="Sync calcurse with remote caldav calendar" +TERMUX_SUBPKG_DEPENDS="python" +TERMUX_SUBPKG_REPLACES="calcurse (<< 4.7.1-1)" +TERMUX_SUBPKG_BREAKS="calcurse (<< 4.7.1-1)" + +termux_step_create_subpkg_debscripts() { + echo "#!$TERMUX_PREFIX/bin/sh" > postinst + echo "pip3 install httplib2" >> postinst +}