net-misc/alist: add 3.39.4, drop 3.39.1
[gentoo-zh.git] / net-misc / alist / alist-3.39.4.ebuild
blobee616aec806fc316f530c80cb501d2d1c8ebd255
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="0ba754fd406041d9a7e1bf3ce0e9949914239a49"
9 ALIST_WEBVER="3.39.2"
10 DESCRIPTION="A file list/WebDAV program that supports multiple storages"
11 HOMEPAGE="https://alist.nn.ci"
12 SRC_URI="
13 https://github.com/alist-org/alist/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
14 https://github.com/alist-org/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"