# $Id: PKGBUILD 176151 2016-05-23 18:27:18Z arodseth $ # Maintainer (Arch): Alexander F Rødseth # Contributor (Arch): Paulo Matias # Contributor (Arch): Georgij Kondratjev # Contributor (Arch): Daniel J Griffiths # Maintainer: André Silva pkgname=netsurf pkgver=3.5 pkgrel=4.parabola1 pkgdesc='Lightweight and fast web browser, without non-privacy search engines' arch=('x86_64' 'i686' 'armv7h') url='http://www.netsurf-browser.org/' license=('MIT' 'GPL2') replaces=(${pkgname}-libre) conflicts=(${pkgname}-libre) depends=('libmng' 'librsvg' 'curl' 'lcms' 'desktop-file-utils' 'libnsbmp>=0.1.3' 'libnsgif>=0.1.3' 'libcss>=0.6.0-2' 'libdom>=0.3.0' 'libnsutils>=0.0.2' 'libutf8proc>=1.3.1-3' 'gtk3' 'duktape') makedepends=('re2c' 'netsurf-buildsystem' 'perl-html-parser' 'nsgenbind>=0.3' 'inetutils' 'libutf8proc>1.3.1-2' 'git' 'setconf' 'check' 'gtk3' 'duktape') source=("git://git.netsurf-browser.org/netsurf.git#tag=release/$pkgver" 'netsurf.sh') sha256sums=('SKIP' '70310682d1612457d7bb3096549110b6ec127f50e97853259fada6be0c52924b') prepare() { cd "$pkgname" sed 's:_BSD_SOURCE:_DEFAULT_SOURCE:' -i gtk/Makefile.target sed 's:netsurf-gtk:netsurf:' -i gtk/res/netsurf-gtk.desktop sed 's:libutf8proc/::' -i utils/idna.c sed 's:UTF8PROC_CCC_VIRAMA:UTF8PROC_BIDI_CLASS_EN:' -i utils/idna.c sed 's:utf8proc_normalise:utf8proc_reencode:' -i utils/idna.c setconf Makefile.defaults NETSURF_UA_FORMAT_STRING '"NetSurf/%d.%d (%s; Parabola GNU/Linux-libre)"' setconf Makefile.defaults NETSURF_USE_DUKTAPE YES # remove non-privacy search engines sed -i '\|Google|d \|Yahoo|d \|Bing|d \|Business.com|d \|Omgili|d \|BBC News|d \|Ubuntu Packages|d \|Ask[.]com|d \|Answers.com|d \|Youtube|d \|AeroMp3|d \|AOL|d \|Baidu|d \|Amazon|d \|Ebay|d \|IMDB|d \|ESPN|d \|Aminet|d \|OS4Depot|d s|DuckDuckGo|DuckDuckGo HTML| s|duckduckgo[.]com|duckduckgo.com/html| s|duckduckgo[.]com/html/favicon.ico|duckduckgo.com/favicon.ico| s|seeks-project.info|seeks.fr|g ' gtk/res/SearchEngines \ \!NetSurf/Resources/SearchEngines \ amiga/resources/SearchEngines sed -i '\|readable name such as| s|google|duckduckgo| \|readable name such as| s|yahoo|seeks| \|host address such as www[.]google[.]com| s|google[.]com|duckduckgo.com/html| s|google[.]com?search=%s|duckduckgo.com/html/?q=%s| \|return strdup| s|google[.]com|duckduckgo.com/html| \|return strdup| s|google|duckduckgo| \|return strdup| s|duckduckgo[.]com/html/favicon[.]ico|duckduckgo.com/favicon.ico| s|www[.]google[.]com/search?q=%s|duckduckgo.com/html/?q=%s| ' desktop/searchweb.c sed -i 's|google[.][.a-z]\{0,6\}/search|duckduckgo.com/html/search| s|Google-Suche|DuckDuckGo HTML| s|Google Search|DuckDuckGo HTML| s|Ricerca Google|DuckDuckGo HTML| s|Google検索|DuckDuckGo HTML| \|BBC News|d \|Reuters|d \|CNN|d \|Slashdot|d \|Ars Technica|d \|The Register|d \|W3C|d s|google[.][.a-z]\{0,6\}|duckduckgo.com/html| s|Google|DuckDuckGo HTML| s|[.a-z]\{0,4\}yahoo[.]co[.a-z]\{0,4\}|www.seeks.fr| s|Yahoo!|Seeks| \|IMDB|d s|The Icon Bar|Creative Commons| s|www[.]iconbar[.]com|creativecommons.org| s|ROOL|Dictionary.com| s|www[.]riscosopen[.]org|dictionary.reference.com| \|riscos.info|d ' \!NetSurf/Resources/de/welcome.html\,faf \ \!NetSurf/Resources/en/welcome.html\,faf \ \!NetSurf/Resources/it/welcome.html\,faf \ \!NetSurf/Resources/ja/welcome.html\,faf sed -i 's|nsgenbind -g|nsgenbind| ' javascript/Makefile } build() { make -C "$pkgname" \ NETSURF_GTK_MAJOR=3 \ TARGET=gtk \ LIBDIR=lib \ INCLUDEDIR=include \ PREFIX=/usr } package() { cd "$pkgname" make install LIBDIR=lib INCLUDEDIR=include PREFIX=/usr TARGET=gtk \ NETSURF_GTK_MAJOR=3 DESTDIR="$pkgdir" # Script and executable mv "$pkgdir/usr/bin/$pkgname" "$pkgdir/usr/bin/$pkgname.elf" install -Dm755 "../$pkgname.sh" "$pkgdir/usr/bin/$pkgname" # Desktop shortcut install -Dm644 "gtk/res/$pkgname.xpm" \ "$pkgdir/usr/share/pixmaps/$pkgname.xpm" install -Dm644 "gtk/res/$pkgname-gtk.desktop" \ "$pkgdir/usr/share/applications/$pkgname.desktop" # License install -Dm644 COPYING \ "$pkgdir/usr/share/licenses/$pkgname/COPYING" # Fix path mv "$pkgdir/usr/share/netsurf/:./gtk/res/"* "$pkgdir/usr/share/netsurf/" rmdir "$pkgdir/usr/share/netsurf/"{:./gtk/res,:./gtk,:.} } # vim:set ts=2 sw=2 et: