config.phundrak.com/Documents/code/PKGBUILDs/sxiv/PKGBUILD

50 lines
1.3 KiB
Bash
Raw Normal View History

2021-03-27 21:01:05 +00:00
# Maintainer: Jason Ryan <jasonwryan@gmail.com>
# Contributor: Steven Allen <steven@stebalien.com>
# Contributor: Army
# Contributor: Bastien Dejean <baskerville@lavabit.com>
_name=sxiv
pkgname="${_name}-bepo-git"
pkgver=2020.01.16
pkgrel=2
pkgdesc="Simple (or small or suckless) X Image Viewer"
arch=('i686' 'x86_64')
url="https://github.com/muennich/${_name}"
license=('GPL2')
depends=('imlib2' 'libexif' 'libxft' 'hicolor-icon-theme')
makedepends=('git')
provides=("${_name}")
conflicts=("${_name}" "${_name}-git")
source=("${_name}::git+${url}.git" config.h)
sha512sums=('SKIP'
'f3cd5532977033ffb878e397c76b4576f931b74dc2c158f373d6618d0d4155387bc983b745f0adeffeee85de9ebdc9e9418d823cceef8895b2d8e6ab1d4791ca')
2021-03-27 21:01:05 +00:00
pkgver() {
cd "${srcdir}/${_name}"
git log -1 --format="%cd" --date=short | sed 's/-/./g'
}
prepare() {
cd "${srcdir}/${_name}"
[[ -f $srcdir/config.h ]] && cp $srcdir/config.h .
# Allow custom FLAGS
sed -i Makefile -e 's|^CFLAGS\s*=|CFLAGS +=|' -e 's|^LDFLAGS\s*=|LDFLAGS +=|'
}
build() {
cd "$srcdir/${_name}"
export CFLAGS="$CFLAGS $CPPFLAGS"
make PREFIX="/usr"
}
package() {
cd "$srcdir/${_name}"
make PREFIX="/usr" DESTDIR="$pkgdir" install
make -C icon PREFIX="/usr" DESTDIR="$pkgdir" install
install -Dm644 sxiv.desktop "$pkgdir/usr/share/applications/${_name}.desktop"
}
# vim:set ts=2 sw=2 et: