summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxeruf2021-09-20 15:36:37 +0200
committerxeruf2021-09-20 15:36:38 +0200
commitb0e320b283ee1e245eda81e580e2ca61569d2bf3 (patch)
treee04343423064c1203564dafa2bffb6a8fd99f956
parentfd9f799ddc1ff046f2e3ddfb68d52949cc609096 (diff)
downloadaur-b0e320b283ee1e245eda81e580e2ca61569d2bf3.tar.gz
Create package pleroma-git based on pleroma-bin (WIP)
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD46
-rw-r--r--pleroma.install3
3 files changed, 37 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 995d7314933..6f228616e87 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
-pkgbase = pleroma-bin
+pkgbase = pleroma-git
pkgdesc = A microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub.
- pkgver = 2.4.1
+ pkgver = v2.4.1.r0.g0b2119d4a
pkgrel = 1
- url = https://pleroma.social/
+ url = https://git.pleroma.social/pleroma/pleroma
install = pleroma.install
- arch = x86_64
- arch = aarch64
- arch = armv7h
+ arch = any
license = AGPL
license = CCPL:cc-by-4.0
license = CCPL:cc-by-sa-4.0
+ makedepends = elixir
depends = ncurses
depends = file
optdepends = postgresql: local postgresql database support
@@ -23,15 +22,11 @@ pkgbase = pleroma-bin
source = pleroma.tmpfiles
source = pleroma.service
source = COPYING
+ source = git+https://git.pleroma.social/pleroma/pleroma.git#branch=stable
sha256sums = 4df8a0099dada9bf652fb07677a9c6a66cad1f26498f08a55d8acb0186b78979
sha256sums = b5e844fab22dc4fafdec09c1f14437a06d3a12fae753fc0be968d22eaddfd6dc
sha256sums = 268952ef036ef65ab146a38ff20bbba35759c0f33510fe6ca15d6765285938ed
sha256sums = e299229268576c559d0155baccccf682c97b51bebab40a0b7ff3ab562ec62104
- source_x86_64 = pleroma-x86_64-2.4.1.zip::https://git.pleroma.social/pleroma/pleroma/-/jobs/195594/artifacts/download?file_type=archive
- sha256sums_x86_64 = 9acc05d81115ee60025f9c9c8fe4ab204b7d50c907ccf85b22f8e71884a73d43
- source_aarch64 = pleroma-aarch64-2.4.1.zip::https://git.pleroma.social/pleroma/pleroma/-/jobs/195598/artifacts/download?file_type=archive
- sha256sums_aarch64 = b547cb25631d5e9b3f0f1fb50603cdb4c21c250b331259874f783c3b812fdb30
- source_armv7h = pleroma-armv7h-2.4.1.zip::https://git.pleroma.social/pleroma/pleroma/-/jobs/195596/artifacts/download?file_type=archive
- sha256sums_armv7h = c13c701e70cccf37d91a06f220f3f91219ccdfffce35630651023a8542a8e705
+ sha256sums = SKIP
-pkgname = pleroma-bin
+pkgname = pleroma-git
diff --git a/PKGBUILD b/PKGBUILD
index bb328aab38f..a767003acc6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,51 @@
-# Maintainer: gudzpoz <gudzpoz ant live dot com>
-# Contributor: Faye Jackson <justalittleepsilon ant gmail dot com>
+# Maintainer: xerus <27f at pm dot me>
-pkgname=pleroma-bin
-pkgver=2.4.1
+_pkgname=pleroma
+pkgname=${_pkgname}-git
+pkgver=v2.4.1.r0.g0b2119d4a
pkgrel=1
pkgdesc='A microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub.'
-url='https://pleroma.social/'
+url='https://git.pleroma.social/pleroma/pleroma'
license=('AGPL' 'CCPL:cc-by-4.0' 'CCPL:cc-by-sa-4.0')
-arch=(x86_64 aarch64 armv7h)
+arch=(any)
+makedepends=(elixir)
depends=(ncurses file)
optdepends=('postgresql: local postgresql database support'
'imagemagick: Pleroma.Upload.Filters.Mogrify, Pleroma.Upload.Filters.Mogrifun support'
'ffmpeg: media preview proxy support for videos'
'perl-image-exiftool: supporting stripping location (GPS) data from uploaded images with Pleroma.Upload.Filters.Exiftool')
-provides=(pleroma)
-conflicts=(pleroma)
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
backup=('etc/pleroma/config.exs')
install=pleroma.install
-source_x86_64=("pleroma-x86_64-${pkgver}.zip::https://git.pleroma.social/pleroma/pleroma/-/jobs/195594/artifacts/download?file_type=archive")
-source_aarch64=("pleroma-aarch64-${pkgver}.zip::https://git.pleroma.social/pleroma/pleroma/-/jobs/195598/artifacts/download?file_type=archive")
-source_armv7h=("pleroma-armv7h-${pkgver}.zip::https://git.pleroma.social/pleroma/pleroma/-/jobs/195596/artifacts/download?file_type=archive")
source=('pleroma.sysusers'
'pleroma.tmpfiles'
'pleroma.service'
- 'COPYING')
+ 'COPYING'
+ "git+${url}.git#branch=stable")
sha256sums=('4df8a0099dada9bf652fb07677a9c6a66cad1f26498f08a55d8acb0186b78979'
'b5e844fab22dc4fafdec09c1f14437a06d3a12fae753fc0be968d22eaddfd6dc'
'268952ef036ef65ab146a38ff20bbba35759c0f33510fe6ca15d6765285938ed'
- 'e299229268576c559d0155baccccf682c97b51bebab40a0b7ff3ab562ec62104')
-sha256sums_x86_64=('9acc05d81115ee60025f9c9c8fe4ab204b7d50c907ccf85b22f8e71884a73d43')
-sha256sums_aarch64=('b547cb25631d5e9b3f0f1fb50603cdb4c21c250b331259874f783c3b812fdb30')
-sha256sums_armv7h=('c13c701e70cccf37d91a06f220f3f91219ccdfffce35630651023a8542a8e705')
+ 'e299229268576c559d0155baccccf682c97b51bebab40a0b7ff3ab562ec62104'
+ 'SKIP')
package() {
- cd "$srcdir"
-
mkdir -p "${pkgdir}/opt/pleroma"
- find release -executable -exec chmod a+rx {} \;
- cp -r release/* "${pkgdir}/opt/pleroma"
+
+ cd "$srcdir"
install -Dm 644 pleroma.sysusers "${pkgdir}/usr/lib/sysusers.d/pleroma.conf"
install -Dm 644 pleroma.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/pleroma.conf"
install -Dm 644 pleroma.service "${pkgdir}/usr/lib/systemd/system/pleroma.service"
install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ cd "${_pkgname}"
+ echo "y\ny" | mix deps.get
+ mix pleroma.instance gen
+ psql -f config/setup_db.psql
+ mix ecto.migrate
+}
+
+pkgver() {
+ cd "${_pkgname}"
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
diff --git a/pleroma.install b/pleroma.install
index ffb85d3221a..e607f721210 100644
--- a/pleroma.install
+++ b/pleroma.install
@@ -6,6 +6,9 @@ post_install() {
config_dir="/etc/${username}"
tmp_psql="/tmp/setup_otp_db.psql"
+ chown -R pleroma "$home_dir"
+ chown -R pleroma "$config_dir"
+
instance_gen_params="instance gen\
--output \"${config_dir}/config.exs\"\
--output-psql \"$tmp_psql\"\