dotnet-pluralize-net

LOW
maintainer ChrisTX 0 votes scanned 2026-10-31 05:57:59.662655
View on AUR
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
5pkgname=dotnet-pluralize-net
6_nugetid=Pluralize.NET
7pkgver=1.0.13
8pkgrel=1
9pkgdesc="Pluralize or singularize any English word, Pluralize.NET (NuGet package)"
10arch=('any')
11url='https://github.com/sarathkcm/Pluralize.NET'
12license=('MIT')
13_dotnetsdkver="10.0"
14makedepends=(
15 dotnet-sdk-"$_dotnetsdkver"
16)
17# The latest commit. Upstream hasn't published a release since 1.0.2, the later commits fix rules and
18# version the library as 1.0.13.
19_commit="5ccb647784d439fc20ce8f1b5b15b790da29148b"
20source=("Pluralize.NET-$_commit.tar.gz::$url/archive/$_commit.tar.gz")
21sha512sums=('98e2d494147e92962c1fdf63b560e14462eda7c0cfdb7fc2cd247c5f177ce3cc7a3cb8b3ecb83494876301c5d69f371cb8d01a13ccfc25b7e8245cfb4d3dcf63')
22b2sums=('0659c39c9a86512af83405aa872571eea841472d7bc8653b42f15f2af6596b8b0a6d7096176783d87f0999005a85ac100b411f12c63cac1f9abb31683aa91061')
23
24_dotnet_env() {
25 export NUGET_PACKAGES="$srcdir/nuget"
26 export DOTNET_CLI_HOME="$srcdir/dotnet-home"
27 export DOTNET_CLI_TELEMETRY_OPTOUT=1
28 export DOTNET_NOLOGO=1
29
30 # The repository information usually comes from git, which would find the repository this PKGBUILD
31 # is in instead
32 _build_arguments=(
33 --configuration Release
34 -p:SourceRevisionId="$_commit"
35 -p:EnableSourceControlManagerQueries=false
36 -p:RepositoryCommit="$_commit"
37 )
38}
39
40prepare() {
41 cd "Pluralize.NET-$_commit" || exit
42 # The tests target .NET Core 2.0, test on the .NET runtime that's installed
43 sed -i "s|<TargetFramework>netcoreapp2.0</TargetFramework>|<TargetFramework>net$_dotnetsdkver</TargetFramework>|" \
44 Pluralize.NET.Tests/Pluralize.NET.Tests.csproj
45}
46
47build() {
48 _dotnet_env
49 cd "Pluralize.NET-$_commit" || exit
50 dotnet pack "$_nugetid/$_nugetid.csproj" "${_build_arguments[@]}" --output "$srcdir/nupkg"
51}
52
53check() {
54 _dotnet_env
55 cd "Pluralize.NET-$_commit" || exit
56 dotnet test "$_nugetid.Tests/$_nugetid.Tests.csproj" "${_build_arguments[@]}"
57}
58
59# Fails if a binary in $pkgdir, also inside the .nupkg files there, is identical to one of the packages
60# restored from a remote feed like nuget.org into $1, so no prebuilt binary slips in instead of one built
61# from source
62_check_prebuilt() {
63 local _extracted="$srcdir/check-prebuilt" _metadata _file _hash _found=0
64 local _binaries=(-type f '(' -name '*.dll' -o -name '*.exe' -o -name '*.so' -o -name '*.so.*' -o -name '*.dylib' ')')
65 local -A _prebuilt=()
66 while IFS= read -r -d '' _metadata; do
67 grep -qE '"source": *"https?://' "$_metadata" || continue
68 while IFS= read -r -d '' _file; do
69 _prebuilt[$(sha256sum <"$_file")]="${_file#"$1"/}"
70 done < <(find "${_metadata%/*}" "${_binaries[@]}" -print0)
71 done < <(find "$1" -name .nupkg.metadata -print0)
72
73 rm -rf "$_extracted"
74 mkdir -p "$_extracted"
75 while IFS= read -r -d '' _file; do
76 mkdir -p "$_extracted/${_file#"$pkgdir"/}"
77 bsdtar -xf "$_file" -C "$_extracted/${_file#"$pkgdir"/}"
78 done < <(find "$pkgdir" -type f -name '*.nupkg' -print0)
79 while IFS= read -r -d '' _file; do
80 _hash=$(sha256sum <"$_file")
81 if [[ -v "_prebuilt[$_hash]" ]]; then
82 echo "Prebuilt binary: ${_file#"$_extracted"/} is ${_prebuilt[$_hash]}" >&2
83 _found=1
84 fi
85 done < <(find "$pkgdir" "$_extracted" "${_binaries[@]}" -print0)
86 rm -rf "$_extracted"
87 return "$_found"
88}
89
90package() {
91 install -Dm644 "$srcdir/nupkg/$_nugetid.$pkgver.nupkg" -t "$pkgdir/usr/share/dotnet/nuget-packages/"
92 install -Dm644 "Pluralize.NET-$_commit/LICENCE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
93
94 _check_prebuilt "$srcdir/nuget"
95}
96

Scan history

Scanned at (UTC)SeverityRules
2026-10-31 05:57:59 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion