summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorptrv2015-08-10 23:22:24 +0200
committerptrv2015-08-10 23:22:24 +0200
commitb58b9782cc6d0bda8d78d4922da4eddeaef9fd16 (patch)
tree250243f4dc434997f394bc6b85f6c722a65e3612 /PKGBUILD
downloadaur-tilemill-git.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD68
1 files changed, 68 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f1d0d6d0f152
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# $Id$
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Jonas Heinrich <onny@project-insanity.org>
+# Contributor: Danilo Bargen <mail àt dbrgn dôt ch>
+
+pkgname=tilemill-git
+_pkgname=tilemill
+pkgver=v0.10.1.r345.gc31d70c
+pkgrel=1
+pkgdesc="Modern map design studio"
+arch=('i686' 'x86_64')
+url="https://www.mapbox.com/tilemill/"
+license=('BSD')
+depends=('nodejs10' 'webkitgtk2')
+makedepends=('git' 'boost' 'imagemagick')
+
+# For achitectures other than x86_64, we need to build node-mapnik from sources
+if test "$CARCH" == x86_64; then
+ makedepends+=('mapnik')
+else
+ depends+=('mapnik-git' 'protobuf')
+fi
+
+conflicts=("$_pkgname")
+provides=("$_pkgname")
+options=(!emptydirs)
+source=('git+https://github.com/mapbox/tilemill.git'
+ 'tilemill.desktop'
+ 'tilemill.patch')
+sha1sums=('SKIP'
+ 'd7b20eba61b52d340a838bef8468b3d33257cf66'
+ 'a43f5feac064acdeb73a3a71f61945136eee0497')
+
+pkgver() {
+ cd $_pkgname
+ git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd $_pkgname
+
+ # Don't install npm, it's already in nodejs package
+ patch -p1 -i "$srcdir/tilemill.patch"
+
+ convert tilemill.ico tilemill.png
+}
+
+package() {
+ cd $_pkgname
+
+ # python2 fix for build node-mapnik
+ mkdir -p "$srcdir/bin"
+ ln -s -f /usr/bin/python2 "$srcdir/bin/python"
+ export PATH="$srcdir/bin:$PATH"
+
+ npm install -d -g --user root --prefix "$pkgdir/usr" --python=/usr/bin/python2
+
+ # icon and .desktop files
+ install -Dm644 tilemill-5.png "$pkgdir/usr/share/pixmaps/tilemill.png"
+ install -Dm644 "$srcdir/tilemill.desktop" "$pkgdir/usr/share/applications/tilemill.desktop"
+ install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # fix permissions
+ find "$pkgdir" -exec chown root:root '{}' \;
+
+ # python2 fix
+ find "$pkgdir" -type f -exec sed -i 's@^#.*python$@#!/usr/bin/python2@' '{}' \;
+}