aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Turner2021-10-23 14:39:53 -0500
committerDylan Turner2021-10-23 14:39:53 -0500
commit1b11b6d2883bf42191aa0c8ce881621fde926265 (patch)
tree93a3e62c270fc16f0f4711c293b31d0f7ab92871
parentd120969db16f39d3e6a082ad5bf88ed2686954f7 (diff)
downloadaur-1b11b6d2883bf42191aa0c8ce881621fde926265.tar.gz
Changed venv setup to post isntall script because although it worked manually, it didn't in AUR
-rw-r--r--PKGBUILD20
-rw-r--r--bgrm.install14
2 files changed, 20 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 507254eb6bf7..5edc49dac7bd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,16 +10,7 @@ license=('GPL3')
makedepends=('git' 'python' 'python-pip' 'v4l2loopback-dkms')
source=('git://github.com/blueOkiris/bgrm.git')
md5sums=('SKIP')
-
-build() {
- cd bgrm
-
- echo "Setting up proper virtual environment."
- ./scripts/setup-venv.sh
-
- echo "Patching "
- ./scripts/patch-v4l2-py-mod.sh
-}
+install='bgrm.install'
package() {
echo "Installing to $pkgdir/opt/bgrm."
@@ -30,10 +21,9 @@ package() {
cp bgrm/LICENSE "$pkgdir/opt/bgrm"
cp bgrm/README.md "$pkgdir/opt/bgrm"
cp -r bgrm/bgrm/ "$pkgdir/opt/bgrm"
- cp -r bgrm/.venv "$pkgdir/opt/bgrm"
-
+ cp -r bgrm/scripts "$pkgdir/opt/bgrm"
+
mkdir -p "$pkgdir/usr/bin"
-
echo "Creating link in $pkgdir/usr/bin"
cat <<EOF > "$pkgdir/usr/bin/bgrm"
#!/bin/bash
@@ -41,4 +31,6 @@ cd /opt/bgrm
source bgrm.sh
EOF
chmod +x "$pkgdir/usr/bin/bgrm"
-} \ No newline at end of file
+}
+
+
diff --git a/bgrm.install b/bgrm.install
new file mode 100644
index 000000000000..9301425c2c3b
--- /dev/null
+++ b/bgrm.install
@@ -0,0 +1,14 @@
+post_install() {
+ cd /opt/bgrm/
+
+ echo "Setting up proper virtual environment."
+ source scripts/setup-venv.sh
+
+ echo "Patching v4l2 python library."
+ source scripts/patch-v4l2-py-mod.sh
+}
+
+post_uninstall() {
+ rm -rf /opt/bgrm
+}
+