summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4b4820fe8907444bfcda489d6616e5f2d5af5ce3 (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
# Maintainer: Shang Yuanchun <idealities@gmail.com>

pkgbase=dhex
pkgname=dhex-git
pkgver=r4.dde4756
pkgrel=1
pkgdesc="An ncurses-based hexeditor with a diff mode"
arch=('x86_64')
url="https://github.com/ideal/dhex/"
license=('GPL')
depends=('ncurses')
conflictc=('dhex')
source=("git+https://github.com/ideal/dhex.git")
md5sums=('SKIP')

_pkgname=dhex

pkgver() {
  cd "${srcdir}/${_pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}/${_pkgname}"
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -d "${pkgdir}"/usr/{bin,share}
  install -d "${pkgdir}"/usr/man/man{1,5}
  make DESTDIR="${pkgdir}/usr" install
  mv "${pkgdir}/usr/man" "${pkgdir}/usr/share/man"
}