diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 0001-hardcode-path-to-bashplus.patch | 40 | ||||
-rw-r--r-- | PKGBUILD | 28 |
4 files changed, 55 insertions, 20 deletions
@@ -1,15 +1,17 @@ pkgbase = git-subrepo pkgdesc = Git submodule alternative pkgver = 0.4.6 - pkgrel = 1 + pkgrel = 2 url = https://github.com/ingydotnet/git-subrepo arch = any license = MIT checkdepends = perl depends = bash + depends = bashplus=0.1.0 depends = git - backup = etc/profile.d/git-subrepo.sh source = git+https://github.com/ingydotnet/git-subrepo.git#commit=110b9eb13f259986fffcf11e8fb187b8cce50921 + source = 0001-hardcode-path-to-bashplus.patch b2sums = SKIP + b2sums = b8ec76eaf76802cd000d757e17cf48da582d28f27a992b0e98503c400b615dc4875db8477a388600ee8eb547d188d75d79312d2c697b992a780009f1b103ffbb pkgname = git-subrepo diff --git a/.gitignore b/.gitignore index 713f6f80aff8..c8189ad17c74 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ !/.gitignore !/.SRCINFO !/PKGBUILD +!/0001-hardcode-path-to-bashplus.patch diff --git a/0001-hardcode-path-to-bashplus.patch b/0001-hardcode-path-to-bashplus.patch new file mode 100644 index 000000000000..6825065cb9d6 --- /dev/null +++ b/0001-hardcode-path-to-bashplus.patch @@ -0,0 +1,40 @@ +From 64a049a1f4245a88781c4cc4d89ab608443208f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=A9clairevoyant?= + <848000+eclairevoyant@users.noreply.github.com> +Date: Tue, 16 May 2023 02:01:30 -0400 +Subject: [PATCH] hardcode path to bashplus + +--- + lib/git-subrepo | 16 +--------------- + 1 file changed, 1 insertion(+), 15 deletions(-) + +diff --git a/lib/git-subrepo b/lib/git-subrepo +index a6d5d96..4006c19 100755 +--- a/lib/git-subrepo ++++ b/lib/git-subrepo +@@ -12,21 +12,7 @@ set -e + export FILTER_BRANCH_SQUELCH_WARNING=1 + + # Import Bash+ helper functions: +-SOURCE=${BASH_SOURCE[0]} +-while [[ -h $SOURCE ]]; do +- DIR=$( cd -P "$( dirname "$SOURCE" )" && pwd ) +- SOURCE=$(readlink "$SOURCE") +- [[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE +-done +-SOURCE_DIR=$(dirname "$SOURCE") +- +-if [[ -z $GIT_SUBREPO_ROOT ]]; then +- # If `make install` installation used: +- source "${SOURCE_DIR}/git-subrepo.d/bash+.bash" +-else +- # If `source .rc` method used: +- source "${SOURCE_DIR}/../ext/bashplus/lib/bash+.bash" +-fi ++source /usr/lib/bash+.bash + bash+:import :std can version-check + + +-- +2.40.1 + @@ -2,19 +2,22 @@ pkgname=git-subrepo pkgver=0.4.6 -pkgrel=1 +pkgrel=2 pkgdesc="Git submodule alternative" arch=(any) url="https://github.com/ingydotnet/$pkgname" license=(MIT) -depends=(bash git) +depends=(bash 'bashplus=0.1.0' git) checkdepends=(perl) -backup=("etc/profile.d/$pkgname.sh") -source=("git+$url.git#commit=110b9eb13f259986fffcf11e8fb187b8cce50921") -b2sums=('SKIP') +source=("git+$url.git#commit=110b9eb13f259986fffcf11e8fb187b8cce50921" +0001-hardcode-path-to-bashplus.patch) +b2sums=('SKIP' + 'b8ec76eaf76802cd000d757e17cf48da582d28f27a992b0e98503c400b615dc4875db8477a388600ee8eb547d188d75d79312d2c697b992a780009f1b103ffbb') prepare() { cd $pkgname + patch -Np1 -i ../0001-hardcode-path-to-bashplus.patch + # remove flaky tests rm -rf test/{push-force,status}.t } @@ -26,20 +29,9 @@ check() { package() { cd $pkgname - install -vdm755 "$pkgdir/opt/" - cp -R . "$pkgdir/opt/$pkgname" - rm -rf "$pkgdir/opt/$pkgname/"{.git{,attributes,ignore},ext/test-more-bash,man,test} - - install -vdm755 "$pkgdir/usr/share/licenses/$pkgname/" - ln -sf "/opt/$pkgname/License" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - + install -vDm644 License "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -vDm644 man/man1/$pkgname.1 -t "$pkgdir/usr/share/man/man1/" - install -vDm755 /dev/stdin "$pkgdir/etc/profile.d/$pkgname.sh" <<eof -source /opt/git-subrepo/.rc -eof - - #make DESTDIR="$pkgdir" PREFIX="/usr" install - #install -vDm755 lib/$pkgname -t "$pkgdir/usr/bin/" + install -vDm755 lib/$pkgname -t "$pkgdir/usr/bin/" install -vDm644 share/completion.bash "$pkgdir/usr/share/bash-completion/completions/$pkgname" install -vDm644 share/zsh-completion/_$pkgname -t "$pkgdir/usr/share/zsh/site-functions/" } |