2023-09-20 16:16:22 +00:00
|
|
|
# Maintainer: Anthony Wang <a at exozy dot me>
|
2022-04-28 21:20:28 +00:00
|
|
|
# Contributor: ny-a <nyaarch64 at gmail dot com>
|
2021-05-21 04:27:12 +00:00
|
|
|
# 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
|
2024-08-21 18:24:36 +00:00
|
|
|
pkgver=4.2.12
|
2024-01-24 18:41:48 +00:00
|
|
|
pkgrel=1
|
2022-04-28 21:20:28 +00:00
|
|
|
pkgdesc='Your self-hosted, globally interconnected microblogging community'
|
2022-11-12 01:16:57 +00:00
|
|
|
arch=(any)
|
2022-04-28 21:20:28 +00:00
|
|
|
url=https://github.com/mastodon/mastodon
|
2018-08-07 03:22:32 +00:00
|
|
|
license=(AGPL3)
|
2018-06-27 01:07:24 +00:00
|
|
|
depends=(ffmpeg
|
2023-07-09 16:54:42 +00:00
|
|
|
git
|
2018-06-27 01:07:24 +00:00
|
|
|
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
|
2023-07-09 16:54:42 +00:00
|
|
|
protobuf
|
2018-06-27 01:07:24 +00:00
|
|
|
ruby-bundler
|
2023-07-09 16:54:42 +00:00
|
|
|
sudo
|
2024-08-21 18:24:36 +00:00
|
|
|
valkey
|
2019-10-12 10:31:58 +00:00
|
|
|
yarn
|
2020-04-04 13:43:49 +00:00
|
|
|
zlib)
|
2019-04-13 02:45:33 +00:00
|
|
|
backup=(etc/mastodon.conf)
|
2017-04-11 13:51:26 +00:00
|
|
|
install=mastodon.install
|
2022-04-28 21:20:28 +00:00
|
|
|
options=(!strip)
|
|
|
|
source=(https://github.com/mastodon/mastodon/archive/v$pkgver.tar.gz
|
2019-04-13 02:45:33 +00:00
|
|
|
mastodon.target
|
|
|
|
mastodon.sysusers.d
|
|
|
|
mastodon.tmpfiles.d)
|
2024-08-21 18:24:36 +00:00
|
|
|
sha512sums=('511ce2df1860150c7544581628937cc91a1441de58656c8064702ccffc59197406b0c5df083ffa7e836c4e4354d0183778c1caa0561e0ab4a43ebb4c4afe765f'
|
|
|
|
'ce9fe810654f3a641bbc1ea9707fa1b149e3955bfc55da20ed27e58f9c768dd65534fa43c9d67042fff40c48ef33c660efac8ef11c60f1111173326e2a93814c'
|
2019-04-13 02:45:33 +00:00
|
|
|
'4ee4210bde391e6dc782cb7c14f2cb968c95ad541aa0efcf843a811f8cc5f0d1067ee3c8346bb412aa9fd1dd5a8bd05a4524df7dc4a106957009853dd237074a'
|
2022-04-28 21:20:28 +00:00
|
|
|
'27c4eb01d462c525b59e5808a3b2501b63a34425752128388fbde82f7eb5944b20d2f8d8b1be8ed8adb165cab4cfb8e13f90215f20989ca671a0422ffa37001f')
|
2019-04-13 02:45:33 +00:00
|
|
|
|
2018-06-19 19:29:37 +00:00
|
|
|
build() {
|
2018-06-27 17:36:43 +00:00
|
|
|
cd mastodon-$pkgver
|
2023-12-04 19:44:17 +00:00
|
|
|
sed -i '/husky install/d' package.json # Stop husky from hijacking git hooks
|
2024-08-21 18:24:36 +00:00
|
|
|
bundle config set deployment true
|
2023-09-21 16:58:43 +00:00
|
|
|
bundle config without 'development test'
|
2024-05-03 19:10:57 +00:00
|
|
|
bundle config with 'pam_authentication'
|
2024-08-21 18:24:36 +00:00
|
|
|
bundle config set frozen false
|
|
|
|
bundle add erb
|
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
|
2024-08-21 18:24:36 +00:00
|
|
|
# https://aur.archlinux.org/packages/mastodon?O=0#comment-986425
|
|
|
|
cd vendor/bundle/ruby/*/gems/ox-*/ext/ox
|
|
|
|
make
|
|
|
|
cp ox.so ../../lib
|
2018-06-19 19:29:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2022-04-28 21:20:28 +00:00
|
|
|
sed -e 's/home\/mastodon\/live/var\/lib\/mastodon/g' \
|
|
|
|
-e 's/home\/mastodon\/.rbenv\/shims/usr\/bin/' \
|
|
|
|
-i mastodon-*.service
|
2022-08-25 23:15:16 +00:00
|
|
|
sed -e 's/home\/mastodon\/live/var\/lib\/mastodon/g' \
|
2022-08-27 13:38:18 +00:00
|
|
|
-i nginx.conf
|
2019-04-13 02:45:33 +00:00
|
|
|
|
|
|
|
install -Dm 644 mastodon-*.service -t "$pkgdir"/usr/lib/systemd/system
|
2018-06-19 19:29:37 +00:00
|
|
|
}
|