aboutsummaryrefslogtreecommitdiffstats
path: root/community/woff2/APKBUILD
blob: 0ded988b4ca853006f7e4cb9345d1f8bd2abdda5 (plain) (blame)
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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=woff2
pkgver=1.0.2
pkgrel=1
pkgdesc="Web Open Font Format 2 reference implementation"
options="!check" # No testsuite
url="https://github.com/google/woff2"
arch="all"
license="GPL-3.0-or-later"
makedepends="brotli-dev cmake"
subpackages="$pkgname-dev lib${pkgname}common:_common lib${pkgname}enc:_enc
	lib${pkgname}dec:_dec"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/woff2/archive/v$pkgver.tar.gz
	dont-set-rpath.patch
	install-executables.patch
	"

build() {
	cmake . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_SKIP_BUILD_RPATH=ON
	make
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

_common() {
	pkgdesc="$pkgdesc (common library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libwoff2common.so.* "$subpkgdir"/usr/lib
}

_dec() {
	pkgdesc="$pkgdesc (encoder library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libwoff2enc.so.* "$subpkgdir"/usr/lib
}

_enc() {
	pkgdesc="$pkgdesc (decoder library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libwoff2dec.so.* "$subpkgdir"/usr/lib
}

sha512sums="c788bba1530aec463e755e901f9342f4b599e3a07f54645fef1dc388ab5d5c30625535e5dd38e9e792e04a640574baa50eeefb6b7338ab403755f4a4e0c3044d  woff2-1.0.2.tar.gz
e60add16905b597ed3b10cfe3f4c90d43db28c86466bb65e880a91e84f388e9f03e3a16d0012e717ca170456d91b748c8de5ade4882e8f31e2a60620c183df5f  dont-set-rpath.patch
49bd21014c427a13fd19dd80f821a48ed290bb4978b77ccf72ba424e90deb11db604b452cbd315f0d372c176d3093a685c892a8088f9d54a28bdb5a3bb6f0adb  install-executables.patch"