summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/c-toxcore/c-toxcore.SlackBuild37
1 files changed, 17 insertions, 20 deletions
diff --git a/network/c-toxcore/c-toxcore.SlackBuild b/network/c-toxcore/c-toxcore.SlackBuild
index f8bc5a5547..54d332202f 100644
--- a/network/c-toxcore/c-toxcore.SlackBuild
+++ b/network/c-toxcore/c-toxcore.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=c-toxcore
VERSION=${VERSION:-0.2.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
DAEMON=${DAEMON:-no}
@@ -57,8 +57,8 @@ else
fi
case $DAEMON in
- yes) ENABLE_DAEMON="--enable-daemon" ;;
- *) ENABLE_DAEMON="--disable-daemon" ;;
+ yes) ENABLE_DAEMON="-DBOOTSTRAP_DAEMON=ON" ;;
+ *) ENABLE_DAEMON="-DBOOTSTRAP_DAEMON=OFF" ;;
esac
set -e
@@ -76,23 +76,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 {} \;
-./autogen.sh
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- $ENABLE_DAEMON \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DENABLE_STATIC=OFF \
+ $ENABLE_DAEMON \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
if [ "$DAEMON" != "no" ]; then
mkdir -p $PKG/usr/sbin