summaryrefslogtreecommitdiff
path: root/source/x/fcitx-libpinyin/fcitx-libpinyin.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/x/fcitx-libpinyin/fcitx-libpinyin.SlackBuild')
-rwxr-xr-xsource/x/fcitx-libpinyin/fcitx-libpinyin.SlackBuild15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/x/fcitx-libpinyin/fcitx-libpinyin.SlackBuild b/source/x/fcitx-libpinyin/fcitx-libpinyin.SlackBuild
index 467794f3..f8d2c5d1 100755
--- a/source/x/fcitx-libpinyin/fcitx-libpinyin.SlackBuild
+++ b/source/x/fcitx-libpinyin/fcitx-libpinyin.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for fcitx-libpinyin
# Copyright 2017 Heinz Wiesinger, Amsterdam, The Netherlands
-# Copyright 2017, 2020 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2017, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,8 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=fcitx-libpinyin
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
-MODEL_VERSION=${MODEL_VERSION:-20161206}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -94,20 +93,24 @@ find . \
tar xf $CWD/dict/*.tar.* $(tar tf $CWD/dict/*.tar.* | grep model.text)
)
-mkdir build
-cd build
+mkdir cmake-build
+cd cmake-build
cmake \
-DCMAKE_CXX_FLAGS="${SLKCFLAGS}" \
-DCMAKE_C_FLAGS="${SLKCFLAGS}" \
-DCMAKE_INSTALL_PREFIX="/usr" \
+ -DLIBPINYIN_PKGDATADIR=/usr/share/fcitx/libpinyin/zhuyin_data \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DENABLE_QT=OFF \
..
make $NUMJOBS || make || exit 1
- make install/strip DESTDIR=$PKG || exit 1
+ make install DESTDIR=$PKG || exit 1
cd ..
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a COPYING $PKG/usr/doc/$PKGNAM-$VERSION