ctucx.git: alpine-pkgs

My personal alpine-packages [deprecated in favor of nixos]

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 
49 
50 
# Contributor: Leah (ctucx) <leah@ctu.cx>
# Maintainer: Leah (ctucx) <leah@ctu.cx>
pkgname=pleroma
pkgver=2.4.0
pkgrel=1
pkgdesc="Pleroma ActivityPub Server"
url="https://pleroma.social/"
arch="all"
license="MIT"
depends="postgresql postgresql-contrib openssl exiftool imagemagick"
makedepends="git build-base file-dev postgresql elixir erlang cmake"
install="$pkgname.pre-install $pkgname.post-deinstall"
subpackages="${pkgname}-openrc"
giturl="https://git.pleroma.social/pleroma/pleroma"
source="0001-PATCH-Separate-webfinger-domain-from-host-domain.patch
	initd.patch
	pleroma.sample.exs"
builddir="${srcdir}/${pkgname}-${pkgver}"

prepare() {
	mkdir ${builddir};
	git clone --depth 1 --branch "v${pkgver}" "${giturl}" "${builddir}";
	cd ${builddir};
	git am < ../0001-PATCH-Separate-webfinger-domain-from-host-domain.patch;
}

build() {
	cd ${builddir};
	mix local.hex --force;
	mix local.rebar --force;
	mix deps.get;
	echo 'import Mix.Config' > config/prod.secret.exs;
	MIX_ENV=prod mix release --path ./output;
	patch output/installation/init.d/pleroma ${srcdir}/initd.patch
}

check() {
	:
}

package() {
	install -Dm755 "${srcdir}/pleroma.sample.exs" "${pkgdir}/etc/pleroma/config.sample.exs";
	install -Dm755 "${builddir}/output/installation/init.d/pleroma" "${pkgdir}/etc/init.d/pleroma"
	cd ${builddir}/output;
	find . -type f -exec install -Dm 755 "{}" "${pkgdir}/usr/lib/pleroma/{}" \;
}

sha512sums="2b45cbf7f6ec23e2d0811113a13b2573b95aff8588036b974fece07752279a61720961f64114a2bf3335011083298e28a5fbc95bf91e76c27b923b011c4e0e69  0001-PATCH-Separate-webfinger-domain-from-host-domain.patch
d5e4fdbdcc5ec7c16db901618e1cb97efaf7b7a5e2a3969bd89c7ebe3a5c251fe2dd6ecdc9d75de0d417c73b11dac00355ffde7733b777cef62fb0aade6cc49e  initd.patch
776d1e1d929243aa0b3de2f2e149eb27e0c6fff2c891aac7aac98d4f3eaa1188e28deb5b71cccba0cc8d02dfc606cdf4bcd8783855838700753bfe6b8109bf23  pleroma.sample.exs"