dotnet-system-io-ports-native
LOW
maintainer ChrisTX
0 votes
scanned 2026-10-31 07:58:04.077835
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: Christian Pfeiffer <cpfeiffer at rev-crew dot info>
2
# shellcheck disable=SC2034,SC2154
3
# shellcheck shell=bash
4
5
pkgname=dotnet-system-io-ports-native
6
pkgver=10.0.13
7
pkgrel=1
8
pkgdesc="Native library of System.IO.Ports for .NET on Linux, runtime.linux-*.runtime.native.System.IO.Ports (NuGet package)"
9
arch=('x86_64' 'aarch64')
10
url='https://github.com/dotnet/runtime'
11
license=('MIT')
12
_dotnetsdkver="10.0"
13
makedepends=(
14
dotnet-sdk-"$_dotnetsdkver"
15
clang
16
cmake
17
lld
18
)
19
checkdepends=(python)
20
options=('!debug')
21
# The runtime commit of the .NET release, from src/source-manifest.json of the dotnet/dotnet commit the
22
# 10.0.13 packages were published from (4099f83977f4d29604a9aeb971fb0a7bc1d5f699). The library isn't
23
# part of the source-built .NET of Arch Linux, so it's built for its version here.
24
_commit="6aa72daa24f66c01c3d7b6a32519e9d21396deec"
25
# The tarball of the commit, only the native sources are used
26
source=("runtime-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
27
"check-serial.py")
28
sha512sums=('58c92aaa08d3f8ff4af9eb2c75b0d1559d62c23b6043d534e8bcb5cfb371446e5ceb0dd49dc9d11bfb3a8adfc4e66d78bd79c7af84661cffa2d51909fdda5e82'
29
'52fccbac017ec1eb19d7b970aa3f28606986182eef0fdb84436d139399a4e7cc2ce77d74e03f738db1ab2c7bc7334e0a15811a938a7dd4860889bad4bc9b94e9')
30
b2sums=('993176a52c72dd0ba44d76c08ee72ff926e688c8bb9b9121c4fbbbbfe92286ae51516ec6d4ac37ebc4f09670fb7d027719012c6b513251c1166434c260cee914'
31
'91c610080cc18e001e4559b7bda582d7fd9b31186d932a183a4f3805490b88ffab0345967c18b6d181e235b9603da6769c0d0773dde77b2693a471d179c0522b')
32
33
# The runtime's name of the architecture, and the portable RID the NuGet package is for
34
_arch() {
35
case "$CARCH" in
36
x86_64) echo x64 ;;
37
aarch64) echo arm64 ;;
38
esac
39
}
40
41
prepare() {
42
local _nugetid
43
_nugetid="runtime.linux-$(_arch).runtime.native.System.IO.Ports"
44
mkdir -p nupkg-src
45
cat >nupkg-src/pack.csproj <<EOF
46
<Project Sdk="Microsoft.NET.Sdk">
47
<PropertyGroup>
48
<TargetFramework>net$_dotnetsdkver</TargetFramework>
49
<IncludeBuildOutput>false</IncludeBuildOutput>
50
<NuspecFile>$_nugetid.nuspec</NuspecFile>
51
</PropertyGroup>
52
</Project>
53
EOF
54
# Like upstream's package, minus the empty placeholders for the other platforms
55
cat >"nupkg-src/$_nugetid.nuspec" <<EOF
56
<?xml version="1.0" encoding="utf-8"?>
57
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
58
<metadata>
59
<id>$_nugetid</id>
60
<version>$pkgver</version>
61
<authors>Microsoft</authors>
62
<license type="expression">MIT</license>
63
<projectUrl>https://dot.net/</projectUrl>
64
<description>Internal implementation package not meant for direct consumption. Please do not reference directly.</description>
65
<repository type="git" url="$url" commit="$_commit" />
66
</metadata>
67
<files>
68
<file src="libSystem.IO.Ports.Native.so" target="runtimes/linux-$(_arch)/native" />
69
</files>
70
</package>
71
EOF
72
}
73
74
build() {
75
cd "runtime-$_commit" || exit
76
# Configure the runtime's native libraries like upstream, but only build this one
77
local _outconfig
78
_outconfig="net$_dotnetsdkver-linux-Release-$(_arch)"
79
./src/native/libs/build-native.sh -release -arch "$(_arch)" -outconfig "$_outconfig" -configureonly
80
cmake --build "artifacts/obj/native/$_outconfig" --target System.IO.Ports.Native
81
install -Dm755 "artifacts/obj/native/$_outconfig/System.IO.Ports.Native/libSystem.IO.Ports.Native.so" \
82
-t "$srcdir/nupkg-src/"
83
# makepkg doesn't strip what ends up in the NuGet package
84
strip --strip-unneeded "$srcdir/nupkg-src/libSystem.IO.Ports.Native.so"
85
86
cd "$srcdir/nupkg-src" || exit
87
DOTNET_CLI_HOME="$srcdir/dotnet-home" DOTNET_CLI_TELEMETRY_OPTOUT=1 DOTNET_NOLOGO=1 NUGET_PACKAGES="$srcdir/nuget" \
88
dotnet pack pack.csproj --output "$srcdir/nupkg"
89
}
90
91
check() {
92
# The tests of System.IO.Ports need serial ports, drive a pseudo-terminal with the library instead
93
python -I check-serial.py "$srcdir/nupkg-src/libSystem.IO.Ports.Native.so"
94
}
95
96
package() {
97
install -Dm644 "$srcdir/nupkg/runtime.linux-$(_arch).runtime.native.System.IO.Ports.$pkgver.nupkg" \
98
-t "$pkgdir/usr/share/dotnet/nuget-packages/"
99
install -Dm644 "runtime-$_commit/LICENSE.TXT" -t "$pkgdir/usr/share/licenses/$pkgname/"
100
}
101
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-31 07:58:04 | Low | 1 |