summaryrefslogtreecommitdiff
path: root/source/l/json-c/json-c.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/json-c/json-c.SlackBuild')
-rwxr-xr-xsource/l/json-c/json-c.SlackBuild38
1 files changed, 18 insertions, 20 deletions
diff --git a/source/l/json-c/json-c.SlackBuild b/source/l/json-c/json-c.SlackBuild
index 63220065..06e548e2 100755
--- a/source/l/json-c/json-c.SlackBuild
+++ b/source/l/json-c/json-c.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for json-c
# Copyright 2015 Robby Workman, Tuscaloosa, Alabama, USA
-# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -71,9 +71,9 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PKGNAM-$VERSION
+rm -rf $PKGNAME-$PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
-cd $PKGNAM-$VERSION || exit 1
+cd $PKGNAM-$PKGNAM-$VERSION || exit 1
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -81,23 +81,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --disable-static \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --build=$ARCH-slackware-linux || exit 1
-
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-# Don't ship .la files:
-rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+# Configure, build, and install:
+mkdir cmake-build
+cd cmake-build
+ cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+ -DDOC_INSTALL_DIR="doc" \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DBUILD_STATIC_LIBS=OFF \
+ .. || exit 1
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null