# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: dorphell <dorphell@archlinux.org>

pkgname=dillo
pkgver=3.0.5
pkgrel=7
pkgdesc="A small, fast graphical web browser built on FLTK"
arch=(x86_64)
url="https://www.dillo.org"
license=('GPL')
depends=('fltk' 'libjpeg' 'perl' 'libpng' 'gcc-libs' 'libxcursor'
         'libxi' 'libxinerama' 'openssl-1.0')
backup=(etc/dillo/{dillorc,dpidrc})
validpgpkeys=('D91CE08D8679CF2A6F8792E05B1004E936929CEE')
source=(https://www.dillo.org/download/$pkgname-$pkgver.tar.bz2{,.asc}
        dillo.desktop
        https://www.dillo.org/Icons/ProgramIcon48.png)
sha256sums=('db1be16c1c5842ebe07b419aa7c6ef11a45603a75df2877f99635f4f8345148b'
            'SKIP'
            '54848080de1911a2af8ff786fbe92bdad8fe8b7b8a0d580c9c79b0a98f9fdcde'
            'de629745e6f3a271475a501e2b94558b3deb7bf9a407bcef16426e600e1731f3')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  CFLAGS+=" -I/usr/include/openssl-1.0" LDFLAGS+=" -L/usr/lib/openssl-1.0" \
      ./configure --prefix=/usr --sysconfdir=/etc --enable-cookies --enable-dlgui \
              --enable-ssl
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install

  install -Dm644 ../dillo.desktop "$pkgdir/usr/share/applications/dillo.desktop"
  install -Dm644 ../ProgramIcon48.png "$pkgdir/usr/share/pixmaps/dillo.png"
}