summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ecf0a578c93d838fbad2944124c0e12e56772858 (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
# Maintainer: Jakub Kądziołka <kuba@kadziolka.net>

pkgname=bsp-patch-git
pkgdesc="C implementation of the Binary Scripted Patch specification"
pkgver=115.b15e82e
pkgrel=1
arch=(x86_64)
url="https://github.com/fstirlitz/c-bsp"
license=('custom:publicdomain')
depends=(glibc)
makedepends=(make git)
source=(git+ssh://git@github.com/fstirlitz/c-bsp)
sha1sums=(SKIP)

pkgver() {
	cd c-bsp
	echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
	# Patch the Makefile to allow setting LDFLAGS from the environment
	sed '/LDFLAGS :=/s/$/ ${LDFLAGS}/' -i c-bsp/Makefile
}

build() {
	cd c-bsp
	make
}

package() {
	cd c-bsp
	make install DESTDIR="$pkgdir" prefix="/usr"
	install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}