summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD48
-rw-r--r--no-root.patch20
3 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..80e78f67603d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = drc-sim-e-git
+ pkgdesc = Wii U Gamepad Simulator Backend
+ pkgver = 2.1.1.r2.g2d8b3e6
+ pkgrel = 1
+ url = https://github.com/Veemyu/drc-sim-e
+ arch = x86_64
+ license = GPL2
+ makedepends = cmake
+ makedepends = make
+ makedepends = gcc
+ depends = python>=3.3
+ depends = python-pip
+ depends = libffi
+ depends = zlib
+ depends = libjpeg-turbo
+ depends = net-tools
+ depends = wireless_tools
+ depends = systemd-sysvcompat
+ depends = ffmpeg
+ depends = util-linux
+ depends = dhclient
+ depends = tk
+ depends = pkgconf
+ depends = openssl
+ depends = libnl
+ depends = ethtool
+ depends = ifmetric
+ source = drc-sim-e::git+https://github.com/Veemyu/drc-sim-e.git
+ source = no-root.patch
+ md5sums = SKIP
+ md5sums = d5f103f661f95da4f5202b47fede5d57
+
+pkgname = drc-sim-e-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2e755a3e0a19
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Nathan Wong, NorthWestWind <wsyn148@gmail.com>
+_pkgname=drc-sim-e
+pkgname=$_pkgname-git
+pkgver="2.1.1.r2.g2d8b3e6"
+pkgrel=1
+pkgdesc="Wii U Gamepad Simulator Backend"
+arch=('x86_64')
+url="https://github.com/Veemyu/drc-sim-e"
+license=('GPL2')
+makedepends=('cmake' 'make' 'gcc')
+depends=('python>=3.3' 'python-pip' 'libffi' 'zlib' 'libjpeg-turbo' 'net-tools' 'wireless_tools' 'systemd-sysvcompat' 'ffmpeg' 'util-linux' 'dhclient' 'tk' 'pkgconf' 'openssl' 'libnl' 'ethtool' 'ifmetric')
+source=("${_pkgname}::git+https://github.com/Veemyu/drc-sim-e.git" "no-root.patch")
+md5sums=('SKIP' 'd5f103f661f95da4f5202b47fede5d57')
+
+pkgver() {
+ cd "${_pkgname}"
+ git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd $srcdir/$_pkgname
+ patch --forward --strip=1 --input=../../no-root.patch
+}
+
+build() {
+ cd $srcdir/$_pkgname
+
+ python3 -m venv "$srcdir/$_pkgname/venv"
+ source "$srcdir/$_pkgname/venv/bin/activate"
+
+ python3 setup.py install
+}
+
+package() {
+ # the desktop file is super buggy. not including it
+ #
+ # cd dist
+ # unzip *.egg
+ # cd ..
+ #
+ # cp -r --no-preserve=mode,ownership "dist/usr" "${pkgdir}/usr"
+ cd $srcdir/$_pkgname
+ install -dm755 "${pkgdir}/opt/"
+ cp -r --no-preserve=mode,ownership "$srcdir/$_pkgname/venv" "${pkgdir}/opt/$_pkgname"
+
+ sed -i '/#!/c\#!/opt/drc-sim-e/bin/python3' build/scripts*/drc-sim-backend
+ install -Dm755 build/scripts*/drc-sim-backend "${pkgdir}/usr/bin/drc-sim-backend"
+}
diff --git a/no-root.patch b/no-root.patch
new file mode 100644
index 000000000000..c6b0582b10a5
--- /dev/null
+++ b/no-root.patch
@@ -0,0 +1,20 @@
+diff --color --unified --recursive --text drc-sim-e.orig/setup.py drc-sim-e.new/setup.py
+--- drc-sim-e.orig/setup.py 2024-04-09 20:02:19.030382742 +0800
++++ drc-sim-e.new/setup.py 2024-04-09 20:02:37.623978778 +0800
+@@ -32,13 +32,13 @@
+ 'resources/image/spade.gif',
+ 'resources/image/icon.gif'
+ ]),
+- ('/usr/share/applications', [
++ ('usr/share/applications', [
+ 'resources/bin/drcsimbackend.desktop'
+ ]),
+- ('/usr/share/icons/hicolor/512x512/apps', [
++ ('usr/share/icons/hicolor/512x512/apps', [
+ 'resources/image/drcsimbackend.png'
+ ]),
+- ('/usr/share/polkit-1/actions', [
++ ('usr/share/polkit-1/actions', [
+ 'resources/bin/com.rolandoislas.drcsim.server.policy'
+ ])
+ ],