Skip to content

Commit 5fd3800

Browse files
committed
New package: forgejo-cli-0.4.1
1 parent 79161ba commit 5fd3800

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

srcpkgs/forgejo-cli/template

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

0 commit comments

Comments
 (0)