diff options
author | Ryan P.C. McQuen <ryan.q@linux.com> | 2015-01-03 11:02:56 -0800 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-01-10 07:48:28 +0700 |
commit | 1f45b1282b1313c4f941a4d2a622437fe21ded22 (patch) | |
tree | eb13272a8c7455d659607cef7dd5c9274f04707f | |
parent | c4d4607a4ac96a4dd130efd207b15ff3f05c0f5d (diff) | |
download | slackbuilds-1f45b1282b1313c4f941a4d2a622437fe21ded22.tar.gz |
audio/apulse: Allow library path option.
Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
-rw-r--r-- | audio/apulse/README | 24 | ||||
-rw-r--r-- | audio/apulse/apulse.SlackBuild | 24 |
2 files changed, 43 insertions, 5 deletions
diff --git a/audio/apulse/README b/audio/apulse/README index 816843735b..d6ec81f97a 100644 --- a/audio/apulse/README +++ b/audio/apulse/README @@ -6,7 +6,7 @@ Any app that requires pulseaudio can be run as such: PulseAudio is not required. -Speex is recommended for compatibility. +Speex is recommended for greater compatibility. The SlackBuild now detects a multilib machine and will build with COMPAT32 libraries. If you have a reason @@ -14,3 +14,25 @@ to bypass this, run: # COMPAT32=no sh apulse.SlackBuild +The multilib version will create two binaries, +apulse (64-bit) and apulse32 (32-bit), unless +you choose to install the libraries globally. + +The default is for libraries to be installed in: + + /usr/lib${LIBDIRSUFFIX}/apulse + +To override this setting and install the libraries +directly into the /usr/lib*/ directories, run: + + GLOBAL_LIBS=yes sh apulse.SlackBuild + +The advantage of this, is the ability for pulseaudio +emulation in several applications beyond those +originally intended by the apulse project, such +as games from gog.com. The disadvantage of this +'global' build type, is that some programs (such as +Google Chrome) will believe you have pulseaudio +installed and may not have sound. + + diff --git a/audio/apulse/apulse.SlackBuild b/audio/apulse/apulse.SlackBuild index ed51c47f35..4f53eb3766 100644 --- a/audio/apulse/apulse.SlackBuild +++ b/audio/apulse/apulse.SlackBuild @@ -24,9 +24,18 @@ PRGNAM=apulse VERSION=${VERSION:-0.1.5} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +## build with GLOBAL_LIBS=yes +## to install pulse libraries +## directly in lib* directories +GLOBAL_LIBS=${GLOBAL_LIBS:-no} +if [ "$GLOBAL_LIBS" = no ]; then + APULSELIBPATHSUFFIX=${APULSELIBPATHSUFFIX:-/apulse} +elif [ "$GLOBAL_LIBS" = yes ]; then + APULSELIBPATHSUFFIX=${APULSELIBPATHSUFFIX:-/} +fi if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -68,7 +77,11 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz +if [ -e $CWD/v$VERSION.tar.gz ]; then + tar xvf $CWD/v$VERSION.tar.gz +else + tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +fi cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -81,14 +94,17 @@ if [ "$COMPAT32" = "yes" ]; then mkdir -pv build-m32 cd build-m32 CFLAGS=-m32 \ - cmake -DAPULSEPATH=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. + cmake -DAPULSEPATH=/usr/lib${APULSELIBPATHSUFFIX} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. make VERBOSE=1 make install DESTDIR=$PKG + if [ "$GLOBAL_LIBS" = no ]; then + mv $PKG/usr/bin/${PRGNAM} $PKG/usr/bin/${PRGNAM}32 + fi cd .. fi mkdir -pv build cd build - cmake -DAPULSEPATH=/usr/lib${LIBDIRSUFFIX} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. + cmake -DAPULSEPATH=/usr/lib${LIBDIRSUFFIX}${APULSELIBPATHSUFFIX} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. make VERBOSE=1 make install DESTDIR=$PKG cd .. |