aboutsummaryrefslogtreecommitdiff
path: root/development/tkcon/tkcon.SlackBuild
diff options
context:
space:
mode:
authorJuan M. Lasca <juanmlasca@gmail.com>2023-01-12 20:32:58 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-01-14 08:50:07 +0700
commit8ac0f6dc5b9ef3f4697e35b8c2ec21a4c4b192aa (patch)
tree7ca4b7672316d4b5b7badcc7addf0a845287e305 /development/tkcon/tkcon.SlackBuild
parent17c2e07dd469763c597445e356e334cbbca25a04 (diff)
development/tkcon: Updated for version 2.7.11.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/tkcon/tkcon.SlackBuild')
-rw-r--r--development/tkcon/tkcon.SlackBuild57
1 files changed, 42 insertions, 15 deletions
diff --git a/development/tkcon/tkcon.SlackBuild b/development/tkcon/tkcon.SlackBuild
index 7034a934d60a..f041e8352ac5 100644
--- a/development/tkcon/tkcon.SlackBuild
+++ b/development/tkcon/tkcon.SlackBuild
@@ -22,18 +22,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# 2022-09-07: Changed ARCH to 'noarch'
-# Added pregenerated man pages
-
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tkcon
-VERSION=${VERSION:-2.7.10}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-2.7.11}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-ARCH=noarch
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
@@ -44,6 +47,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -60,25 +77,35 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
chmod -R -x .
-install tkcon.tcl -Dm755 $PKG/usr/lib/tkcon/tkcon.tcl
+# correct version number
+sed -i 's/VERSION "2\.7\.10"/VERSION "2\.7\.11"/' tkcon.tcl
+install tkcon.tcl -Dm755 $PKG/usr/lib${LIBDIRSUFFIX}/tkcon/tkcon.tcl
sed -i 's/Utility\;//;/Encoding=UTF-8/d;/Comment=/d' tkcon-console.desktop
install tkcon-console.desktop -Dm644 $PKG/usr/share/applications/tkcon-console.desktop
install icons/tkcon-small48.png -Dm644 $PKG/usr/share/pixmaps/tkcon-icon.png
-sed -i 's/2\.7/2\.7\.10/' pkgIndex.tcl
-install pkgIndex.tcl -Dm644 $PKG/usr/lib/tkcon/pkgIndex.tcl
+sed -i 's/2\.7/2\.7\.11/' pkgIndex.tcl
+install pkgIndex.tcl -Dm644 $PKG/usr/lib${LIBDIRSUFFIX}/tkcon/pkgIndex.tcl
install icons/tkcon-small48.png -Dm644 $PKG/usr/share/icons/tkcon-icon.png
mkdir -p $PKG/usr/bin
-( cd $PKG/usr/bin ; ln -s ../lib/tkcon/tkcon.tcl tkcon )
+( cd $PKG/usr/bin ; ln -s ../lib${LIBDIRSUFFIX}/tkcon/tkcon.tcl tkcon )
-# install pregenerated man pages
-cp -r $CWD/man $PKG/usr/man;
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+# if dtplite tool is installed (tcllib package), generate man pages
+if [ -x /usr/bin/dtplite ]; then
+ mkdir -p $PKG/usr/man/mann $PKG/usr/man/man5 $PKG/usr/man/man1
+ dtplite -o $PKG/usr/man/mann/dump.n nroff docs/dump.n.man
+ dtplite -o $PKG/usr/man/mann/idebug.n nroff docs/idebug.n.man
+ dtplite -o $PKG/usr/man/mann/observe.n nroff docs/observe.n.man
+ dtplite -o $PKG/usr/man/man1/tkcon.1 nroff docs/tkcon.1.man
+ dtplite -o $PKG/usr/man/mann/tkcon.n nroff docs/tkcon.n.man
+ dtplite -o $PKG/usr/man/man5/tkconrc.5 nroff docs/tkconrc.5.man
+ find $PKG/usr/man -type f -exec gzip -9 {} \;
+ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html/docs
cp -a \
README.txt docs/license.terms \
- $PKG/usr/doc/$PRGNAM-$VERSION
+$PKG/usr/doc/$PRGNAM-$VERSION
cp -a docs/*.html docs/demopic.png docs/style.css $PKG/usr/doc/$PRGNAM-$VERSION/html/docs
cp -a index.html $PKG/usr/doc/$PRGNAM-$VERSION/html/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild