diff options
author | taotieren | 2023-08-30 22:28:14 +0800 |
---|---|---|
committer | taotieren | 2023-08-30 22:28:35 +0800 |
commit | 584ebe103b41f79f4d5471b8ead1c6dcda5fd375 (patch) | |
tree | f7785b5174c669278fcd63ea9ef244393fa48c9b /PKGBUILD | |
parent | 67928e94d70376791f3cd221452d711b0d38e69b (diff) | |
download | aur-584ebe103b41f79f4d5471b8ead1c6dcda5fd375.tar.gz |
Update 5.0.0.0.r1.g5f95102-2
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 128 |
1 files changed, 81 insertions, 47 deletions
@@ -1,6 +1,7 @@ # Maintainer: taotieren <admin@taotieren.com> -pkgname=logicanalyzer-git +pkgbase=logicanalyzer-git +pkgname=({logicanalyzer,clcapture}-git) pkgver=5.0.0.0.r1.g5f95102 pkgrel=2 epoch= @@ -8,55 +9,94 @@ pkgdesc="24 channel, 100Msps logic analyzer hardware and software " arch=("x86_64" "aarch64") url="https://github.com/gusmanb/logicanalyzer" license=('GLP-3.0') -provides=(${pkgname%-git} clcapture) -conflicts=(${pkgname%-git} clcapture) replaces=() -depends=(dotnet-runtime - ttf-dejavu) +depends=() makedepends=(git - dotnet-sdk) + dotnet-sdk + ttf-dejavu) backup=() options=('!strip') install= -source=("${pkgname-git}::git+${url}.git") +source=("${pkgbase}::git+${url}.git") sha256sums=('SKIP') noextract=() pkgver(){ - cd "${srcdir}/${pkgname-git}" + cd "${srcdir}/${pkgbase}" git describe --long --tags | sed 's/^V//g;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { - cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer" +# cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer" +# +# if [ "$CARCH" == "aarch64" ]; then +# msg2 "build for arm64" +# dotnet publish -r linux-arm64 -c Release -o artifact +# else +# msg2 "build for x64" +# dotnet publish -r linux-x64 -c Release -o artifact +# fi - if [ "$CARCH" == "aarch64" ]; then +#first step, prepare the structure + mkdir -pv "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers" + mkdir -pv "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/CLCapture" + +if [ "$CARCH" == "aarch64" ]; then msg2 "build for arm64" - dotnet publish -r linux-arm64 -c Release -o artifact - else + + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SerialProtocolAnalyzer" + dotnet publish -r linux-arm64 -c Release -o artifact + cp ./artifact/SerialProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers" + + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/I2CProtocolAnalyzer" + dotnet publish -r linux-arm64 -c Release -o artifact + cp ./artifact/I2CProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers" + + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SPIProtocolAnalyzer" + dotnet publish -r linux-arm64 -c Release -o artifact + cp ./artifact/SPIProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers" + + #third step, compile LogicAnalyzer + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/LogicAnalyzer" + dotnet publish -r linux-arm64 -c Release --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer" + + #fourth step, compile CLCapture + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/CLCapture" + dotnet publish -r linux-arm64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/CLCapture" +else msg2 "build for x64" - dotnet publish -r linux-x64 -c Release -o artifact - fi -} -package() { - cd "${srcdir}/${pkgname-git}/Software/LogicAnalyzer/artifact/" + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SerialProtocolAnalyzer" + dotnet publish -r linux-x64 -c Release -o artifact + cp ./artifact/SerialProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers" -# install -Dm0755 CLCapture "${pkgdir}/usr/share/${pkgname%-git}/CLCapture" -# install -Dm0644 CLCapture.dll "${pkgdir}/usr/share/${pkgname%-git}/CLCapture.dll" -# install -Dm0755 LogicAnalyzer "${pkgdir}/usr/share/${pkgname%-git}/LogicAnalyzer" -# install -Dm0644 LogicAnalyzer.dll "${pkgdir}/usr/share/${pkgname%-git}/LogicAnalyzer.dll" -# install -Dm0644 LogicAnalyzer.runtimeconfig.json "${pkgdir}/usr/share/${pkgname%-git}/LogicAnalyzer.runtimeconfig.json" + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/I2CProtocolAnalyzer" + dotnet publish -r linux-x64 -c Release -o artifact + cp ./artifact/I2CProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers" -# install -dm0755 "${pkgdir}/usr/bin" \ - install -dm0755 ${pkgdir}/usr/share/${pkgname%-git} + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/SPIProtocolAnalyzer" + dotnet publish -r linux-x64 -c Release -o artifact + cp ./artifact/SPIProtocolAnalyzer.dll "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer/analyzers" - install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/clcapture" <<EOF -export COREHOST_TRACE=1 + #third step, compile LogicAnalyzer + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/LogicAnalyzer" + dotnet publish -r linux-x64 -c Release --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/LogicAnalyzer" -cd /usr/share/logicanalyzer/ -LC_ALL=C ./CLCapture -EOF + #fourth step, compile CLCapture + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/CLCapture" + dotnet publish -r linux-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:DebugType=None -p:DebugSymbols=false -o "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/CLCapture" +fi +} + +package_logicanalyzer-git() { + provides=(${pkgname%-git}) + conflicts=(${pkgname%-git}) + + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/" + +# install -Dm0755 LogicAnalyzer/LogicAnalyzer "${pkgdir}/usr/bin/logicanalyzer" + + install -dm0755 ${pkgdir}/usr/share/${pkgname%-git} install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-git}" <<EOF export COREHOST_TRACE=1 @@ -65,12 +105,9 @@ cd /usr/share/logicanalyzer/ LC_ALL=C ./LogicAnalyzer EOF -# ln -sf /usr/share/${pkgname%-git}/LogicAnalyzer "${pkgdir}/usr/bin/${pkgname%-git}" - - cp -rv * ${pkgdir}/usr/share/${pkgname%-git} + cp -rv LogicAnalyzer/* ${pkgdir}/usr/share/${pkgname%-git} install -Dm644 "$srcdir/logicanalyzer-git/Software/LogicAnalyzer/LogicAnalyzer/Assets/Logo40.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/${pkgname%-git}.png" - install -Dm644 "$srcdir/logicanalyzer-git/Software/LogicAnalyzer/LogicAnalyzer/Assets/window.ico" "$pkgdir/usr/share/pixmaps/clcapture.ico" install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop" << EOF [Desktop Entry] @@ -78,24 +115,21 @@ Name=${pkgname%-git} Name[zh_CN]=${pkgname%-git} Comment=${pkgdesc} #MimeType=application/x-${pkgname%-git}; -Exec=env LC_ALL=C ${pkgname%-git} +Exec=${pkgname%-git} Type=Application Categories=Development;Tool; Terminal=false Icon=${pkgname%-git} Version=1 EOF - install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/clcapture.desktop" << EOF -[Desktop Entry] -Name=clcapture -Name[zh_CN]=clcapture -Comment=Logic Analyzer Capture -#MimeType=application/x-clcapture; -Exec=env LC_ALL=C clcapture -Type=Application -Categories=Development;Tool; -Terminal=false -Icon=clcapture.ico -Version=1 -EOF + +} + +package_clcapture-git() { + provides=(${pkgname%-git}) + conflicts=(${pkgname%-git}) + + cd "${srcdir}/${pkgbase}/Software/LogicAnalyzer/artifact/" + + install -Dm0755 CLCapture/CLCapture "${pkgdir}/usr/bin/clcapture" } |