diff options
Diffstat (limited to '0020-add-support-for-recommends-and-suggests-AKA-weak-dep.patch')
-rw-r--r-- | 0020-add-support-for-recommends-and-suggests-AKA-weak-dep.patch | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/0020-add-support-for-recommends-and-suggests-AKA-weak-dep.patch b/0020-add-support-for-recommends-and-suggests-AKA-weak-dep.patch new file mode 100644 index 000000000000..527bd5e20405 --- /dev/null +++ b/0020-add-support-for-recommends-and-suggests-AKA-weak-dep.patch @@ -0,0 +1,141 @@ +From d24a630501a9aba5d53de2dcb3d9aa66edd3fe06 Mon Sep 17 00:00:00 2001 +From: Felipe Eduardo Sanchez Diaz Duran <izto@asic-linux.com.mx> +Date: Wed, 26 Apr 2017 17:37:50 -0500 +Subject: [PATCH 20/20] add support for --recommends and --suggests (AKA weak + dependencies) + +Patch submitted by Tobias Bengfort <tobias.bengfort@posteo.de> +--- + checkinstall.in | 48 ++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 42 insertions(+), 6 deletions(-) + +diff --git a/checkinstall.in b/checkinstall.in +index 1771522..66c9cd0 100755 +--- a/checkinstall.in ++++ b/checkinstall.in +@@ -151,6 +151,8 @@ function usage() { + echog "--maintainer=<email addr> The package maintainer (.deb)" + echog "--provides=<list> Features provided by this package" + echog "--requires=<list> Features required by this package" ++ echog "--recommends=<list> Features recommended by this package" ++ echog "--suggests=<list> Features suggested by this package" + echog "--conflicts=<list> Packages that this package cannot be installed with (.deb)" + echog "--replaces=<list> Packages that this package replaces (.deb)" + echog "--rpmflags=<flags> Pass this flags to the rpm installer" +@@ -512,7 +514,7 @@ fi + # Arguments parsing + + CKNAME=`basename "$0"` +-PARAMS=`getopt -a -n $CKNAME -o +d:DA:t:RShHy -l arch:,type:,si,showinstall::,ss,showslack::,deldoc::,delspec::,deldesc::,strip::,addso::,install::,stripso::,gzman::,bk,backup::,autodoinst::,reset-uids::,fstrans::,spec:,exclude:,include:,pkgname:,pkgversion:,pkgrelease:,pkglicense:,pkggroup:,pkgsource:,pkgaltsource:,pakdir:,docdir:,requires:,provides:,conflicts:,replaces:,maintainer:,dpkgflags:,rpmflags:,pkgarch:,umask:,with-tar:,summary:,inspect,review-spec,review-control,newslack,help,nodoc,rpmi,rpmu,version,copyright,default -- "$@"` ++PARAMS=`getopt -a -n $CKNAME -o +d:DA:t:RShHy -l arch:,type:,si,showinstall::,ss,showslack::,deldoc::,delspec::,deldesc::,strip::,addso::,install::,stripso::,gzman::,bk,backup::,autodoinst::,reset-uids::,fstrans::,spec:,exclude:,include:,pkgname:,pkgversion:,pkgrelease:,pkglicense:,pkggroup:,pkgsource:,pkgaltsource:,pakdir:,docdir:,requires:,recommends:,suggests:,provides:,conflicts:,replaces:,maintainer:,dpkgflags:,rpmflags:,pkgarch:,umask:,with-tar:,summary:,inspect,review-spec,review-control,newslack,help,nodoc,rpmi,rpmu,version,copyright,default -- "$@"` + + [ $? -gt 0 ] && help_notice + +@@ -603,6 +605,14 @@ while [ "$1" != "--" ]; do + shift + REQUIRES=`eval echo $1` + ;; ++ --recommends) ++ shift ++ RECOMMENDS=`eval echo $1` ++ ;; ++ --suggests) ++ shift ++ SUGGESTS=`eval echo $1` ++ ;; + --maintainer) + shift + MAINTAINER=`eval echo $1` +@@ -1272,6 +1282,8 @@ if [ -f "$SPEC_PATH" ]; then + PKG_GROUP=`getparameter "^[Gg]roup"` + PROVIDES=`getparameter "^[Pp]rovides"` + REQUIRES=`getparameter "^[Rr]equires"` ++ RECOMMENDS=`getparameter "^[Rr]commends"` ++ SUGGESTS=`getparameter "^[Ss]uggests"` + fi + + OPTION=junk +@@ -1370,6 +1382,8 @@ fi + ! [ "$ALTSOURCE" ] && ALTSOURCE="" + ! [ "$PROVIDES" ] && PROVIDES="$NAME" + ! [ "$REQUIRES" ] && REQUIRES="" ++ ! [ "$RECOMMENDS" ] && RECOMMENDS="" ++ ! [ "$SUGGESTS" ] && SUGGESTS="" + # bond: added this so it is easy to change the Maintainer: field + # just by setting the MAINTAINER environment variable + +@@ -1406,9 +1420,13 @@ fi + [ "$CK_REDHAT" -o "$CK_DEBIAN" ] && + echog "10 - Requires: [ %s ]" "$REQUIRES" + [ "$CK_REDHAT" -o "$CK_DEBIAN" ] && +- echog "11 - Provides: [ %s ]" "$PROVIDES" +- [ "$CK_DEBIAN" ] && echog "12 - Conflicts: [ %s ]" "$CONFLICTS" +- [ "$CK_DEBIAN" ] && echog "13 - Replaces: [ %s ]" "$REPLACES" ++ echog "11 - Recommends: [ %s ]" "$RECOMMENDS" ++ [ "$CK_REDHAT" -o "$CK_DEBIAN" ] && ++ echog "12 - Suggests: [ %s ]" "$SUGGESTS" ++ [ "$CK_REDHAT" -o "$CK_DEBIAN" ] && ++ echog "13 - Provides: [ %s ]" "$PROVIDES" ++ [ "$CK_DEBIAN" ] && echog "14 - Conflicts: [ %s ]" "$CONFLICTS" ++ [ "$CK_DEBIAN" ] && echog "15 - Replaces: [ %s ]" "$REPLACES" + + echo + echogn "Enter a number to change any of them or press ENTER to continue: " +@@ -1480,6 +1498,20 @@ fi + } + ;; + 11) ++ [ "$CK_REDHAT" -o "$CK_DEBIAN" ] && { ++ echog "Enter the additional recommendations: " ++ echo -n ">> " ++ read RECOMMENDS ++ } ++ ;; ++ 12) ++ [ "$CK_REDHAT" -o "$CK_DEBIAN" ] && { ++ echog "Enter the additional suggestions: " ++ echo -n ">> " ++ read SUGGESTS ++ } ++ ;; ++ 13) + # 01-12-06 UKo: new feature + [ "$CK_REDHAT" -o "$CK_DEBIAN" ] && { + echog "Enter the provided features: " +@@ -1487,13 +1519,13 @@ fi + read PROVIDES + } + ;; +- 12) ++ 14) + [ "$CK_DEBIAN" ] && { echog "Enter the conflicting packages: " + echo -n ">> " + read CONFLICTS + } + ;; +- 13) ++ 15) + [ "$CK_DEBIAN" ] && { echog "Enter the replaced packages: " + echo -n ">> " + read REPLACES +@@ -2396,6 +2428,8 @@ Group: $PKG_GROUP + BuildRoot: $BROOTPATH + Provides: $PROVIDES + Requires: $REQUIRES,/bin/sh ++Recommends: $RECOMMENDS ++Suggests: $SUGGESTS + + %description + EOF +@@ -2588,6 +2622,8 @@ Maintainer: $MAINTAINER + Architecture: $ARCHITECTURE + Version: ${VERSION}-${RELEASE} + Depends: $REQUIRES ++Recommends: $RECOMMENDS ++Suggests: $SUGGESTS + Provides: $PROVIDES + Conflicts: $CONFLICTS + Replaces: $REPLACES +-- +2.30.0 + |