summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1a8817b7e373901e624945839994d8173f5b649c (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
# Maintainer: Xerz <xerz@xerz.one>
pkgname=boulder-git
pkgver=r1076.1b1e9f9
pkgrel=2
pkgdesc="Serpent OS build tool"
arch=('x86_64')
url="https://github.com/serpent-os/boulder"
license=('ZLIB')
depends=('curl' 'lmdb' 'xxhash' 'zstd' 'moss-serpent' 'moss-container')
makedepends=('git' 'ldc' 'cmake' 'meson' 'ninja')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/serpent-os/boulder"
        "git+https://github.com/serpent-os/moss-config"
        "git+https://github.com/serpent-os/moss-core"
        "git+https://github.com/serpent-os/moss-deps"
        "git+https://github.com/serpent-os/moss-fetcher"
        "git+https://github.com/serpent-os/moss-format"
        "git+https://github.com/serpent-os/moss-vendor"
        "git+https://github.com/dlang-community/D-YAML"
        "git+https://github.com/serpent-os/elf-d"
        "git+https://github.com/serpent-os/lmdb-d"
        "git+https://github.com/dlang-community/tinyendian"
        "git+https://github.com/serpent-os/xxhash-d"
        "git+https://github.com/repeatedly/zstd-d")
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

prepare() {
	cd "$srcdir/moss-vendor"
	git submodule init
	git config submodule.dyaml.url              "$srcdir/D-YAML"
	git config submodule.elf-d.url              "$srcdir/elf-d"
	git config submodule.subprojects/lmdb-d.url "$srcdir/lmdb-d"
	git config submodule.tinyendian.url         "$srcdir/tinyendian"
	git config submodule.xxhash-d.url           "$srcdir/xxhash-d"
	git config submodule.zstd-d.url             "$srcdir/zstd-d"
	git submodule update
}

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

build() {
	cd "$srcdir/${pkgname%-git}"
	meson --prefix=/usr --buildtype=plain build
	meson compile -C build
}

package() {
	cd "$srcdir/${pkgname%-git}"
	DESTDIR="$pkgdir" meson install -C build
	install -D -m644 "${srcdir}/${pkgname%-git}/LICENSES/Zlib.txt" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
}