office/kchmviewer-qt: Updated for version 8.0.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-02-24 14:01:35 -05:00 committed by Willy Sudiarto Raharjo
parent 38469dc01f
commit 4b141b6fb4
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 19 additions and 29 deletions

View file

@ -23,15 +23,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220222 bkw: Modified by SlackBuilds.org: fix build on 15.0,
# by updating to v8.0.
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=kchmviewer-qt PRGNAM=kchmviewer-qt
VERSION=${VERSION:-7.7} VERSION=${VERSION:-8.0}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
ORIG_PRGNAM=${PRGNAM%-qt} ORIG_PRGNAM=${PRGNAM%-qt}
SRCVER=RELEASE_${VERSION//./_}
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
@ -41,9 +45,6 @@ if [ -z "$ARCH" ]; then
esac esac
fi 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 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0 exit 0
@ -53,43 +54,35 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then # 20220224 bkw: no need for SLKCFLAGS, qmake-qt5 uses the flags
SLKCFLAGS="-O2 -march=i586 -mtune=i686" # qt5 was built with (which are the same ones we use).
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
else
SLKCFLAGS="-O2"
fi
set -e set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $ORIG_PRGNAM-$VERSION rm -rf $ORIG_PRGNAM-$SRCVER
tar xvf $CWD/$ORIG_PRGNAM-$VERSION.tar.gz tar xvf $CWD/$ORIG_PRGNAM-$SRCVER.tar.gz
cd $ORIG_PRGNAM-$VERSION cd $ORIG_PRGNAM-$SRCVER
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ \( -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 \ \( -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 {} \+
sed -i "s/$ORIG_PRGNAM/$PRGNAM/g; sed -i "s/$ORIG_PRGNAM/$PRGNAM/g;
/^Categories/s/KDE;//; /^Categories/s/KDE;//;
/^Name/s/$/ (Qt-only)/" packages/$ORIG_PRGNAM.desktop /^Name/s/$/ (Qt-only)/" packages/$ORIG_PRGNAM.desktop
qmake \ sed -i "/^Icon/s,=.*,=/usr/share/pixmaps/$PRGNAM.png," packages/$ORIG_PRGNAM.desktop
QMAKE_CFLAGS+="$SLKCFLAGS" \
QMAKE_CXXFLAGS+="$SLKCFLAGS" \ qmake-qt5
$ORIG_PRGNAM.pro
make make
mkdir -p $PKG/usr/bin mkdir -p $PKG/usr/bin
install -m 0755 -o root -g root bin/$ORIG_PRGNAM $PKG/usr/bin/$PRGNAM install -s -m 0755 -o root -g root bin/$ORIG_PRGNAM $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/usr/share/{applications,pixmaps} mkdir -p $PKG/usr/share/{applications,pixmaps}
install -m 0644 -o root -g root packages/$ORIG_PRGNAM.desktop \ install -m 0644 -o root -g root packages/$ORIG_PRGNAM.desktop \
@ -97,9 +90,6 @@ install -m 0644 -o root -g root packages/$ORIG_PRGNAM.desktop \
install -m 0644 -o root -g root packages/$ORIG_PRGNAM.png \ install -m 0644 -o root -g root packages/$ORIG_PRGNAM.png \
$PKG/usr/share/pixmaps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING ChangeLog DBUS-bindings FAQ README $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING ChangeLog DBUS-bindings FAQ README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

View file

@ -1,8 +1,8 @@
PRGNAM="kchmviewer-qt" PRGNAM="kchmviewer-qt"
VERSION="7.7" VERSION="8.0"
HOMEPAGE="http://www.ulduzsoft.com/kchmviewer" HOMEPAGE="http://www.ulduzsoft.com/kchmviewer"
DOWNLOAD="http://downloads.sourceforge.net/kchmviewer/kchmviewer-7.7.tar.gz" DOWNLOAD="https://github.com/gyunaev/kchmviewer/archive/RELEASE_8_0/kchmviewer-RELEASE_8_0.tar.gz"
MD5SUM="abf60f0cff69d2903600ecd372624cae" MD5SUM="581fac4d97042b0cc32bf683a39458eb"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES=""