summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3bece425c830c07170bd5e0ddeb313f45ac31355 (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
# Maintainer: Ido Perlmuter <ido@ido50.net>
pkgname=sqlar-fossil
pkgver=0ab1c6f50f
pkgrel=1
pkgdesc="Compressed archives in SQLite databases, including a fuse filesystem"
arch=('any')
url="https://sqlite.org/sqlar/doc/trunk/README.md"
license=('Public Domain')
groups=()
depends=()
makedepends=('fossil' 'gcc' 'make' 'glibc' 'fuse3')
provides=("${pkgname%-fossil}")
conflicts=("${pkgname%-fossil}")
replaces=()
backup=()
options=()
install=
noextract=()

pkgver() {
	cd "$srcdir/${pkgname%-fossil}"
    printf "%s" "$(fossil timeline --format %h -n 1 | head -n 1)"
}

prepare() {
    cd "$srcdir"
    fossil clone --no-open --user anonymous https://sqlite.org/sqlar/src "${pkgname%-fossil}.fossil"
    mkdir "${pkgname%-fossil}"
    cd "${pkgname%-fossil}"
    fossil open "../${pkgname%-fossil}.fossil"
}

build() {
	cd "$srcdir/${pkgname%-fossil}"
    CFLAGS="-Wno-misleading-indentation -Wno-return-local-addr -O2" make all
}

package() {
	cd "$srcdir/${pkgname%-fossil}"
    mkdir -p "${pkgdir}/usr/bin"
    install sqlar sqlarfs "${pkgdir}/usr/bin/"
}