app-shells/zfe: add nvchecker
[gentoo-zh.git] / net-misc / alist / alist-3.41.0.ebuild
blobfc4ecfa41bb54eb3fd3117be894760cae41460f8
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit go-module systemd
8 GIT_COMMIT="94915b2"
9 ALIST_WEBVER="3.41.0"
10 DESCRIPTION="A file list/WebDAV program that supports multiple storages"
11 HOMEPAGE="https://alist.nn.ci"
12 SRC_URI="
13 https://github.com/AlistGo/alist/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
14 https://github.com/AlistGo/alist-web/releases/download/${ALIST_WEBVER}/dist.tar.gz -> ${P}-dist.tar.gz
15 https://github.com/Linerre/gentoo-deps/releases/download/${P}/${P}-vendor.tar.xz
18 LICENSE="AGPL-3"
19 SLOT="0"
20 KEYWORDS="~amd64"
22 RDEPEND="
23 acct-group/alist
24 acct-user/alist
27 QA_PRESTRIPPED="/usr/bin/${PN}"
29 src_prepare() {
30 rm -rf public/dist || die
31 mv "${WORKDIR}/dist" public || die
32 default
35 src_compile() {
36 local ldflags="\
37 -X 'github.com/alist-org/alist/v3/internal/conf.BuiltAt=$(date +'%F %T %z')' \
38 -X 'github.com/alist-org/alist/v3/internal/conf.GoVersion=$(go version | cut -d ' ' -f 3)' \
39 -X 'github.com/alist-org/alist/v3/internal/conf.GitAuthor=\"Xhofe <i@nn.ci>\"' \
40 -X 'github.com/alist-org/alist/v3/internal/conf.GitCommit=${GIT_COMMIT}' \
41 -X 'github.com/alist-org/alist/v3/internal/conf.Version=${PV}' \
42 -X 'github.com/alist-org/alist/v3/internal/conf.WebVersion=${PV}' \
43 -w -s"
44 ego build -o ${PN} -trimpath -ldflags "${ldflags}"
47 src_install() {
48 dobin ${PN}
49 systemd_dounit "${FILESDIR}/alist.service"