1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit go-module systemd
8 GIT_COMMIT
="0a46979c519885465e586da009b70422382c84ac"
10 DESCRIPTION
="A file list/WebDAV program that supports multiple storages"
11 HOMEPAGE
="https://alist.nn.ci"
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
27 QA_PRESTRIPPED
="/usr/bin/${PN}"
30 rm -rf public
/dist || die
31 mv "${WORKDIR}/dist" public || die
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}' \
44 ego build
-o ${PN} -trimpath -ldflags "${ldflags}"
49 systemd_dounit
"${FILESDIR}/alist.service"