remove ia64 keywords
[gentoo-zh.git] / net-misc / alist / alist-3.32.0.ebuild
blobe0bfb81c6ba00a567652a60313496a30febb1f99
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
7 GIT_COMMIT="ae69847"
9 DESCRIPTION="A file list/WebDAV program that supports multiple storages"
10 HOMEPAGE="https://alist.nn.ci"
11 SRC_URI="
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
17 LICENSE="AGPL-3"
18 SLOT="0"
19 KEYWORDS="~amd64"
21 QA_PRESTRIPPED="/usr/bin/${PN}"
23 src_prepare() {
24 rm -rf public/dist || die
25 mv "${WORKDIR}/dist" public || die
26 default
29 src_compile() {
30 local ldflags="\
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}' \
37 -w -s"
38 ego build -o ${PN} -trimpath -ldflags "${ldflags}"
41 src_install() {
42 dobin ${PN}
43 systemd_dounit "${FILESDIR}/alist.service"