diff options
author | William Gathoye | 2017-03-13 22:51:46 +0100 |
---|---|---|
committer | William Gathoye | 2017-03-13 22:51:46 +0100 |
commit | 26821cad488c241ce671507f0bb381dca75abc44 (patch) | |
tree | 7dc446026bc8f4b7aecbd127000202a1de1ca68e | |
download | aur-26821cad488c241ce671507f0bb381dca75abc44.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 47 |
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cf532f84d802 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = mattermosti18n-git + pkgdesc = A tool for Mattermost used to convert translations between GNU gettext .po and JSON files + pkgver = r23.7e95378 + pkgrel = 1 + url = https://github.com/rodcorsi/mattermosti18n + arch = x86_64 + arch = i686 + license = MIT + makedepends = go + provides = mattermosti18n + conflicts = mattermosti18n + options = !strip + options = !emptydirs + source = git+https://github.com/rodcorsi/mattermosti18n + sha512sums = SKIP + +pkgname = mattermosti18n-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..82bce839ae05 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: William Gathoye <william plus aur at gathoye dot be> +# Contributor: + +pkgname=mattermosti18n-git +_pkgname="${pkgname%-git}" +pkgver=r23.7e95378 +pkgrel=1 +pkgdesc='A tool for Mattermost used to convert translations between GNU gettext .po and JSON files' +arch=('x86_64' 'i686') + +# Let's remove the .git extension in order to keep a working repository and not +# a bare one. +# http://stackoverflow.com/a/11069413/3514658 +url='https://github.com/rodcorsi/mattermosti18n' +license=('MIT') + +makedepends=('go') +options=('!strip' '!emptydirs') + +provides=('mattermosti18n') +conflicts=('mattermosti18n') + +source=('git+https://github.com/rodcorsi/mattermosti18n') +sha512sums=('SKIP') + +pkgver() { + cd mattermosti18n + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + mkdir -p 'src/github.com/rodcorsi/mattermosti18n' + # go build does not support symlinks. Do not use this. + # ln -s "$_pkgname" "src/github.com/rodcorsi/$_pkgname" + cp -R mattermosti18n/* ./src/github.com/rodcorsi/mattermosti18n +} + +build() { + GOPATH=$(pwd) go install github.com/rodcorsi/mattermosti18n/... +} + +package() { + install -Dm755 bin/i18n2po "$pkgdir/usr/bin/i18n2po" + install -Dm755 bin/po2i18n "$pkgdir/usr/bin/po2i18n" + install -Dm644 src/github.com/rodcorsi/mattermosti18n/LICENSE \ + "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" +} |