summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBatou2018-04-11 01:28:34 -0400
committerBatou2018-04-11 01:28:34 -0400
commit97f2d808990c01f3b9d34c9a496c42cd8ff5a4a6 (patch)
tree334d85536a636d0f07bae0713c6accbc34e39d33 /PKGBUILD
downloadaur-97f2d808990c01f3b9d34c9a496c42cd8ff5a4a6.tar.gz
tifig: initial upload
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..432d7189051b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Batou <batou at cryptolab dot net>
+pkgname=tifig-git
+pkgver=r73.7dea067
+pkgrel=1
+pkgdesc="A fast High Efficiency Image File Format (HEIF/HEIC) converter"
+arch=('x86_64')
+url="https://github.com/monostream/tifig"
+license=('Apache')
+depends=('ffmpeg' 'vips')
+makedepends=('git' 'cmake')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=(
+ 'git+https://github.com/monostream/tifig.git'
+ 'git+https://github.com/monostream/heif.git'
+ 'git+https://github.com/jarro2783/cxxopts.git'
+)
+md5sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+)
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}"
+ local submodules=(
+ 'lib/heif'
+ 'lib/cxxopts'
+ )
+ for submodule in "${submodules[@]}"; do
+ git submodule init "$submodule"
+ git config "submodule.$submodule.url" "$srcdir/${submodule##*/}"
+ git submodule update "$submodule"
+ done
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ mkdir -p "build" && cd "build"
+ cmake ..
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}/build"
+ install -Dm755 "${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}"
+}