summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 77ffa0419483b84e5a45a2822c207495b2805196 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Contributor: Sara <sara at archlinux dot us>
# Maintainer: aksr <aksr at t-com dot me>
pkgname=fbpad-git
pkgver=r330.2ee5296
pkgrel=1
pkgdesc="A small linux framebuffer virtual terminal."
arch=('i686' 'x86_64')
url="http://repo.or.cz/w/fbpad.git"
license=('ISC')
makedepends=('git' 'fbpad-mkfn' 'ttf-dejavu')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
install=${pkgname}.install
source=("$pkgname::git+git://repo.or.cz/fbpad.git"
	'conf.h' 'fbpad-256.info')
noextract=()
md5sums=('SKIP'
         '495dd74f3e7a7f4df04cfb9a55087040'
         '185b9d6ec1c539213226a3e2509c7ccd')
sha1sums=('SKIP'
          '50ce304bd75c3c897bac13b2a32d268b5c888e47'
          'dbb816fe37faf0acb4e1a916d7493787c2b647fc')
sha256sums=('SKIP'
            'fb1bff1bc5f3bf552c316a034ce469d5dbe78826b063271285535ed0f07e06d7'
            'fb8ae049aa7d41fb285cbf7aa4487b28014273ebcfceefb4d58fb07018312e9c')

pkgver() {
	cd $srcdir/$pkgname
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd $srcdir/$pkgname
	## Custom config.h
	cp $srcdir/conf.h conf.h
}

build() {
	cd $srcdir/$pkgname
	make
}

package() {
	cd $srcdir/$pkgname
	install -Dm755 ../$pkgname/fbpad $pkgdir/usr/bin/fbpad
	install -Dm644 ../$pkgname/README $pkgdir/usr/share/doc/${pkgname%-*}/README

	## Compile terminfo
	mkdir -p $pkgdir/usr/share/terminfo
	tic -x -o $pkgdir/usr/share/terminfo $srcdir/fbpad-256.info

	## Setup fonts
	if [ -x /usr/bin/fbpad-mkfn-ft ]; then
		FT2TF="fbpad-mkfn-ft -h17 -w11"
		SZ="12h120v100b0a1"
		$FT2TF /usr/share/fonts/TTF/DejaVuSansMono.ttf:$SZ > $srcdir/font-r.tf
		$FT2TF /usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf:$SZ > $srcdir/font-i.tf
		$FT2TF /usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf:$SZ > $srcdir/font-b.tf
	else
		FT2TF="fbpad-mkfn-stb -h20 -w10"
		SZ="17h120v100b0a1"
		$FT2TF /usr/share/fonts/TTF/DejaVuSansMono.ttf:$SZ > $srcdir/font-r.tf
		$FT2TF /usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf:$SZ > $srcdir/font-i.tf
		$FT2TF /usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf:$SZ > $srcdir/font-b.tf
	fi

	## Install fonts
	install -Dm644 ../font-r.tf $pkgdir/usr/share/${pkgname%-*}/font-r.tf
	install -Dm644 ../font-i.tf $pkgdir/usr/share/${pkgname%-*}/font-i.tf
	install -Dm644 ../font-b.tf $pkgdir/usr/share/${pkgname%-*}/font-b.tf
}