forked from msys2/MSYS2-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPKGBUILD
More file actions
46 lines (39 loc) · 1.39 KB
/
Copy pathPKGBUILD
File metadata and controls
46 lines (39 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>
# Contributor: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
_realname=coreutils
pkgname="uutils-${_realname}"
pkgver=0.8.0
pkgrel=2
pkgdesc="Cross-platform Rust rewrite of the GNU coreutils"
arch=('any')
url='https://github.com/uutils/coreutils'
msys2_repository_url='https://github.com/uutils/coreutils'
msys2_references=(
'archlinux: uutils-coreutils'
'purl: pkg:cargo/coreutils'
)
license=('spdx:MIT')
depends=("gcc-libs" "oniguruma")
makedepends=("git" "rust" "pkgconf")
source=("https://github.com/uutils/coreutils/archive/${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('03f765fd23e9cc66f8789edc6928644d8eae5e5a7962d83795739d0a8a85eaef')
prepare() {
cd "${_realname}-${pkgver}"
cargo update -p nix --precise 0.31.3 # done at upstream
cargo fetch --locked --target "${RUST_CHOST}"
}
# spliting build() sometimes cause building twice at make build
package() {
cd "${_realname}-${pkgver}"
export RUSTONIG_DYNAMIC_LIBONIG=1
# this fixed build failure on the CI, but not reliable
# export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-Wl,--dynamicbase -C link-arg=-Wl,--enable-auto-image-base"
make install \
DESTDIR="${pkgdir}" \
PREFIX="/usr" \
PROFILE=release \
LIBSTDBUF_DIR="/usr/lib/${pkgname}" \
PROG_PREFIX="uu-" \
MULTICALL=y
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}