# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Alois Nespor <alium@artixlinux.org>

pkgname=posterazor
pkgver=1.9.7
pkgrel=1
pkgdesc='Cut an image or PDF into pieces which can be printed and assembled to a poster'
arch=('x86_64')
url='https://github.com/aportale/posterazor'
license=('GPL')
depends=('poppler-qt5')
makedepends=('git')
source=("git+$url#commit=e20bb7dd2af75aad2a72f9f8fcffef045abdd8cc"
        'posterazor.desktop'
        'posterazor.xpm')
sha256sums=('SKIP'
            'd393b99b5cc9122c3050fdf195e128d654557dbfa24ca911dc138178a18e528d'
            'dd23560b60950add8aec451d127e33f6c5a81824db4ed729bd7fc0f21f9f373d')

build() {
  cd posterazor/src
  qmake-qt5 \
    QMAKE_CFLAGS_RELEASE="$CPPFLAGS $CFLAGS" \
    QMAKE_CXXFLAGS_RELEASE="$CPPFLAGS $CXXFLAGS" \
    QMAKE_LFLAGS_RELEASE="$LDFLAGS" \
    posterazor.pro
  make
}
package() {
  cd posterazor/src
  install -Dm755 PosteRazor "$pkgdir/usr/bin/posterazor"
  install -Dm644 "$srcdir/posterazor.desktop" \
    "$pkgdir/usr/share/applications/posterazor.desktop"
  install -Dm644 "$srcdir/posterazor.xpm" \
    "$pkgdir/usr/share/icons/posterazor.xpm"
}

# vim: ts=2 sw=2 et:
