diff options
| author | kj-sh604 | 2025-06-02 19:53:57 -0400 |
|---|---|---|
| committer | kj-sh604 | 2025-06-02 19:53:57 -0400 |
| commit | f5158df6500840148e44ea6962d862e2f80c423b (patch) | |
| tree | 174ac9f26444b03b89a7710934c41a3bf27c0344 | |
| parent | 4cea10af51fddd4639fb18d0d90aff591a45d98d (diff) | |
refactor: fix constant rebuilds with advanced AUR helpers
it was reported to me that on paru when the "Devel" option is enabled the grep-compat gets constantly rebuilt due to gnulib having daily commits.
I've considered the following:
* just add a #commit=073f99896898b757c7c2cdcff82cfedb440346f6 at the end of the gnulib url
* revert the package back to how it was written with 3.12-1 (which was based on how the Official Arch Repo\'s grep 3.11-1 PKGBUILD was written)
I've decided to go with the second option due to faster build times (pulling the gnulib and grep git repos can take a long time) and being more in-line with upstream/vanilla GNU grep
| -rw-r--r-- | grep-compat/.SRCINFO | 12 | ||||
| -rw-r--r-- | grep-compat/PKGBUILD | 35 |
2 files changed, 19 insertions, 28 deletions
diff --git a/grep-compat/.SRCINFO b/grep-compat/.SRCINFO index 2d6265a..33a8ac4 100644 --- a/grep-compat/.SRCINFO +++ b/grep-compat/.SRCINFO @@ -1,22 +1,16 @@ pkgbase = grep-compat pkgdesc = A string search utility (without egrep and fgrep warnings when used in scripts) pkgver = 3.12 - pkgrel = 2 + pkgrel = 3 url = https://www.gnu.org/software/grep/ arch = x86_64 license = GPL3 - makedepends = gperf - makedepends = git - makedepends = python makedepends = texinfo - makedepends = wget depends = glibc depends = pcre2 provides = grep conflicts = grep - source = git+https://git.savannah.gnu.org/git/grep.git#tag=v3.12 - source = git+https://git.savannah.gnu.org/git/gnulib.git - sha256sums = 9543190d9ca2201ea46fddaeb39031a0acde1f6aa4351a72f33ef3455e6dd41e - sha256sums = SKIP + source = https://ftp.gnu.org/gnu/grep/grep-3.12.tar.xz + sha256sums = 2649b27c0e90e632eadcd757be06c6e9a4f48d941de51e7c0f83ff76408a07b9 pkgname = grep-compat diff --git a/grep-compat/PKGBUILD b/grep-compat/PKGBUILD index 38bf6b5..79595e6 100644 --- a/grep-compat/PKGBUILD +++ b/grep-compat/PKGBUILD @@ -3,46 +3,43 @@ pkgname=grep-compat _pkgname=grep pkgver=3.12 -pkgrel=2 +pkgrel=3 pkgdesc='A string search utility (without egrep and fgrep warnings when used in scripts)' arch=('x86_64') license=('GPL3') url='https://www.gnu.org/software/grep/' depends=('glibc' 'pcre2') -makedepends=('gperf' 'git' 'python' 'texinfo' 'wget') +makedepends=('texinfo') provides=('grep') conflicts=('grep') -source=("git+https://git.savannah.gnu.org/git/grep.git#tag=v${pkgver}" - "git+https://git.savannah.gnu.org/git/gnulib.git") -sha256sums=('9543190d9ca2201ea46fddaeb39031a0acde1f6aa4351a72f33ef3455e6dd41e' - 'SKIP') +source=("https://ftp.gnu.org/gnu/$_pkgname/$_pkgname-$pkgver.tar.xz") +sha256sums=('2649b27c0e90e632eadcd757be06c6e9a4f48d941de51e7c0f83ff76408a07b9') prepare() { - cd $_pkgname - - git submodule init - git config submodule.gnulib.url "${srcdir}/gnulib" - git -c protocol.file.allow=always submodule update - - git cherry-pick -n \ - '2e19d07ef1c08c3ce4771bb1bfee1ae6541f1c0d' - - sh bootstrap + cd $_pkgname-$pkgver + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + msg2 "Applying patch $src..." + patch -Np1 < "../$src" + done } build() { - cd $_pkgname + cd $_pkgname-$pkgver ./configure --prefix=/usr make } check() { - cd $_pkgname + cd $_pkgname-$pkgver make check } package() { - cd $_pkgname + cd $_pkgname-$pkgver make DESTDIR="$pkgdir" install # add egrep wrapper script with no warnings |
