|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2008,2010,2011,2013 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2008,2010,2011,2013,2019 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -22,15 +22,15 @@
|
|
|
|
|
# |
|
|
|
|
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
|
|
|
|
# |
|
|
|
|
# Latest xchm sourcecode is available at: <http://xchm.sourceforge.net/>. |
|
|
|
|
# Latest xchm sourcecode is available at: <https://github.com/rzvncj/xCHM>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/wxwidgets-gtk |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-xchm} |
|
|
|
|
VERSION=${VERSION:-1.23} |
|
|
|
|
VERSION=${VERSION:-1.31} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-http://downloads.sourceforge.net/xchm/$ARCHIVE} |
|
|
|
|
WGET=${WGET:-https://github.com/rzvncj/xCHM/releases/download/$VERSION/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-xchm} |
|
|
|
@ -75,7 +75,7 @@ if [ ! -r $ARCHIVE ]; then
|
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
|
fi |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
@ -83,24 +83,32 @@ cd $TMP
|
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
patch -p 1 < $CWD/xchm-1.23-wxwidgets-3.0.diff |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=/usr \ |
|
|
|
|
--mandir=/usr/man \ |
|
|
|
|
--enable-optimize \ |
|
|
|
|
--disable-dependency-tracking |
|
|
|
|
--disable-dependency-tracking \ |
|
|
|
|
--build=$ARCH-slackware-linux |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
|
|
|
|
|
|
# Compress man pages |
|
|
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \; |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 AUTHORS COPYING ChangeLog NEWS README{,.xmlrpc} \ |
|
|
|
|
$PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 AUTHORS COPYING ChangeLog README $PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Copy slack-desc and doinst.sh files |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh |
|
|
|
|
|
|
|
|
|
# Copy slack-desc and desktop files |
|
|
|
|
install -D -m 0644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
install -D -m 0644 $CWD/xchm.desktop $PKG/usr/share/applications/xchm.desktop |
|
|
|
|
# Add dependency infos |
|
|
|
|
cat <<EOF > $PKG/install/slack-required |
|
|
|
|
wxwidgets-gtk |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|
cd $PKG |
|
|
|
|