summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a708917a3db908b08d4cc201b0e5407908c6799c (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
# Maintainer:  uffe < uffe at uffe dat org >
# Contributor: SpepS <dreamspepser at yahoo dot it>
# Contributor: eric <eric@archlinux.org>

pkgname=hexcurse
pkgver=1.60.0
pkgrel=1
pkgdesc="Versatile ncurses-based hex editor."
arch=('i686' 'x86_64')
url="https://github.com/LonnyGomes/hexcurse"
license=('GPL-2.0-only')
depends=('ncurses')
options=('!makeflags')
source=("${pkgname}-${pkgver}.tgz::https://github.com/LonnyGomes/hexcurse/archive/v${pkgver}.tar.gz")
sha256sums=('f6919e4a824ee354f003f0c42e4c4cef98a93aa7e3aa449caedd13f9a2db5530')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # gcc does not like clever people
  sed -i 's|buffer, 1,|NULL, 0,|' src/hexcurse.c
  sed -i 's|char buffer\[1\];|//&|' src/hexcurse.c
  sed -i 's|2*MAXY);|&\nbreak;|' src/acceptch.c

  patch -p0 < ${startdir}/file_ptr.patch
  patch -p0 < ${startdir}/ncurses.patch
  patch -p0 < ${startdir}/boundry.patch
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr --mandir=/usr/share/man

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}/" install
}

#
# EOF
#