summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2023-10-25 22:55:24 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2023-10-26 22:59:46 -0400
commit8046a2ea88c38990bbbd6c5bdd1df6e6a3b3af1d (patch)
tree36a351e4a31eb956be0c249b3a1b93551feb5980 /pcr
parentaf4250db200ef1deac3daf511761f0ecd041cecb (diff)
[apulse]: adopt package
Diffstat (limited to 'pcr')
-rw-r--r--pcr/apulse/PKGBUILD48
-rw-r--r--pcr/apulse/apulse.install13
-rw-r--r--pcr/apulse/asoundrc.sample15
3 files changed, 76 insertions, 0 deletions
diff --git a/pcr/apulse/PKGBUILD b/pcr/apulse/PKGBUILD
new file mode 100644
index 000000000..d1b717527
--- /dev/null
+++ b/pcr/apulse/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer (aur): Christian Hesse <arch@eworm.de>
+# Contributor: speps <speps at aur dot archlinux dot org>
+
+pkgname=apulse
+pkgver=0.1.13
+pkgrel=1
+pkgdesc='PulseAudio emulation for ALSA'
+arch=('i686' 'x86_64')
+arch+=('armv7h')
+url='https://github.com/i-rinat/apulse'
+license=('custom:MIT')
+license+=('LGPL2.1') # pulseaudio headers
+depends=('alsa-lib' 'glib2')
+makedepends=('cmake')
+install=apulse.install
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
+ 'asoundrc.sample')
+sha256sums=('9234ec4e10e408b9c01d5f4ea768ad1fc15494217c932db2c435202a9c7b5efd'
+ 'e851197ec9ebff528154210751cd6d5c426abfc2b1aa34343580407b1ea789a4')
+
+prepare() {
+ cd apulse-${pkgver}
+
+ mkdir -p build
+}
+
+build() {
+ cd apulse-${pkgver}/build
+
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev \
+ -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ cd apulse-${pkgver}/build
+
+ make DESTDIR="${pkgdir}/" install
+
+ # sample asoundrc
+ install -Dm644 ../../${source[1]} \
+ "${pkgdir}/usr/share/${pkgname}/${source[1]}"
+
+ # license
+ install -Dm644 ../LICENSE.MIT \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/pcr/apulse/apulse.install b/pcr/apulse/apulse.install
new file mode 100644
index 000000000..ffc1cafd7
--- /dev/null
+++ b/pcr/apulse/apulse.install
@@ -0,0 +1,13 @@
+post_install() {
+ cat << EOF
+
+For using PulseAudio emulation (ex. in skype):
+
+1. create a proper .asoundrc
+ $ cp /usr/share/apulse/asoundrc.sample ~/.asoundrc
+
+2. run apulse <program-name> [parameters]
+ $ apulse skype
+
+EOF
+}
diff --git a/pcr/apulse/asoundrc.sample b/pcr/apulse/asoundrc.sample
new file mode 100644
index 000000000..b529dc7c1
--- /dev/null
+++ b/pcr/apulse/asoundrc.sample
@@ -0,0 +1,15 @@
+pcm.!default {
+ type plug
+ slave.pcm "asymed"
+}
+
+
+pcm.asymed {
+ type asym
+ playback.pcm {
+ @func getenv
+ vars [ ALSAPCM ]
+ default "dmix"
+ }
+ capture.pcm "dsnoop"
+}