summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJulian Daube2018-03-18 01:05:20 +0100
committerJulian Daube2018-03-18 01:05:20 +0100
commit85751478181b7166324f75ecc24b3dd73fa36eda (patch)
tree259d090439b456590f2a59cb3dbac2390f77eeab /PKGBUILD
downloadaur-85751478181b7166324f75ecc24b3dd73fa36eda.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..db61239ddbe
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Contributer: Julian Daube <joposter (at) gmail (dot) com>
+
+pkgname=necta-wifi-mouse
+pkgdesc="wifi mouse for android (server part)"
+pkgver=1.0.1
+pkgrel=1
+arch=("x86_64" "i686")
+url=http://wifimouse.necta.us/
+
+source=("icon.png")
+source_x86_64=("mouseserver-x86_64.zip::http://wifimouse.necta.us/MouseServerLinux64.zip")
+source_i686=("mouseserver-i686.zip::http://wifimouse.necta.us/MouseServerLinux32.zip")
+md5sums=('671cbe35275357e3a42aa118a7e35a8f')
+md5sums_x86_64=('422f9c2e394b04cbde95e762194ed6de')
+md5sums_i686=('2b0dca3ffa174ef505a706f05cd36869')
+
+depends=()
+makedepends=("sed" "tar")
+
+prepare() {
+ # extract deb
+ suffix=$pkgver-$CARCH
+ if [ "$CARCH" == "i686" ]; then
+ suffix=$pkgver-32bit
+ fi
+
+ bsdtar -xf "$srcdir/mouseserver-$suffix.deb"
+ # extract data portion
+ tar -xf "$srcdir/data.tar.gz"
+}
+
+package() {
+ # create destination directories
+ mkdir -p "$pkgdir/usr/bin"
+ mkdir -p "$pkgdir/usr/share/applications"
+ mkdir -p "$pkgdir/usr/share/icons/hicolor/128x128/apps/"
+
+ # install files
+ install -m 775 "$srcdir/usr/sbin/mouseserver" "$pkgdir/usr/bin"
+ install -m 664 "$srcdir/usr/share/applications/mouseserver.desktop" "$pkgdir/usr/share/applications/mouseserver.desktop"
+ install -m 664 "$srcdir/icon.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/mouseserver.png"
+
+ # modify desktop file
+ desktopfile="$pkgdir/usr/share/applications/mouseserver.desktop"
+ sed -i 's/Exec=.*$/Exec=\/usr\/bin\/mouseserver/' "$desktopfile"
+ sed -i 's/Icon=.*$/Icon=\/usr\/share\/icons\/hicolor\/128x128\/apps\/mouseserver.png/' "$desktopfile"
+}