summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlphaJack2021-03-07 13:47:38 +0100
committerAlphaJack2021-03-07 13:47:38 +0100
commitb1332d7a2f1da62db41560b02f3e0870af6a5e71 (patch)
tree0cffac9a23cd9ec1f19fe69ffae603a074c4117d
downloadaur-b1332d7a2f1da62db41560b02f3e0870af6a5e71.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD43
-rw-r--r--keysound.install9
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7c0b7777678e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = keysound-git
+ pkgdesc = A keyboard sound software for Linux
+ pkgver = r193.10f3798
+ pkgrel = 1
+ url = https://github.com/fgheng/keysound
+ install = keysound.install
+ arch = x86_64
+ license = MIT
+ depends = libpulse
+ optdepends = sdl2: SDL2 backend
+ source = git+https://github.com/fgheng/keysound
+ sha256sums = SKIP
+
+pkgname = keysound-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5a382e20e1e1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: AlphaJack <alphajack at tuta dot io>
+
+pkgname="keysound-git"
+pkgver=r193.10f3798
+pkgrel=1
+pkgdesc="A keyboard sound software for Linux "
+license=("MIT")
+arch=("x86_64")
+url="https://github.com/fgheng/keysound"
+depends=("libpulse")
+optdepends=("sdl2: SDL2 backend")
+source=("git+$url")
+sha256sums=("SKIP")
+install="keysound.install"
+
+pkgver(){
+ cd "keysound"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare(){
+ cd "keysound"
+ # use absolute dir
+ find "audio" -type f -exec sed -i {} -e 's|./|/usr/share/keysound/|' \;
+}
+
+build(){
+ cd "keysound"
+ # one can use different backends
+ # a clean environment is required for switching backend
+ # "sdl" requires the package "sdl2" to be installed
+ make CFLAG=pulse
+ #make CFLAG=sdl
+ #make CFLAG=alsa
+}
+
+package(){
+ cd "keysound"
+ install -d "$pkgdir/usr/bin"
+ install -d "$pkgdir/usr/share/keysound"
+ mv "keysound" "$pkgdir/usr/bin"
+ cp -r "audio" "$pkgdir/usr/share/keysound"
+}
diff --git a/keysound.install b/keysound.install
new file mode 100644
index 000000000000..13ac94f06124
--- /dev/null
+++ b/keysound.install
@@ -0,0 +1,9 @@
+post_install(){
+ echo 'You need to add your user to the "input" group, i.e. by running
+
+ usermod -aG input USER
+
+After that you need to logout to apply changes.
+Sample files can be found under /usr/share/keysound/audio'
+}
+