summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--grep-compat/.SRCINFO12
-rw-r--r--grep-compat/.gitignore7
-rw-r--r--grep-compat/PKGBUILD37
3 files changed, 32 insertions, 24 deletions
diff --git a/grep-compat/.SRCINFO b/grep-compat/.SRCINFO
index 9266da5..2d6265a 100644
--- a/grep-compat/.SRCINFO
+++ b/grep-compat/.SRCINFO
@@ -1,16 +1,22 @@
pkgbase = grep-compat
pkgdesc = A string search utility (without egrep and fgrep warnings when used in scripts)
pkgver = 3.12
- pkgrel = 1
+ pkgrel = 2
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 = https://ftp.gnu.org/gnu/grep/grep-3.12.tar.xz
- sha512sums = c54b4db5a8b9afe098c088decd94977746305284d716666a60bac82b4edc0fae4acf828970b5b6fc7d58ecd549f638e17e6958f33a71fedcc7d7415b9228b161
+ 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
pkgname = grep-compat
diff --git a/grep-compat/.gitignore b/grep-compat/.gitignore
index 58d77f2..e08d660 100644
--- a/grep-compat/.gitignore
+++ b/grep-compat/.gitignore
@@ -1,7 +1,6 @@
pkg/
src/
+gnulib/
+grep/
*.sig
-*.tar
-*.tar.zst
-*.tar.gz
-*.tar.xz
+*.tar*
diff --git a/grep-compat/PKGBUILD b/grep-compat/PKGBUILD
index 0d0a8fe..38bf6b5 100644
--- a/grep-compat/PKGBUILD
+++ b/grep-compat/PKGBUILD
@@ -1,45 +1,48 @@
# Maintainer: kj_sh604 <406hs_jk@proton.me>
pkgname=grep-compat
-pkgname_=grep
+_pkgname=grep
pkgver=3.12
-pkgrel=1
+pkgrel=2
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=('texinfo')
+makedepends=('gperf' 'git' 'python' 'texinfo' 'wget')
provides=('grep')
conflicts=('grep')
-source=("https://ftp.gnu.org/gnu/$pkgname_/$pkgname_-$pkgver.tar.xz")
-sha512sums=('c54b4db5a8b9afe098c088decd94977746305284d716666a60bac82b4edc0fae4acf828970b5b6fc7d58ecd549f638e17e6958f33a71fedcc7d7415b9228b161')
+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')
prepare() {
- 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
+ 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
}
build() {
- cd $pkgname_-$pkgver
+ cd $_pkgname
./configure --prefix=/usr
make
}
check() {
- cd $pkgname_-$pkgver
+ cd $_pkgname
make check
}
package() {
- cd $pkgname_-$pkgver
+ cd $_pkgname
make DESTDIR="$pkgdir" install
# add egrep wrapper script with no warnings