aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsaac2023-01-25 20:11:34 -0800
committerIsaac2023-01-25 20:11:34 -0800
commit88d3ba047636fcfc94c2c6d5755586a10b8d4b73 (patch)
tree9302ed70025167f30e644f7a23f333db7e888d0a
downloadaur-88d3ba047636fcfc94c2c6d5755586a10b8d4b73.tar.gz
create pkgbuild for v2023.2.1
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD49
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0b064dc1b269
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = photonvision-bin
+ pkgdesc = free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition
+ pkgver = v2023.1.2
+ pkgrel = 1
+ url = https://photonvision.org/
+ arch = x86_64
+ license = GPL3
+ depends = jre11-openjdk-headless
+ depends = avahi
+ depends = opencv
+ noextract = photonvision-bin-v2023.1.2.jar
+ source = photonvision-bin-v2023.1.2.jar::https://github.com/PhotonVision/photonvision/releases/download/v2023.1.2/photonvision-v2023.1.2-linuxx64.jar
+ sha256sums = 8aa1e236544e53b04bf5883e3ac6b11788d353d1cbb4b4060120109fcce26c05
+
+pkgname = photonvision-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6f1c2e5d67a8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Isaac Ruben <isaac at rubenfamily dot com>
+pkgname='photonvision-bin'
+pkgver="v2023.2.1"
+pkgrel=1
+pkgdesc="free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition"
+arch=("x86_64")
+url="https://photonvision.org/"
+license=('GPL3')
+source=("$pkgname-$pkgver.jar::https://github.com/PhotonVision/photonvision/releases/download/$pkgver/photonvision-$pkgver-linuxx64.jar")
+noextract=("$pkgname-$pkgver.jar")
+sha256sums=('82f8249888e6fc693e4116899511e294a98b9e6dfbf259dabceefb1645ee25f1')
+depends=('jre11-openjdk-headless' 'avahi' 'opencv')
+
+prepare() {
+ # pulled from https://raw.githubusercontent.com/PhotonVision/photonvision/master/scripts/install.sh
+ # and slightly modified to work better with arch
+ cat > photonvision.service << EOF
+[Unit]
+Description=Service that runs PhotonVision
+
+[Service]
+WorkingDirectory=/opt/$pkgname
+# Run photonvision at "nice" -10, which is higher priority than standard
+Nice=-10
+# for non-uniform CPUs, like big.LITTLE, you want to select the big cores
+# look up the right values for your CPU
+# AllowCPUs=4-7
+
+# modified to use the jre11-openjdk-headless package, instead of whatever java version is configured
+ExecStart=/usr/lib/jvm/java-11-openjdk/bin/java -Xmx512m -jar /opt/$pkgname/photonvision.jar
+ExecStop=/bin/systemctl kill photonvision
+Type=simple
+Restart=on-failure
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
+EOF
+}
+
+package() {
+ cd "$srcdir"
+
+ # copy the jar file
+ install -Dm644 "$pkgname-$pkgver.jar" "$pkgdir/opt/$pkgname/photonvision.jar"
+
+ # copy the systemd service file
+ install -Dm644 photonvision.service "$pkgdir/etc/systemd/system/photonvision.service"
+}