summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlex Henrie2023-12-06 18:49:35 -0700
committerAlex Henrie2023-12-06 18:49:35 -0700
commitb66588f7da303ffbbcd84949923a80465860f3c2 (patch)
tree90e73e82997f6e0de1bb25da72f003822c3fb04d /PKGBUILD
downloadaur-sbom-tool-git.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d7a199259b86
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Alex Henrie <alexhenrie24@gmail.com>
+pkgname=sbom-tool-git
+pkgver=2.2.1.r0.848944d
+pkgrel=1
+pkgdesc='Tool to create SPDX 2.2 compatible SBOMs'
+arch=('x86_64')
+url='https://github.com/microsoft/sbom-tool'
+license=('MIT')
+makedepends=('dotnet-sdk')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+options=('!strip')
+source=('git+https://github.com/microsoft/sbom-tool.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/^v//')"
+}
+
+build() {
+ cd "${pkgname%-git}"
+ dotnet publish \
+ --runtime linux-x64 \
+ --self-contained true \
+ -p:DebugType=None \
+ -p:DebugSymbols=false \
+ -p:PublishSingleFile=true \
+ -p:IncludeAllContentForSelfExtract=true \
+ --framework net8.0 \
+ src/Microsoft.Sbom.Tool
+}
+
+package() {
+ cd "${pkgname%-git}"
+ install \
+ -Dm755 \
+ src/Microsoft.Sbom.Tool/bin/Release/net8.0/linux-x64/publish/Microsoft.Sbom.Tool \
+ "$pkgdir/usr/bin/sbom-tool"
+}