File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 runs-on : ubuntu-latest
1414 steps :
1515 - uses : actions/checkout@v4
16+ with :
17+ path : optioncli
18+ - uses : actions/checkout@v4
19+ with :
20+ repository : fireflylabss/optionSDK
21+ path : optionSDK
22+ ref : v0.1.6
1623 - uses : dtolnay/rust-toolchain@stable
1724 with :
1825 components : rustfmt
1926 - run : cargo fmt --all --check
27+ working-directory : optioncli
2028 - run : cargo test --all-targets
29+ working-directory : optioncli
2130 - run : cargo build --release
31+ working-directory : optioncli
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ pkgbase = opt
1010 depends = glibc
1111 options = !lto
1212 source = optioncli-0.1.4.tar.gz::https://github.com/fireflylabss/optioncli/archive/refs/tags/v0.1.4.tar.gz
13+ source = optionSDK-0.1.6.tar.gz::https://github.com/fireflylabss/optionSDK/archive/refs/tags/v0.1.6.tar.gz
1314 sha256sums = 11434c3345a7df0e5aab3c4a4d3d8db24fcf9925302edaab02a27ff57963ee8c
15+ sha256sums = 0b1ca7a784519f1a61656fd154eb731b27b245d41bac5de5e6dd51539dd4bdc7
1416
1517pkgname = opt
Original file line number Diff line number Diff line change 22pkgname=opt
33pkgver=0.1.4
44pkgrel=1
5+ _sdkver=0.1.6
56pkgdesc=' Option family CLI: dispatch, doctor, install and system utilities'
67arch=(' x86_64' )
78url=' https://github.com/fireflylabss/optioncli'
89license=(' Apache-2.0' )
910depends=(' gcc-libs' ' glibc' )
1011makedepends=(' cargo' )
1112options=(' !lto' )
12- source=(" optioncli-$pkgver .tar.gz::$url /archive/refs/tags/v$pkgver .tar.gz" )
13- sha256sums=(' 11434c3345a7df0e5aab3c4a4d3d8db24fcf9925302edaab02a27ff57963ee8c' )
13+ source=(" optioncli-$pkgver .tar.gz::$url /archive/refs/tags/v$pkgver .tar.gz"
14+ " optionSDK-$_sdkver .tar.gz::https://github.com/fireflylabss/optionSDK/archive/refs/tags/v$_sdkver .tar.gz" )
15+ sha256sums=(' 11434c3345a7df0e5aab3c4a4d3d8db24fcf9925302edaab02a27ff57963ee8c'
16+ ' 0b1ca7a784519f1a61656fd154eb731b27b245d41bac5de5e6dd51539dd4bdc7' )
1417
1518prepare () {
19+ # Cargo.toml depends on optionSDK via path "../optionSDK".
20+ ln -sfn " optionSDK-$_sdkver " optionSDK
1621 cd " optioncli-$pkgver "
1722 cargo fetch --locked --target " $( rustc -vV | sed -n ' s/host: //p' ) "
1823}
Original file line number Diff line number Diff line change 1616
1717echo " ==> hashing tarball"
1818SHA=" $( curl -fsSL " $TARBALL_URL " | sha256sum | awk ' {print $1}' ) "
19+
20+ SDK_VER=" $( sed -n ' s/^_sdkver=//p' " $PKGBUILD " ) "
21+ SDK_URL=" https://github.com/fireflylabss/optionSDK/archive/refs/tags/v${SDK_VER} .tar.gz"
22+ echo " ==> hashing optionSDK ${SDK_VER} tarball"
23+ SDK_SHA=" $( curl -fsSL " $SDK_URL " | sha256sum | awk ' {print $1}' ) "
24+
1925sed -i " s/^pkgver=.*/pkgver=${VER} /" " $PKGBUILD "
2026sed -i " s/^pkgrel=.*/pkgrel=1/" " $PKGBUILD "
21- sed -i " s/^sha256sums=.*/sha256sums=('${SHA} ')/" " $PKGBUILD "
27+ sed -i " s/^sha256sums=('[0-9a-f]*'/sha256sums=('${SHA} '/" " $PKGBUILD "
28+ sed -i " /^sha256sums=/{n;s/'[0-9a-f]*'/'${SDK_SHA} '/}" " $PKGBUILD "
2229
2330cat > " $SRCINFO " << EOF
2431pkgbase = opt
@@ -33,7 +40,9 @@ pkgbase = opt
3340 depends = glibc
3441 options = !lto
3542 source = optioncli-${VER} .tar.gz::https://github.com/fireflylabss/optioncli/archive/refs/tags/v${VER} .tar.gz
43+ source = optionSDK-${SDK_VER} .tar.gz::${SDK_URL}
3644 sha256sums = ${SHA}
45+ sha256sums = ${SDK_SHA}
3746
3847pkgname = opt
3948EOF
You can’t perform that action at this time.
0 commit comments