summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fce8e043dc3d4c54b57e374fb43ab1037f412f7b (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=r132.75ca8c4
pkgrel=1
pkgdesc="Browser for Raspberry Pi Press publications in PDF format"
arch=('x86_64' 'i686' 'arm64')
url="https://github.com/raspberrypi-ui/bookshelf"
license=('BSD-3-Clause')
depends=('glib2' 'gtk3>=3.24' 'libx11' 'curl' 'gdk-pixbuf2' 
		'hicolor-icon-theme' 'glibc')
makedepends=('git' 'sed' 'coreutils')
provides=("rp-bookshelf")
conflicts=("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"
}