Skip to content

Commit 5133a4a

Browse files
committed
New package: forgejo-cli-0.4.1
1 parent 79161ba commit 5133a4a

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

srcpkgs/forgejo-cli/template

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Template file for 'forgejo-cli'
2+
pkgname=forgejo-cli
3+
version=0.4.1
4+
revision=1
5+
build_style=cargo
6+
build_helper="rust qemu"
7+
hostmakedepends="pkg-config cmake"
8+
makedepends="libgit2-1.9-devel libssh2-devel openssl-devel zlib-devel"
9+
short_desc="CLI application for interacting with Forgejo"
10+
maintainer="rayfadh <rayfadh@duck.com>"
11+
license="Apache-2.0 OR MIT"
12+
homepage="https://codeberg.org/forgejo-contrib/forgejo-cli"
13+
distfiles="https://codeberg.org/forgejo-contrib/forgejo-cli/archive/v${version}.tar.gz"
14+
checksum=8f6a93c5f97e45308aead0154d4ec53e672ca90ab0809db543cde6be8078729e
15+
16+
_setup_env() {
17+
# workaround the cc-rs mixing CFLAGS for host and target.
18+
# https://github.com/rust-lang/cc-rs/issues/1469
19+
export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}" \
20+
CXXFLAGS_${RUST_BUILD//-/_}="${CXXFLAGS_host}" \
21+
LDFLAGS_${RUST_BUILD//-/_}="${LDFLAGS_host}" \
22+
CFLAGS_${RUST_TARGET//-/_}="${CFLAGS}" \
23+
CXXFLAGS_${RUST_TARGET//-/_}="${CXXFLAGS}" \
24+
LDFLAGS_${RUST_TARGET//-/_}="${LDFLAGS}" \
25+
CFLAGS="" CXXFLAGS="" LDFLAGS=""
26+
}
27+
28+
pre_build() {
29+
_setup_env
30+
}
31+
32+
pre_install() {
33+
_setup_env
34+
}
35+
36+
post_install() {
37+
vlicense LICENSE-APACHE
38+
vlicense LICENSE-MIT
39+
40+
for shell in bash fish zsh; do
41+
vtargetrun ${DESTDIR}/usr/bin/fj completion ${shell} > forgejo-cli.${shell}
42+
vcompletion forgejo-cli.${shell} ${shell} fj
43+
done
44+
}

0 commit comments

Comments
 (0)