summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 649c45b154f074ff3202265fcc5d465c3197a657 (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
# Maintainer: Kemel Zaidan <kemelzaidan@gmail.com>
pkgname=rp-bookshelf
pkgver=r127.28f6d13
pkgrel=1
pkgdesc="Browser for Raspberry Pi Press publications in PDF format"
arch=('x86_64')
url="https://github.com/raspberrypi-ui/bookshelf"
license=('BSD')
depends=('glib2' 'gtk3>=3.24' 'libx11' 'curl' 'gdk-pixbuf2' 
		'hicolor-icon-theme' 'glibc')
makedepends=('git' 'sed' 'coreutils')
provides=("rp-bookshelf")
conflicts=("rp-bookshelf" "rp-bookshelf-git")
source=('git+https://github.com/raspberrypi-ui/bookshelf.git')
sha256sums=('SKIP')

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

prepare() {
	cd "bookshelf"
}

build() {
	cd "bookshelf"
	./autogen.sh
	./configure --prefix=/usr
	make
}

check() {
	cd "bookshelf"
	make -k check
}

package() {
	cd "bookshelf"
	make DESTDIR="$pkgdir/" install
	mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}/"
	touch "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	sed -n '2,25p' src/rp_bookshelf.c > \
		"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}