aboutsummaryrefslogtreecommitdiff
path: root/system/freeswitch
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-11 18:30:09 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-16 12:11:20 +0700
commit08263aa7237e121fcc43ebb7fb1e40c39852a46c (patch)
tree98fa9d4477a10f39354fd49b451e65974243019e /system/freeswitch
parentedf5d25983243182c5b888c3b89cb19243b94d38 (diff)
system/freeswitch: Fix docs.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/freeswitch')
-rw-r--r--system/freeswitch/freeswitch.SlackBuild65
1 files changed, 29 insertions, 36 deletions
diff --git a/system/freeswitch/freeswitch.SlackBuild b/system/freeswitch/freeswitch.SlackBuild
index 0d612b7ea0c7..0409049f6a0d 100644
--- a/system/freeswitch/freeswitch.SlackBuild
+++ b/system/freeswitch/freeswitch.SlackBuild
@@ -22,25 +22,28 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220411 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - i486 => i586.
+# - use getent instead of grepping passwd and group files.
+# - get rid of useless INSTALL in doc dir.
+# - install docs in /usr/doc/$PRGNAM-$VERSION (instead of symlinking).
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=freeswitch
VERSION=${VERSION:-1.2.15}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -50,8 +53,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -78,10 +81,8 @@ case "$PGSQL" in
*) PGSQL="--without-pgsql --disable-core-pgsql-support" ;;
esac
-# Bail if user or group isn't valid on your system
-if ! grep ^freeswitch: /etc/passwd 2>&1 > /dev/null; then
-
-cat << EOF
+bailout() {
+ cat << EOF
You must have a freeswitch user to run this script
@@ -89,20 +90,11 @@ cat << EOF
# useradd -u 269 -d /opt/freeswitch -s /bin/bash -g freeswitch freeswitch
EOF
+ exit 1
+}
- exit
-elif ! grep ^freeswitch: /etc/group 2>&1 > /dev/null; then
-
-cat << EOF
-
- You must have a freeswitch group to run this script
-
- # groupadd -g 269 freeswitch
-
-EOF
-
- exit
-fi
+getent passwd freeswitch &>/dev/null || bailout
+getent group freeswitch &>/dev/null || bailout
set -e
@@ -115,9 +107,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Prepare some things
./rebootstrap.sh
@@ -138,6 +130,7 @@ CXXFLAGS="$SLKCFLAGS -Wno-error" \
--libdir=/opt/freeswitch/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
$PGSQL \
+ --disable-static \
--build=$ARCH-slackware-linux
make -j1
@@ -167,21 +160,21 @@ install -D -m0755 -oroot -groot $CWD/rc.freeswitch $PKG/etc/rc.d/rc.freeswitch.n
mkdir -p $PKG/etc/logrotate.d
install -m 0644 $CWD/logrotate.freeswitch $PKG/etc/logrotate.d/freeswitch.new
-# Put docs into opt aswell, symlink later
-mkdir -p $PKG/opt/freeswitch/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog INSTALL \
- $PKG/opt/freeswitch/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/opt/freeswitch/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Put docs into /usr/doc (Slackware standard location)
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS COPYING ChangeLog $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
# Change ownership for some dirs
-chown -R freeswitch:freeswitch $PKG/var/log/freeswitch $PKG/var/run/freeswitch \
+chown -R freeswitch:freeswitch \
+ $PKG/var/log/freeswitch \
+ $PKG/var/run/freeswitch \
$PKG/opt/freeswitch
# Symlink some stuff back to the system
-mkdir -p $PKG/usr/{bin,doc}
-( cd $PKG/usr/doc ; ln -s /opt/freeswitch/doc/$PRGNAM-$VERSION )
-( cd $PKG/usr/bin ; ln -s /opt/freeswitch/bin/fs_cli )
+mkdir -p $PKG/usr/bin
+ln -s ../../opt/freeswitch/bin/fs_cli $PKG/usr/bin/fs_cli
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc