PKGBUILD 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Maintainer (arch): Alexander F. Rødseth <xyproto@archlinux.org>
  2. # Contributor: Paulo Matias <matiasΘarchlinux-br·org>
  3. # Contributor: Georgij Kondratjev <smpuj@bk.ru>
  4. # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
  5. # Contributor: André Silva <emulatorman@hyperbola.info>
  6. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  7. # parabola changes and rationale:
  8. # - remove/replace non-privacy remote services
  9. pkgname=netsurf
  10. pkgver=3.10
  11. pkgrel=3
  12. pkgrel+=.parabola1
  13. pkgdesc='Lightweight and fast web browser'
  14. pkgdesc+=', without non-privacy remote services'
  15. arch=(x86_64)
  16. arch+=(armv7h i686)
  17. url='https://www.netsurf-browser.org/'
  18. license=(MIT GPL2)
  19. depends=(bash curl gtk3 'libhubbub=0.3.7' libjpeg-turbo 'libnsutils=0.1.0'
  20. 'libutf8proc>=2.6.0' 'libwapcaplet>=0.4.3' 'libdom>=0.4.1' libwebp)
  21. # vim is needed only for xxd when building
  22. makedepends=(check inetutils 'libcss>=0.9.1' 'libnsbmp>=0.1.6'
  23. 'libnsgif>=0.2.1' 'nsgenbind>=0.8' perl-html-parser setconf vim)
  24. source=("https://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-$pkgver.tar.gz"
  25. netsurf.sh)
  26. source+=(remove_nonprivacy_options.patch)
  27. sha256sums=('495adf6b6614ce36fca6c605f7c321f9cb4a3df838043158122678ce2b3325b7'
  28. '34c1f41c02ff3791a1b734197d99ec7f58c403dee05f0f9b7b9b3509d32b51ac')
  29. sha256sums+=('0e5bf14693b932a718a2018689602376b08ff4e41f4530aa1e345180db9c8b43')
  30. prepare() {
  31. cd "$pkgname-all-$pkgver/$pkgname"
  32. # Fix compilation issues
  33. sed -i 's:libutf8proc/::;s:UTF8PROC_CCC_VIRAMA:UTF8PROC_BIDI_CLASS_EN:' utils/idna.c
  34. # Use "netsurf" as the name of the executable in /usr/bin
  35. setconf frontends/gtk/res/netsurf-gtk.desktop 'Exec=netsurf %u'
  36. # remove/replace non-privacy remote services
  37. cd "${srcdir}"/$pkgname-all-$pkgver/
  38. echo "applying remove_nonprivacy_options.patch"
  39. patch -p1 -i ../remove_nonprivacy_options.patch
  40. }
  41. build() {
  42. CFLAGS="$CFLAGS -w -Os -funroll-loops" \
  43. make -C "$pkgname-all-$pkgver/$pkgname" \
  44. NETSURF_UA_FORMAT_STRING='"NetSurf/%d.%d (%s; Arch Linux)"' \
  45. TARGET=gtk3 \
  46. LIBDIR=lib \
  47. INCLUDEDIR=include \
  48. PREFIX=/usr
  49. }
  50. package() {
  51. make -C "$pkgname-all-$pkgver/$pkgname" \
  52. TARGET=gtk3 \
  53. LIBDIR=lib \
  54. INCLUDEDIR=include \
  55. DESTDIR="$pkgdir" \
  56. PREFIX=/usr \
  57. install
  58. # Launch script
  59. install -Dm755 $pkgname.sh "$pkgdir/usr/bin/$pkgname"
  60. cd "$pkgname-all-$pkgver/$pkgname"
  61. # Desktop icon and shortcut
  62. install -Dm644 frontends/gtk/res/$pkgname.xpm \
  63. "$pkgdir/usr/share/pixmaps/$pkgname.xpm"
  64. install -Dm644 frontends/gtk/res/$pkgname-gtk.desktop \
  65. "$pkgdir/usr/share/applications/$pkgname.desktop"
  66. # License
  67. install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
  68. }