Want more features on Pastebin? Sign Up, it's FREE!
Guest

xombrero PKGBUILD

By: a guest on Aug 28th, 2013  |  syntax: Bash  |  size: 3.40 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Kyle Keen <keenerd@gmail.com>
  2. # Maintainer: lks <lukas dot graetz at web dot de>
  3.  
  4. pkgbase=xombrero
  5. pkgname=('xombrero' 'xombrero3')
  6. pkgver=1.6.3
  7. pkgrel=1
  8. pkgdesc="A minimalists web browser, vi-like while maintaining traditional web browser behavior."
  9. arch=(armv7h 'i686' 'x86_64')
  10. url="https://opensource.conformal.com/wiki/xombrero"
  11. _watch="https://opensource.conformal.com/snapshots/xombrero/"
  12. license=('custom:ISC')
  13. makedepends=('libbsd' 'desktop-file-utils')
  14. install=$pkgname.install
  15. options=('!emptydirs')
  16. source=(http://opensource.conformal.com/snapshots/$pkgname/$pkgname-$pkgver.tgz \
  17.         LICENSE
  18.         xombrero3.desktop)
  19. md5sums=('11248a0f40542265022e8dfe692644da'
  20.          'f3eeb6e8b70a3dcccb8ee57daf584c9e'
  21.          '72f97fb1b7c255340381c0e640b7a8a1')
  22.  
  23. build() {
  24.     cd "$srcdir/$pkgbase-$pkgver"
  25.     export GTK_CFLAGS="${GTK_CFLAGS} -I/usr/include/gtk-2.0/"
  26.     # no spam
  27.     sed -i 's|https://www.cyphertite.com|https://archlinux.org|' xombrero.{c,conf,h}
  28.     # relocations
  29.     sed -i 's|/etc/ssl/cert.pem|/etc/ssl/certs/ca-certificates.crt|' xombrero.conf
  30.     #sed -i 's|/usr/local/share/xombrero/style.css|/usr/share/xombrero/style.css|' xombrero.conf
  31.     sed -i 's|/usr/local/share/|/usr/share/|' {unix.c,xombrero.conf,xombrero.h}
  32. }
  33.  
  34.  
  35. # That stuff seems to not be supported by makepkg (see package_)
  36. _build_xombrero() {
  37.     cd "${srcdir}"
  38.     mkdir -p build-gtk2
  39.     # Create hardlinks to save memory
  40.     cp --no-clobber -R -l "$pkgbase-$pkgver" build-gtk2
  41.  
  42.     pushd "build-gtk2/$pkgbase-$pkgver"
  43.     make PREFIX="/usr" -C linux GTK_VERSION=gtk2
  44.     popd
  45. }
  46.  
  47. _build_xombrero3() {
  48.     cd "${srcdir}"
  49.     mkdir -p build-gtk3
  50.     cp --no-clobber -R -l "$pkgbase-$pkgver" build-gtk3
  51.  
  52.     pushd "build-gtk3/$pkgbase-$pkgver"
  53.  
  54.     cp ${srcdir}/$pkgbase-$pkgver/xombrero.h xombrero.h
  55.     sed -i 's|/usr/share/xombrero|/usr/share/xombrero3|' xombrero.h
  56.  
  57.     make PREFIX="/usr" -C linux GTK_VERSION=gtk3
  58.     popd
  59. }
  60.  
  61. package_xombrero() {
  62.     depends=('webkitgtk2' 'libbsd' 'desktop-file-utils')
  63.     provides=('xxxterm')
  64.     replaces=('xxxterm')
  65.  
  66.     _build_xombrero
  67.  
  68.     cd "$srcdir/build-gtk2/$pkgbase-$pkgver"
  69.     mkdir -p "$pkgdir/usr/share/applications/"  # buggy makefile
  70.     make PREFIX="/usr" DESTDIR="$pkgdir" install -C linux GTK_VERSION=gtk2
  71.     install -Dm644 xombrero.conf     "$pkgdir/etc/skel/.xombrero.conf"
  72.     install -Dm644 xombrero.desktop  "$pkgdir/usr/share/applications/xombrero.desktop"
  73.     install -Dm755 config-checker.pl "$pkgdir/usr/bin/config-checker.pl"
  74.     install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  75. }
  76.  
  77. package_xombrero3() {
  78.     depends=('webkitgtk3' 'libbsd' 'desktop-file-utils')
  79.     provides=('xxxterm' 'xombrero')
  80.     replaces=('xxxterm')
  81.  
  82.     _build_xombrero3
  83.  
  84.     cd "$srcdir/build-gtk3/$pkgbase-$pkgver"
  85.     mkdir -p "$pkgdir/usr/share/applications/"  # buggy makefile
  86.     make PREFIX="/usr" DESTDIR="$pkgdir" install -C linux GTK_VERSION=gtk3
  87.     mv $pkgdir/usr/bin/xombrero $pkgdir/usr/bin/xombrero3
  88.     mv $pkgdir/usr/share/man/man1/xombrero.1 $pkgdir/usr/share/man/man1/xombrero3.1
  89.     mv $pkgdir/usr/share/xombrero $pkgdir/usr/share/xombrero3
  90.  
  91.     rm ${pkgdir}/usr/share/applications/xombrero.desktop
  92.     install -Dm644 "$srcdir/xombrero3.desktop"  "$pkgdir/usr/share/applications/xombrero3.desktop"
  93.     install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  94. }
clone this paste RAW Paste Data