blob: e62321ac488dd658ce04112d565edfba59e7ffcd (
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
47
48
49
|
# Maintainer: BrainDamage
pkgname="sdump-git"
pkgrel=1
pkgver=20161004.c5fb55b
pkgdesc="sixel variant of idump with a w3mimgdisplay-compatible program"
arch=("i686" "x86_64")
url="https://github.com/uobikiemukot/sdump/"
license=("MIT")
depends=("libjpeg-turbo" "libpng" "libsixel")
optdepends=(
"wget: to use surl"
#"mupdf: to use spdf" arch package lacks mudraw
)
sha1sums=("SKIP")
source=("git+https://github.com/uobikiemukot/sdump")
pkgver() {
cd "sdump"
#uuuugly code to use date + current git hash in lieu of absent release tag
echo "$(date +%Y%m%d).$(git describe --always)"
}
build() {
# this project uses CFLAGS and LDFLAGS to set the optins, but pacman tries to add its own, and the makefile is set to reject current
# if the var is set, and chaining default flags won't make it build, so we uset them here
#FIXME: figure out which specific flag is making it fail
cd "sdump"
unset CFLAGS
unset LDFLAGS
make
cd "yaimg-sixel"
make
}
package() {
cd "sdump"
install -D "sdump" "$pkgdir/usr/bin/sdump"
install -D "yaimg-sixel/yaimg-sixel" "$pkgdir/usr/bin/yaimg-sixel"
install -D "scripts/surl" "$pkgdir/usr/bin/surl"
install -D "scripts/sviewer" "$pkgdir/usr/bin/sviewer"
#install -D "scripts/spdf" "$pkgdir/usr/bin/spdf"
}
post_install() {
echo "In order to use yaimg-sixel in place of w3mimgdisplay to have w3m render images using sixels, you have to:"
echo "rm /usr/lib/w3m/w3mimgdisplay"
echo "ln -s /usr/bin/yaimg-sixel /usr/lib/w3m/w3mimgdisplay"
echo "Add NoExtract = /usr/lib/w3m/w3mimgdiplay to pacman.conf so that further w3m updates won't override the symlink"
}
|