summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5dd09f07290606e80e97b4e28168561d5a56dcf2 (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: Daniel Bermond <dbermond@archlinux.org>

pkgname=brunsli
pkgver=0.1
pkgrel=2
pkgdesc='Lossless JPEG repacker'
arch=('x86_64')
url='https://github.com/google/brunsli/'
license=('MIT')
depends=('gcc-libs')
makedepends=('git' 'cmake')
source=("git+https://github.com/google/brunsli.git#tag=v${pkgver}"
        'git+https://github.com/google/brotli.git'
        'git+https://github.com/google/googletest.git'
        'git+https://github.com/google/highwayhash.git')
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

prepare() {
    git -C brunsli submodule init
    git -C brunsli config --local submodule.third_party/brotli.url "${srcdir}/brotli"
    git -C brunsli config --local submodule.third_party/googletest.url "${srcdir}/googletest"
    git -C brunsli config --local submodule.third_party/highwayhash.url "${srcdir}/highwayhash"
    git -C brunsli -c protocol.file.allow='always' submodule update
}

build() {
    cmake -B build -S brunsli \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -Wno-dev
    make -C build
}

package() {
    make -C build DESTDIR="$pkgdir" install
    install -D -m755 build/cbrunsli -t "${pkgdir}/usr/bin"
    install -D -m755 build/dbrunsli -t "${pkgdir}/usr/bin"
    install -D -m644 brunsli/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}