sourcemod-steamworks
LOW
maintainer ChrisTX
0 votes
scanned 2026-11-03 12:04:35.126831
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=sourcemod-steamworks
6
_name=SteamWorks
7
# The latest commit, versioned like git describe from the last tag: its SteamWorks.inc compiles
8
# with current SourceMod, the release's doesn't
9
_commit=f0c1b62dff615511b27824aaa2815c7dc58d2716
10
pkgver=1.2.3c.r7.gf0c1b62
11
pkgrel=1
12
pkgdesc="SteamWorks, a SourceMod extension exposing Steamworks functions (in the addons folder of sourcemod)"
13
arch=(x86_64)
14
url="https://github.com/KyleSanderson/SteamWorks"
15
# The extension: GPL 3.0 with SourceMod's exceptions. The Steamworks headers of the Source SDK it's
16
# built with (steamworks-sdk.txt).
17
license=(GPL-3.0-only LicenseRef-SourceMod-exception LicenseRef-Steamworks-SDK)
18
# libsteam_api.so is the game's (bin/libsteam_api.so)
19
depends=(lib32-gcc-libs lib32-glibc sourcemod)
20
# The Steamworks headers and link library of the SDK of CS:GO (hl2sdk)
21
# The sources of the installed SourceMod and Metamod:Source, which it's built against
22
makedepends=(ambuild clang hl2sdk metamod-source-src python sourcemod-src)
23
checkdepends=(sourcemod-scripting)
24
# Where ./aur-packages commits reads the pins from: the commit pkgver names
25
_pins_lookup() {
26
echo "_commit $(curl -fsSL "https://api.github.com/repos/KyleSanderson/SteamWorks/commits/${pkgver##*.g}" | jq -r .sha)"
27
}
28
source=("$_name-$_commit.tar.gz::https://github.com/KyleSanderson/SteamWorks/archive/$_commit.tar.gz"
29
steamworks-sourcemod-1.12.patch
30
steamworks-sdk.txt)
31
sha512sums=('89fc51f990b79c1188f3e184d73c376cda8b17b06bd7290c6762beab6e746ee4bdb6a4e7ef7582191287f9e16185ad95c50010bc4124cc4c9c724093c3e231df'
32
'926e6401bd77acd16eea032c8581ec9c2f3945fd7a1b4579ebdd76052dd361549c7f9f507364c94f8305a81b4c29ea90c927144dc5a141c61cdb9220cdba1be2'
33
'b1892658b7aee13d2d56ce3694626e7d8c49e22ed3bd6e043d46d93c77b8643ace1538c698ff4031f19c33f639beb9ac8c50840636cdf3a2f5542f19a791d868')
34
b2sums=('3405aec6618a3d58788b4cc0e505d6159c5892b6eda3ef42b82c87dda0f783f3b4210f146aaf55438666cdf19530e6162b020df4ad6e2205aae3bfd876f54a6e'
35
'bd0a932b039402fba16fef6b4d01af98f6deb0644c181679109afb1684de8d1536e7a2022a3ddaf86346583f43d61b93e71ff60be91a842284a5ac2c9ce082a0'
36
'34812f414b4468365c6ad5e40d0a44e5453ffe3c4479dd4fb6d610a49302f45160518fb8e0e738d05b50b7155c16a67919cb4be328b2350fa8b74f1c89a103b9')
37
38
prepare() {
39
# A Steamworks SDK of the headers and link library of CS:GO's SDK, the layout of Valve's: its
40
# branch has the newest ones of the SDKs, including isteamgamecoordinator.h, which Valve's
41
# Steamworks SDK no longer has. The extension is linked against libsteam_api.so, which the game
42
# brings.
43
local _csgo=/usr/lib/hl2sdk/hl2sdk-csgo
44
mkdir -p "$srcdir/steamworks-sdk"/{public,redistributable_bin/linux32}
45
ln -sfn "$_csgo/public/steam" "$srcdir/steamworks-sdk/public/steam"
46
ln -sf "$_csgo/lib/linux/libsteam_api.so" \
47
"$srcdir/steamworks-sdk/redistributable_bin/linux32/libsteam_api.so"
48
49
cd "$srcdir/$_name-$_commit" || exit
50
# The SDK of the Steamworks headers and their newer API, and the headers of SourceMod 1.12 (C++17)
51
patch -Np1 -i "$srcdir/steamworks-sourcemod-1.12.patch"
52
}
53
54
build() {
55
# Clang, like SourceMod's builds; position-independent code, so the library has no text
56
# relocations
57
export CC=clang CXX=clang++
58
CFLAGS+=" -fPIC"
59
60
mkdir -p "$_name-$_commit/build"
61
cd "$_name-$_commit/build" || exit
62
python ../configure.py --enable-optimize --target=x86 --sdks=csgo --hl2sdk-root=/usr/lib/hl2sdk \
63
--sm-path=/usr/src/sourcemod --mms-path=/usr/src/metamod-source \
64
--steamworks-path="$srcdir/steamworks-sdk"
65
ambuild
66
}
67
68
check() {
69
# The example plugin compiles against the include file and SourceMod's
70
cd "$_name-$_commit/build/package/addons/sourcemod/scripting" || exit
71
spcomp64 -iinclude -E -o"$srcdir/swag.smx" swag.sp
72
}
73
74
package() {
75
# In the addons folder of sourcemod, as it works with any game's SDK: the extension, its include
76
# file and example plugin, as in upstream's package
77
install -d "$pkgdir/usr/lib/sourcemod"
78
cp -r --no-preserve=ownership "$srcdir/$_name-$_commit/build/package/addons" "$pkgdir/usr/lib/sourcemod/"
79
80
install -Dm644 /usr/src/sourcemod/licenses/LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname"
81
install -Dm644 "$srcdir/steamworks-sdk.txt" -t "$pkgdir/usr/share/licenses/$pkgname"
82
}
83
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-03 12:04:35 | Low | 1 |