summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8d3c1b01bf0f29b97b7051a30e8bffc6b8221322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer:  Yusuf Aktepe <yusuf@yusufaktepe.com>
# Contributor: Doron Behar <doron.behar@gmail.com>
# Contributor: Jason Ryan <jasonwryan@gmail.com>

_name=sxiv
pkgname="${_name}-dir-navigation-git"
pkgver=25.r10.g07300da
pkgrel=1
pkgdesc="Simple X Image Viewer (with patch to browse through images in working directory)"
arch=('x86_64')
url="https://github.com/muennich/sxiv"
license=('GPL2')
depends=('imlib2' 'desktop-file-utils' 'xdg-utils' 'hicolor-icon-theme' 'libexif' 'libxft')
makedepends=('git')
provides=("${_name}")
conflicts=("${_name}")
source=("${_name}::git+${url}.git"
        "dir-navigation.patch")
sha256sums=('SKIP'
            '11a907950d5e9a1fc8e1aa0cd82fc6532ed9d74f91189463455989ffff8da5cd')

pkgver() {
  cd "${_name}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "${_name}"
  ln -s config.def.h config.h

  echo "==> Applying dir-navigation patch"
  git apply "$srcdir"/dir-navigation.patch
}

build() {
  make -C "${_name}"
}

package() {
  cd "${_name}"
  make PREFIX=/usr DESTDIR="$pkgdir" install
  make -C icon PREFIX=/usr DESTDIR="$pkgdir" install
  install -Dm644 sxiv.desktop "$pkgdir"/usr/share/applications/sxiv.desktop
}

# vim:set ts=2 sw=2 et: