summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60c9a2587cec7bd247306dfd6a752ce8d5c1c7af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Merged with official ABS diffutils PKGBUILD by João, 2023/06/03 (all respective contributors apply herein)
# Maintainer: João Figueiredo <islandc0der@chaotic.cx>
# Contributor: David Parrish <daveparrish@tutanota.com>

pkgname=diffutils-git
pkgver=3.10_r1239.gc2e38d4
pkgrel=3
pkgdesc='Utility programs used for creating patch files'
arch=($CARCH)
url='https://www.gnu.org/software/diffutils'
license=(GPL3)
depends=(glibc bash)
source=("git+https://git.savannah.gnu.org/git/${pkgname%-git}.git")
sha256sums=('SKIP')

pkgver() {
  cd ${pkgname%-git}
  _ver="$(git describe | sed 's/^v//;s/-.*//')"
  echo "${_ver}_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}

# prepare() {
#   cd ${pkgname%-git}
#   # apply patch from the source array (should be a pacman feature)
#   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%-git}
  ./configure --prefix=/usr
  make
}

# check() {
#   cd ${pkgname%-git}
#   make check
# }

package() {
  cd ${pkgname%-git}
  make DESTDIR="$pkgdir" install
}