diff options
author | graysky | 2015-06-08 18:03:00 -0400 |
---|---|---|
committer | graysky | 2015-06-08 18:03:00 -0400 |
commit | 99605ba65aecd01aedac7c19bc486d1e38e6c9e8 (patch) | |
tree | 29f83e014f8a25e84861c432ca7d672bf5821e23 | |
download | aur-99605ba65aecd01aedac7c19bc486d1e38e6c9e8.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | readme.install | 53 |
3 files changed, 99 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..012ff6cf870d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = pulseaudio-ctl + pkgdesc = Control pulseaudio volume from the shell or mapped to keyboard shortcuts. + pkgver = 1.61 + pkgrel = 1 + url = https://github.com/graysky2/pulseaudio-ctl + install = readme.install + arch = any + license = MIT + depends = bc + depends = libpulse>=4.0 + depends = pulseaudio>=4.0 + optdepends = libnotify: to display volume and mute status + conflicts = pulseaudio_ctl + replaces = pulseaudio_ctl + source = http://repo-ck.com/source/pulseaudio-ctl/pulseaudio-ctl-1.61.tar.xz + sha256sums = e486d8f60cffc26a0923eff84ab86515b9bfac57f20939b96d57c5763d647dd2 + +pkgname = pulseaudio-ctl + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a10819f28867 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +# Contributor: graysky <graysky AT archlinux dot us> +pkgname=pulseaudio-ctl +pkgver=1.61 +pkgrel=1 +pkgdesc='Control pulseaudio volume from the shell or mapped to keyboard shortcuts.' +arch=('any') +license=('MIT') +depends=('bc' 'libpulse>=4.0' 'pulseaudio>=4.0') +optdepends=('libnotify: to display volume and mute status') +conflicts=('pulseaudio_ctl') +replaces=('pulseaudio_ctl') +url=https://github.com/graysky2/pulseaudio-ctl +source=("http://repo-ck.com/source/$pkgname/$pkgname-$pkgver.tar.xz") +sha256sums=('e486d8f60cffc26a0923eff84ab86515b9bfac57f20939b96d57c5763d647dd2') +install=readme.install + +build() { + cd "$pkgname-$pkgver" + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + install -Dm644 MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + diff --git a/readme.install b/readme.install new file mode 100644 index 000000000000..51c971a5aec9 --- /dev/null +++ b/readme.install @@ -0,0 +1,53 @@ +post_install() { + echo '--------------------------------------------------------------------------' + echo ' INSTRUCTIONS FOR USE' + echo + echo 'Simply map the following scripts to keyboard shortcuts in your DE or WM.' + echo 'Xfce4 allows for this under Settings > Keyboard > Application Shortcuts.' + echo + echo '/usr/bin/pulseaudio-ctl mute ==> Toggle status of mute' + echo '/usr/bin/pulseaudio-ctl mute-input ==> Toggle status of mute for mic' + echo '/usr/bin/pulseaudio-ctl up ==> Increase vol by 5 %' + echo '/usr/bin/pulseaudio-ctl down ==> Decrease vol by 5 %' + echo '--------------------------------------------------------------------------' +} + +post_remove() { + echo '-----------------------------------------------------------------------' + echo 'Be sure you remove any keyboard shortcuts or bindings you created.' + echo '-----------------------------------------------------------------------' +} + +post_upgrade() { + ## arg 1: the new package version + ## arg 2: the old package version + oldpkgver=${2%-*} + #newpkgver=${1%-*} + + if [[ $oldpkgver < 1.51 ]]; then + echo '--> Please check ~/.config/pulseaudio-ctl/config against the' + echo '--> provided /usr/share/pulseaudio-ctl/config.skel to ensure' + echo '--> it is current as the script does not do this automatically.' + else + /bin/true + fi + + if [[ $oldpkgver < 1.46 ]]; then + echo '--> Please check ~/.config/pulseaudio-ctl/config against the' + echo '--> provided /usr/share/pulseaudio-ctl/config.skel to ensure' + echo '--> it is current as the script does not do this automatically.' + else + /bin/true + fi + + if [[ $oldpkgver < 1.20 ]]; then + echo '--> Support for the older three script solution has been removed.' + echo '--> You MUST remaps your shortcut keys.' + echo '-->' + echo '--> /usr/bin/mute_toggle ==> /usr/bin/pulseaudio-ctl mute' + echo '--> /usr/bin/vol_up ==> /usr/bin/pulseaudio-ctl up' + echo '--> /usr/bin/mute_toggle ==> /usr/bin/pulseaudio-ctl down' + else + /bin/true + fi +} |