summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 050bd89be1e6be9454ad54b195b678a804ea619b (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
# Maintainer: Ivy Foster <ivy.foster@gmail.com>

pkgname='libnsgif-git'
pkgver=0.1.3.r0.gee6294d
pkgrel=2
pkgdesc='Decoding library for the gif image file format'
url='http://www.netsurf-browser.org/projects/libnsgif/'
license=('MIT')

makedepends=('git' 'netsurf-buildsystem-git')
provides=('libnsgif')
conflicts=('libnsgif')

arch=('x86_64' 'i686')
source=('git://git.netsurf-browser.org/libnsgif.git')
sha256sums=('SKIP')

pkgver() {
	cd libnsgif
	git describe --long | sed 's:release/::; s:-\([0-9]\+\)-:.r\1.:'
}

prepare() {
	sed 's:-D_BSD_SOURCE::' -i libnsgif/Makefile
}

build() {
	make -C libnsgif PREFIX=/usr INCLUDEDIR=include \
		LIBDIR=lib COMPONENT_TYPE=lib-shared
}

check() {
	make -C libnsgif PREFIX=/usr INCLUDEDIR=include \
		LIBDIR=lib COMPONENT_TYPE=lib-shared test
}

package() {
	cd libnsgif
	make DESTDIR="$pkgdir" PREFIX=/usr INCLUDEDIR=include \
		LIBDIR=lib COMPONENT_TYPE=lib-shared install
	install -Dm644 COPYING \
		"$pkgdir/usr/share/licenses/netsurf/libnsgif"
}