blob: 91b3f2522e137adc2a4117ac65bd65e7c7961d98 (
plain)
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
|
# Maintainer: John Regan <john@jrjrtech.com>
pkgbase=lightningcss
pkgname=('lightningcss-cli') # future plans are to build nodejs modules etc
pkgver=1.29.3
pkgrel=1
pkgdesc='An extremely fast CSS parser, transformer, bundler, and minifier written in Rust.'
url='https://lightningcss.dev/'
arch=('i686' 'x86_64')
license=('MPL-2.0')
makedepends=('cargo')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/parcel-bundler/lightningcss/archive/v$pkgver.tar.gz")
sha256sums=('ed549ab8d8e53416238e0ff745f9b881f39fbcd07bd70c6d18d35828287c559c')
prepare() {
cd "$pkgbase-$pkgver"
cargo fetch --verbose --verbose --locked # --target "$(rustc -vV | sed -n 's/host: //p')"
# removing platform filtering - during build cargo tries to download
# platform-specific dependencies and throws an error, see:
# https://github.com/rust-lang/cargo/issues/12543
}
build() {
cd "$pkgbase-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=$(pwd)/target
cargo build --features "cli" --release --frozen
}
check() {
cd "$pkgbase-$pkgver"
cargo test --features "cli" --frozen
}
package_lightningcss-cli() {
pkgdesc='An extremely fast CSS parser, transformer, bundler, and minifier written in Rust - CLI'
depends=('gcc-libs')
cd "$pkgbase-$pkgver"
install -Dm 755 "target/release/$pkgbase" -t "$pkgdir/usr/bin"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
|