2021-05-21 04:27:12 +00:00
|
|
|
# Maintainer: ny-a <nyaarch64 at gmail dot com>
|
|
|
|
# Contributor: Daniel Moch <daniel@danielmoch.com>
|
2019-10-12 10:31:58 +00:00
|
|
|
# Contributor: Jean Lucas <jean@4ray.co>
|
2019-04-13 02:45:33 +00:00
|
|
|
# Contributor: Fredrick Brennan <copypaste@kittens.ph>
|
2017-04-07 09:36:31 +00:00
|
|
|
|
|
|
|
pkgname=mastodon
|
2022-03-28 01:12:22 +00:00
|
|
|
pkgver=3.4.6
|
2020-05-13 02:23:11 +00:00
|
|
|
pkgrel=1
|
2019-04-13 02:45:33 +00:00
|
|
|
pkgdesc='Self-hosted social media and network server based on ActivityPub and OStatus'
|
2018-11-27 04:55:32 +00:00
|
|
|
arch=(x86_64)
|
2020-04-04 13:50:32 +00:00
|
|
|
url=https://github.com/tootsuite/mastodon
|
2018-08-07 03:22:32 +00:00
|
|
|
license=(AGPL3)
|
2018-06-27 01:07:24 +00:00
|
|
|
depends=(ffmpeg
|
|
|
|
imagemagick
|
2018-11-27 04:55:32 +00:00
|
|
|
libidn
|
2018-06-27 01:07:24 +00:00
|
|
|
libpqxx
|
|
|
|
libxml2
|
|
|
|
libxslt
|
2019-04-13 02:45:33 +00:00
|
|
|
libyaml
|
2020-05-13 02:23:11 +00:00
|
|
|
nodejs
|
2018-06-27 01:07:24 +00:00
|
|
|
postgresql
|
|
|
|
redis
|
|
|
|
ruby-bundler
|
2018-08-29 20:54:52 +00:00
|
|
|
protobuf
|
2019-10-12 10:31:58 +00:00
|
|
|
yarn
|
2020-04-04 13:43:49 +00:00
|
|
|
zlib)
|
2020-04-04 13:48:15 +00:00
|
|
|
makedepends=(git)
|
2019-04-13 02:45:33 +00:00
|
|
|
backup=(etc/mastodon.conf)
|
2017-04-11 13:51:26 +00:00
|
|
|
install=mastodon.install
|
2018-08-07 03:22:32 +00:00
|
|
|
source=(https://github.com/tootsuite/mastodon/archive/v$pkgver.tar.gz
|
2019-04-13 02:45:33 +00:00
|
|
|
mastodon.target
|
|
|
|
mastodon.sysusers.d
|
|
|
|
mastodon.tmpfiles.d)
|
2022-03-28 01:12:22 +00:00
|
|
|
sha512sums=('83b79e5fddf3190b921aa942c22ba15bdb740c6bb318e468a87b59f6656a215f218c6e68f8a20e02604399925ad016e18be79944c90748d578309dccae9926d7'
|
2019-04-13 02:45:33 +00:00
|
|
|
'c9820c2a83d08bd5d842a78e924682db97ebd5c7291b682603ad30dafcdcc5816c13e717ad39554f042b9d9ed71ab902ce3f604952264a900a72612ee8060acb'
|
|
|
|
'4ee4210bde391e6dc782cb7c14f2cb968c95ad541aa0efcf843a811f8cc5f0d1067ee3c8346bb412aa9fd1dd5a8bd05a4524df7dc4a106957009853dd237074a'
|
|
|
|
'73493680845e690d0cfd769fbbe68978c0a615602375078aea945ca1f1011404eb4b64972aec7a6e5efa720fb425d91b3f30025391c38ccf77e070ccb391e710')
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd mastodon-$pkgver
|
|
|
|
|
|
|
|
# Allow use of any bundler
|
|
|
|
sed -i -e '/BUNDLED/,+1d' Gemfile.lock
|
|
|
|
}
|
2018-06-19 19:29:37 +00:00
|
|
|
|
|
|
|
build() {
|
2018-06-27 17:36:43 +00:00
|
|
|
cd mastodon-$pkgver
|
2020-04-04 13:43:49 +00:00
|
|
|
bundle config set deployment 'true'
|
|
|
|
bundle config set without 'development test'
|
2020-05-13 02:23:11 +00:00
|
|
|
bundle install -j$(getconf _NPROCESSORS_ONLN)
|
2018-06-19 19:29:37 +00:00
|
|
|
yarn install --pure-lockfile
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2019-04-13 02:45:33 +00:00
|
|
|
install -d "$pkgdir"/{var/lib,etc}
|
2018-08-07 03:22:32 +00:00
|
|
|
cp -a mastodon-$pkgver "$pkgdir"/var/lib/mastodon
|
2019-04-13 02:45:33 +00:00
|
|
|
|
|
|
|
# Put the config file in /etc and link to it
|
|
|
|
touch "$pkgdir"/etc/mastodon.conf
|
|
|
|
ln -s /etc/mastodon.conf "$pkgdir"/var/lib/mastodon/.env.production
|
2019-10-12 11:26:54 +00:00
|
|
|
ln -s /usr/bin/node "$pkgdir"/var/lib/mastodon/node
|
2020-04-04 13:43:49 +00:00
|
|
|
|
2019-04-13 02:45:33 +00:00
|
|
|
install -Dm 644 mastodon.target -t "$pkgdir"/usr/lib/systemd/system
|
|
|
|
install -Dm 644 mastodon.sysusers.d "$pkgdir"/usr/lib/sysusers.d/mastodon.conf
|
|
|
|
install -Dm 644 mastodon.tmpfiles.d "$pkgdir"/usr/lib/tmpfiles.d/mastodon.conf
|
|
|
|
|
|
|
|
cd mastodon-$pkgver/dist
|
|
|
|
|
|
|
|
# Fix path discrepancies
|
|
|
|
for f in mastodon-*.service; do
|
|
|
|
sed -e '0,/home/s/home/var\/lib/' \
|
|
|
|
-e 's/\/live//' \
|
|
|
|
-e 's/=\/usr\/bin/=\/var\/lib\/mastodon/' \
|
|
|
|
-e 's/home\/mastodon\/.rbenv\/shims/usr\/bin/' \
|
|
|
|
-i $f
|
|
|
|
done
|
|
|
|
|
|
|
|
install -Dm 644 mastodon-*.service -t "$pkgdir"/usr/lib/systemd/system
|
2018-06-19 19:29:37 +00:00
|
|
|
}
|