summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Gathoye2017-11-11 21:05:31 +0100
committerWilliam Gathoye2017-11-11 21:05:31 +0100
commit62766a0a4e9d154348706a650e9b29ca8b3c1066 (patch)
tree12acb07236d7e792d144a1f44a514ec707f88bf7
parent01c57052bd490ca3e94e7de02866cd42af5a9da3 (diff)
downloadaur-62766a0a4e9d154348706a650e9b29ca8b3c1066.tar.gz
Add support for i686 and ARM architectures
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD28
2 files changed, 31 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a5b72af4a315..14082740d574 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,14 @@
pkgbase = mattermost
pkgdesc = Open source Slack-alternative in Golang and React
pkgver = 4.3.2
- pkgrel = 1
+ pkgrel = 2
url = https://mattermost.com
arch = i686
arch = x86_64
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
license = AGPL
license = Apache
makedepends = git
@@ -12,6 +16,7 @@ pkgbase = mattermost
makedepends = libpng12
makedepends = npm
makedepends = yarn
+ makedepends = mozjpeg
optdepends = mariadb: SQL server storage
optdepends = percona-server: SQL server storage
optdepends = postgresql: SQL server storage
diff --git a/PKGBUILD b/PKGBUILD
index fee34ea388b0..28259a1e06a2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,13 +3,17 @@
pkgname=mattermost
pkgver=4.3.2
-pkgrel=1
+pkgrel=2
pkgdesc='Open source Slack-alternative in Golang and React'
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://mattermost.com"
license=('AGPL' 'Apache')
-makedepends=('git' 'go' 'libpng12' 'npm' 'yarn')
+makedepends=('git' 'go' 'libpng12' 'npm' 'yarn' 'mozjpeg')
+# mozjpeg isn't needed on amd64, but the version brought with node_modules does
+# not run on an architecture other than amd64. The one provided with Arch Linux
+# does. Including it even for amd64 prevents us to have a bunch of architecture
+# specific makedepends arrays.
optdepends=(
'mariadb: SQL server storage'
'percona-server: SQL server storage'
@@ -72,6 +76,24 @@ prepare() {
sed -r -i build/release.mk \
-e 's/\$\(DIST_PATH\)\/config\/config.json/\$\(DIST_PATH\)\/config\/default.json/'
+ # The Go programming language only supports 8 instruction sets, therefore
+ # we cannot rely on ${CARCH} and need to cast manually.
+ # src.: https://golang.org/doc/install/source#introduction
+ case "${CARCH}" in
+ i686)
+ sed -r -i build/release.mk \
+ -e "5,6s/amd64/386/"
+ ;;
+ arm*64*)
+ sed -r -i build/release.mk \
+ -e "5,6s/amd64/arm64/"
+ ;;
+ arm*)
+ sed -r -i build/release.mk \
+ -e "5,6s/amd64/arm/"
+ ;;
+ esac
+
# Remove platform specific lines from the Makefile from the line beginning
# with that statement to the end of file (we do not care of the additional
# file copy, nor the tar compression defined below the file).