1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit go-module systemd
9 DESCRIPTION
="A file list/WebDAV program that supports multiple storages"
10 HOMEPAGE
="https://alist.nn.ci"
12 https://github.com/alist-org/alist/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
13 https://github.com/alist-org/alist-web/releases/download/${PV}/dist.tar.gz -> ${P}-dist.tar.gz
14 https://github.com/liangyongxiang/gentoo-go-deps/releases/download/${P}/${P}-deps.tar.xz
21 QA_PRESTRIPPED
="/usr/bin/${PN}"
24 rm -rf public
/dist || die
25 mv "${WORKDIR}/dist" public || die
31 -X 'github.com/alist-org/alist/v3/internal/conf.BuiltAt=$(date +'%F %T %z')' \
32 -X 'github.com/alist-org/alist/v3/internal/conf.GoVersion=$(go version | cut -d ' ' -f 3)' \
33 -X 'github.com/alist-org/alist/v3/internal/conf.GitAuthor=\"Xhofe <i@nn.ci>\"' \
34 -X 'github.com/alist-org/alist/v3/internal/conf.GitCommit=${GIT_COMMIT}' \
35 -X 'github.com/alist-org/alist/v3/internal/conf.Version=${PV}' \
36 -X 'github.com/alist-org/alist/v3/internal/conf.WebVersion=${PV}' \
38 ego build
-o ${PN} -trimpath -ldflags "${ldflags}"
43 systemd_dounit
"${FILESDIR}/alist.service"