summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKimiblock Moe2024-03-22 22:47:58 +0800
committerKimiblock Moe2024-03-22 22:47:58 +0800
commite119ca7e0e9d75729272eacad9d9a59678bb0569 (patch)
tree6484f0bb411665aefdd425b77c89d27c6de5e39d
downloadaur-e119ca7e0e9d75729272eacad9d9a59678bb0569.tar.gz
Initial Commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD51
2 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b03dbfea36fa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = matrix-media-repo
+ pkgdesc = Highly configurable multi-domain media repository for Matrix.
+ pkgver = 1.3.4
+ pkgrel = 1
+ url = https://github.com/t2bot/matrix-media-repo
+ arch = any
+ license = MIT
+ makedepends = go
+ makedepends = git
+ depends = glibc
+ depends = libheif
+ depends = libde265
+ provides = matrix-media-repo
+ source = git+https://github.com/t2bot/matrix-media-repo.git#tag=4fc0d96c8311f5c9d7af54303c0acdf223b4be1e
+ sha256sums = SKIP
+
+pkgname = matrix-media-repo
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e36a5edace3d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+pkgname=matrix-media-repo
+pkgver=1.3.4
+_tag=4fc0d96c8311f5c9d7af54303c0acdf223b4be1e
+pkgrel=1
+pkgdesc="Highly configurable multi-domain media repository for Matrix."
+arch=("any")
+url="https://github.com/t2bot/matrix-media-repo"
+license=("MIT")
+depends=("glibc" "libheif" "libde265")
+makedepends=("go" "git")
+backup=()
+provides=("matrix-media-repo")
+source=("git+https://github.com/t2bot/matrix-media-repo.git#tag=${_tag}")
+sha256sums=('SKIP')
+
+function pkgver() {
+ cd "${srcdir}/matrix-media-repo"
+ git describe --tags --abbrev=8 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+function prepare() {
+ cd "${srcdir}/matrix-media-repo"
+}
+
+function build() {
+ cd "${srcdir}/matrix-media-repo"
+ GOBIN=$PWD/bin go install -v ./cmd/utilities/compile_assets
+ $PWD/bin/compile_assets
+ GOBIN=$PWD/bin go \
+ install \
+ -ldflags \
+ "-X github.com/t2bot/matrix-media-repo/common/version.Version=$(git describe --tags)" \
+ ./cmd/...
+ GOBIN=$PWD/bin go \
+ install \
+ -pgo=pgo_media_repo.pprof \
+ -ldflags \
+ "-X github.com/t2bot/matrix-media-repo/common/version.Version=$(git describe --tags)" \
+ ./cmd/workers/media_repo
+}
+
+function check() {
+ cd "${srcdir}/matrix-media-repo"
+ go test ./...
+}
+
+function package() {
+ mkdir -p "${pkgdir}/usr/bin"
+ cp "${srcdir}/matrix-media-repo/bin"/* "${pkgdir}/usr/bin"
+ chmod 755 -R "${pkgdir}/usr/bin"
+}