mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
libraries/live555: Fix script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
46cc8cc26b
commit
900ce5e47f
2 changed files with 41 additions and 43 deletions
|
@ -1,16 +1,30 @@
|
|||
#!/bin/sh
|
||||
# Heavily based on the Slackware 13.0 SlackBuild
|
||||
# http://www.live555.com
|
||||
# Packagers Gohanz ( gohanz@infinito.it)
|
||||
# http://www.slacky.it
|
||||
|
||||
# Modified for SlackBuilds.org by Erik Hanson <erik@slackbuilds.org>
|
||||
# Slackware build script for live555
|
||||
|
||||
# Maintained by Christoph Willing <chris.willing@iinet.net.au>
|
||||
# Copyright 2014 Christoph Willing, Brisbane, Australia
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=live555
|
||||
VERSION=${VERSION:-2014.08.26}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
SRCNAM=live
|
||||
|
@ -47,46 +61,20 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
#./genMakefiles linux
|
||||
case "$ARCH" in
|
||||
i?86) ./genMakefiles linux ;;
|
||||
x86_64) ./genMakefiles linux-64bit ;;
|
||||
esac
|
||||
for f in $(find . -type f |xargs grep -l "PREFIX =") ; do echo $f; sed -i -e "/PREFIX =/c\PREFIX = \/usr" $f ; done
|
||||
for f in $(find . -type f |xargs grep -l "LIBDIR =") ; do echo $f; sed -i -e "/LIBDIR =/c\LIBDIR = \$(PREFIX)\/lib$LIBDIRSUFFIX" $f ; done
|
||||
|
||||
./genMakefiles linux-with-shared-libraries
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
mkdir -p $PKG/usr/bin
|
||||
mkdir -p $PKG/usr/include
|
||||
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/live/BasicUsageEnvironment
|
||||
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/live/UsageEnvironment
|
||||
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/live/groupsock
|
||||
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/live/liveMedia
|
||||
mkdir -p $PKG/usr/include/BasicUsageEnvironment
|
||||
mkdir -p $PKG/usr/include/UsageEnvironment
|
||||
mkdir -p $PKG/usr/include/groupsock
|
||||
mkdir -p $PKG/usr/include/liveMedia
|
||||
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
|
||||
sed -e "s/%VERSION%/$VERSION/" -e "s/%LIBDIRSUFFIX%/$LIBDIRSUFFIX/" -e "s/%PREFIX%/\/usr/" $CWD/live555.pc.in >$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/live555.pc
|
||||
chmod 0644 $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/live555.pc
|
||||
|
||||
find $TMP/$SRCNAM/testProgs/ -perm -755 -exec cp {} /$PKG/usr/bin \;
|
||||
find $TMP/$SRCNAM/mediaServer/ -perm -755 -exec cp {} /$PKG/usr/bin \;
|
||||
find $TMP/$SRCNAM/BasicUsageEnvironment/*.a -exec cp {} $PKG/usr/lib${LIBDIRSUFFIX}/live/BasicUsageEnvironment/ \;
|
||||
(cd $PKG/usr/lib${LIBDIRSUFFIX} && ln -s live/BasicUsageEnvironment/*.a )
|
||||
cp -a $TMP/$SRCNAM/BasicUsageEnvironment/include/*.h* $PKG/usr/include/BasicUsageEnvironment/
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
find $TMP/$SRCNAM/UsageEnvironment/*.a -exec cp {} $PKG/usr/lib${LIBDIRSUFFIX}/live/UsageEnvironment/ \;
|
||||
(cd $PKG/usr/lib${LIBDIRSUFFIX} && ln -s live/UsageEnvironment/*.a )
|
||||
cp -a $TMP/$SRCNAM/UsageEnvironment/include/*.h* $PKG/usr/include/UsageEnvironment/
|
||||
|
||||
find $TMP/$SRCNAM/groupsock/*.a -exec cp {} $PKG/usr/lib${LIBDIRSUFFIX}/live/groupsock/ \;
|
||||
(cd $PKG/usr/lib${LIBDIRSUFFIX} && ln -s live/groupsock/*.a )
|
||||
cp -a $TMP/$SRCNAM/groupsock/include/*.h* $PKG/usr/include/groupsock/
|
||||
|
||||
find $TMP/$SRCNAM/liveMedia/*.a -exec cp {} $PKG/usr/lib${LIBDIRSUFFIX}/live/liveMedia/ \;
|
||||
(cd $PKG/usr/lib${LIBDIRSUFFIX} && ln -s live/liveMedia/*.a )
|
||||
cp -a $TMP/$SRCNAM/liveMedia/include/*.h* $PKG/usr/include/liveMedia/
|
||||
|
||||
find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
find $PKG | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null
|
||||
|
||||
rm -f $PKG/usr/bin/COPYING # Don't need this.
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
|
10
libraries/live555/live555.pc.in
Normal file
10
libraries/live555/live555.pc.in
Normal file
|
@ -0,0 +1,10 @@
|
|||
prefix=%PREFIX%
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/include
|
||||
libdir=${prefix}/lib%LIBDIRSUFFIX%
|
||||
|
||||
Name: live555
|
||||
Description: C++ multimedia streaming libraries
|
||||
Version: %VERSION%
|
||||
Cflags: -I${includedir} -I${includedir}/BasicUsageEnvironment -I${includedir}/UsageEnvironment -I${includedir}/groupsock -I${includedir}/liveMedia
|
||||
|
Loading…
Reference in a new issue