summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCaleb Maclennan2020-05-13 23:37:55 +0300
committerCaleb Maclennan2020-05-13 23:46:20 +0300
commit95cb7f67753bcb6c2312c5a1be6ac1c8b07f4707 (patch)
tree8fddac96bc7f6968ad7292edc39a3aff87d8de0b /PKGBUILD
parent1bff47ff831e8248a53d0097014f86370443cfc2 (diff)
downloadaur-95cb7f67753bcb6c2312c5a1be6ac1c8b07f4707.tar.gz
Cleanup packaging per Arch guidelines (and some prefs)
* Drop conflicts line, Arch guidelines explicitly say not to mark these both ways and that VCS packages should have the conflict for the stable release packages, not the other way around. * Don't nuke the build dir, allows rebuilds. Using `makepkg -C` already handles the details of doing a clean build (as does `makechrootpkg`). When not using those options it's actually quite useful to be able to run rebuilds to check that nothing changed but take advantage of the build system's cache. * Depend on freetype's provided soname. This is controversial in Arch circles especially as most projects don't increment their SO version numbers sanely. Most Arch packages do not provide soname information. A handfull do, and freetype is one that does. This won't affect AUR builders very much, but I host this package in a precompiled repository and this dependency automatically version-locks this package to the matching version of Freetype2. It doesn't need recompiling for most Freetype2 updates, but if the soname version changes then it does. This accomplishes that in a way that the regular package dependency does not. * Don't use verbose bash shell variable syntax. This is definitely not an Arch guideline as they only require valid bash syntax and quoting anything that does (or may) have spaces, but not using the braces except when needed to disambiguate a variable or add flags is how the `shellharden` utility outputs code. It's really convenient to be able to run PKGBUILD files though it and let it rewrite anything that needs fixing, so I tend to standardize on it's preferences even over my own.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD25
1 files changed, 13 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 395c7b9bbc4c..196548d94fe2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,33 @@
# Maintainer: Adrián Pérez de Castro <aperez@igalia.com>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+
pkgname=ots
pkgver=8.0.0
-pkgrel=1
+pkgrel=2
pkgdesc='OpenType fonts sanitiser. Supports TTF, WOFF, WOFF2 and other formats'
-arch=(i686 x86_64)
+arch=(x86_64 i686)
url=https://github.com/khaledhosny/ots
license=(custom)
-depends=(freetype2)
+depends=(freetype2 libfreetype.so)
makedepends=(meson ninja)
-conflicts=(ots-git)
-source=("${url}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz" no-tests.patch)
+source=("$url/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz"
+ no-tests.patch)
sha512sums=('efe6f67e27856657e93ea6c678da83d4e5fd600d48408a2981933855cc4ee38f118b308a896000285a3c2fc123a64e414a9f05cf73db72401567b0bb916d3cad'
'f061a37a8e940ca55489f308f3850a3a8a7e8ab04d7af600bef6645ae49586406eb3dd213f136236e8eec7c0384748a7f5ec8852e000ca45f99699dd974d21bb')
prepare () {
- cd "${pkgname}-${pkgver}"
- patch -p0 < "${srcdir}/no-tests.patch"
+ cd "$pkgname-$pkgver"
+ patch -p0 < "$srcdir/no-tests.patch"
}
build() {
- cd "${pkgname}-${pkgver}"
- rm -rf build
+ cd "$pkgname-$pkgver"
arch-meson build -Dgraphite=true
ninja -C build
}
package() {
- cd "${pkgname}-${pkgver}"
- DESTDIR="${pkgdir}" ninja -C build install
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "$pkgname-$pkgver"
+ DESTDIR="$pkgdir" ninja -C build install
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}