summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorVasily2020-01-09 14:06:12 +0100
committerVasily2020-01-09 14:06:12 +0100
commit591a1d8ceaa895825eea9f4509ba21986352a4b2 (patch)
tree8ccfaa07b21be45de373348c0520c7686d230f8a /PKGBUILD
parent0716ff95583720259eb56d7135c8cc6d65141ea6 (diff)
downloadaur-591a1d8ceaa895825eea9f4509ba21986352a4b2.tar.gz
Add .desktop file and /usr/bin symlink
The .desktop file is used for the AppImage, which means some changes are necessary for it to work. The absolute paths to the binary and icon are necessary, as well as making sure the CWD is inside the /opt/AdvancedSettings directory.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD19
1 files changed, 18 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 98c9847f2d29..5f847fc3b036 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Vitaly Utkin <vautkin AT teknik DOT io>
pkgname=ovras
pkgver=4.0.1
-pkgrel=1
+pkgrel=2
epoch=0
pkgdesc="Advanced settings and custom behavior for SteamVR using OpenVR."
arch=("x86_64")
@@ -21,6 +21,7 @@ build() {
_additionalOptions=
+ # Attempting to compile without package will result in compile error
pacman -Qi xorg-server >/dev/null 2>&1
if [ $? -ne 0 ]; then
_additionalOptions="CONFIG+=noX11"
@@ -29,6 +30,7 @@ build() {
echo "X11 features enabled."
fi
+ # Attempting to compile without package will result in compile error
pacman -Qi dbus >/dev/null 2>&1
if [ $? -ne 0 ]; then
_additionalOptions+=" CONFIG+=noDBUS"
@@ -43,5 +45,20 @@ build() {
package() {
cd "OpenVR-AdvancedSettings-$pkgver"
+
+ # Get desktop icon working
+ mkdir -p "$pkgdir/usr/share/applications"
+ cp "src/package_files/linux/AdvancedSettings.desktop" "$pkgdir/usr/share/applications/"
+ sed -i 's/Exec=.*/Exec=\/opt\/AdvancedSettings\/AdvancedSettings/' "$pkgdir/usr/share/applications/AdvancedSettings.desktop"
+ sed -i 's/Icon=.*/Icon=\/opt\/AdvancedSettings\/AdvancedSettings.png/' "$pkgdir/usr/share/applications/AdvancedSettings.desktop"
+
+ # Make program use correct working dir
+ echo "Path=/opt/AdvancedSettings" >> "$pkgdir/usr/share/applications/AdvancedSettings.desktop"
+
+ # Enable command line usage
+ mkdir -p "$pkgdir/usr/bin/"
+ ln -s /opt/AdvancedSettings/AdvancedSettings "$pkgdir/usr/bin/ovras"
+
+ # Install
make install
}