chiark / gitweb /
Add TERMUX_PKG_BREAKS
authorGrimler <henka20@hotmail.com>
Mon, 31 Jul 2017 20:31:05 +0000 (22:31 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 3 Aug 2017 21:59:53 +0000 (23:59 +0200)
Breaks is is a bit kinder than Conflicts and should be used for example if a file is moved between packages or if a package is splitted into two.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks

build-package.sh

index 0d44006c77cd8c336a546ad1eda9dcc04410bd43..10fc80bd3a7a9b9c7b059c27092dc873ccb45c2c 100755 (executable)
@@ -306,6 +306,7 @@ termux_step_setup_variables() {
        TERMUX_PKG_EXTRA_MAKE_ARGS=""
        TERMUX_PKG_BUILD_IN_SRC=""
        TERMUX_PKG_RM_AFTER_INSTALL=""
+       TERMUX_PKG_BREAKS="" # https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
        TERMUX_PKG_DEPENDS=""
        TERMUX_PKG_HOMEPAGE=""
        TERMUX_PKG_DESCRIPTION="FIXME:Add description"
@@ -1147,6 +1148,7 @@ termux_step_create_debfile() {
                Description: $TERMUX_PKG_DESCRIPTION
                Homepage: $TERMUX_PKG_HOMEPAGE
        HERE
+       test ! -z "$TERMUX_PKG_BREAKS" && echo "Breaks: $TERMUX_PKG_BREAKS" >> DEBIAN/control
        test ! -z "$TERMUX_PKG_DEPENDS" && echo "Depends: $TERMUX_PKG_DEPENDS" >> DEBIAN/control
        test ! -z "$TERMUX_PKG_ESSENTIAL" && echo "Essential: yes" >> DEBIAN/control
        test ! -z "$TERMUX_PKG_CONFLICTS" && echo "Conflicts: $TERMUX_PKG_CONFLICTS" >> DEBIAN/control