summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 90c32649ca0c14fd7b35cd0cdddbea5e2d935add (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer: Jean Lucas <jean@4ray.co>

pkgname=mastodon
pkgver=2.5.0
pkgrel=2
pkgdesc='Free software social-network server based on ActivityPub and OStatus'
arch=(i686 x86_64)
url=https://joinmastodon.org
license=(AGPL3)
depends=(ffmpeg
         imagemagick
         libpqxx
         libxml2
         libxslt
         nodejs-lts-boron
         postgresql
         redis
         ruby-bundler
         protobuf
         yarn)
makedepends=(git npm python2)
conflicts=(mastodon-git)
backup=(etc/mastodon/environment)
install=mastodon.install
source=(https://github.com/tootsuite/mastodon/archive/v$pkgver.tar.gz
        mastodon-web.service
        mastodon-sidekiq.service
        mastodon-streaming.service
        mastodon.target)
sha512sums=('cfdf71808405263ac78960c3863850f4961a773f6a55e9e28fea45812db867ff6b13edffbfd8ecf985b123e9f853d251bb451b0580ededc357637c4abaa0d972'
            '532929aeeda9a0ccf72de0695a3381547cc389344e1e67f05ef1d7ce5c1ad57278b647423bb52d4a87069ad85479452533fbe3786e5e5c4b62730c6ef72ff267'
            '603a7877288c762855a29fd2399d3ff7d218a7f1b7d6378cad7f30048cdbfe2a13f2ed2b5c94cb683bdcaead8cd47243e564a2ae70d7f21fa33f295c5396f4f7'
            '90a0761b7709659bec6f29c366c503fdd348226cbb585cf4f6eaa065854e2027d08ab3b352eb13ad7c0e327d662f13bc00fb4163ea0c583ef55b1795ab2e0b31'
            'c9820c2a83d08bd5d842a78e924682db97ebd5c7291b682603ad30dafcdcc5816c13e717ad39554f042b9d9ed71ab902ce3f604952264a900a72612ee8060acb')

build() {
  cd mastodon-$pkgver
  bundle install --deployment --without development test
  yarn install --pure-lockfile
}

package() {
  install -d "$pkgdir"/{var/lib,etc/mastodon}
  cp -a mastodon-$pkgver "$pkgdir"/var/lib/mastodon
  ln -s /etc/mastodon/environment "$pkgdir"/var/lib/mastodon/.env
  touch "$pkgdir"/etc/mastodon/environment
  install -Dm 644 -t "$pkgdir"/usr/lib/systemd/system mastodon-{web,sidekiq,streaming}.service mastodon.target
}