summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d67639d8a39ad6299c3856ce5373611e80abba4c (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
50
51
52
53
# Maintainer: ROllerozxa <temporaryemail4meh [gee mail]>
# Contributor: Ivy Foster <ivy.foster@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
pkgname='netsurf-git'
pkgver=3.10.r158.gd92b26962
pkgrel=1
pkgdesc='Lightweight and fast web browser'
url='http://www.netsurf-browser.org/'
license=('MIT' 'GPL2')

depends=('curl' 'desktop-file-utils' 'duktape' 'gtk3' 'libmng' 'librsvg'
	'libcss-git' 'libdom-git' 'libnsbmp-git' 'libnsgif-git' 'libnsutils-git' 'libutf8proc-git'
)
makedepends=('git' 'inetutils' 'netsurf-buildsystem-git' 'nsgenbind-git' 'perl-html-parser' 'setconf')
provides=('netsurf')
conflicts=('netsurf')

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

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

prepare() {
	sed '/BSD_SOURCE/d' -i netsurf/frontends/gtk/Makefile
	
	setconf netsurf/frontends/gtk/res/netsurf-gtk.desktop 'Exec=netsurf-gtk3 %u'
}

build() {
	make -C netsurf \
		NETSURF_UA_FORMAT_STRING='"Mozilla/5.0 (%s; Arch Linux) NetSurf/%d.%d"' \
		TARGET=gtk \
		INCLUDEDIR=include \
		LIBDIR=lib \
		PREFIX=/usr -j8
}

package() {
	cd netsurf

	make PREFIX=/usr TARGET=gtk INCLUDEDIR=include LIBDIR=lib DESTDIR="$pkgdir" install

	install -Dm644 'frontends/gtk/res/netsurf.xpm' \
		"$pkgdir/usr/share/pixmaps/netsurf.xpm"
	install -Dm644 'frontends/gtk/res/netsurf-gtk.desktop' \
		"$pkgdir/usr/share/applications/netsurf.desktop"
	install -Dm644 'COPYING' \
		"$pkgdir/usr/share/licenses/netsurf/netsurf-gtk"
}