diff options
author | Kimiblock Moe | 2024-03-22 22:40:15 +0800 |
---|---|---|
committer | Kimiblock Moe | 2024-03-22 22:40:15 +0800 |
commit | 7463f607f6ee2d165a25b46171f5c5dd556cabe2 (patch) | |
tree | fcc9ba945a6fadc3eb993faa5573647602378afa | |
download | aur-7463f607f6ee2d165a25b46171f5c5dd556cabe2.tar.gz |
Initial Commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c6165dc7d3b0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = matrix-media-repo-git + pkgdesc = Highly configurable multi-domain media repository for Matrix. + pkgver = 1.3.4.r13.g2f8a209b + 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 + sha256sums = SKIP + +pkgname = matrix-media-repo-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ca6c4d0019ae --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +pkgname=matrix-media-repo-git +pkgver=1.3.4.r13.g2f8a209b +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") +sha256sums=('SKIP') + +function pkgver() { + cd "${srcdir}/matrix-media-repo" + git describe --long --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)" \ + -v ./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)" \ + -v \ + ./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" +} |