Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions academic/Booktab/Booktab.SlackBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/bin/bash

# Slackware build script for Booktab

# Copyright 2022-2026 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Maintained by Roberto Puzzanghera - <admin {at} sagredo [dot] eu>

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=Booktab
VERSION=${VERSION:-4.28.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi

TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# Abort build if architecture is not 64-bit.
if [ "$ARCH" != "x86_64" ]; then
echo "$ARCH is not supported."
exit 1
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
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir $PRGNAM-$VERSION
ar xv $CWD/${PRGNAM}Setup.deb data.tar.xz
tar xvf data.tar.xz -C $PRGNAM-$VERSION
rm -f data.tar.xz
ar xv $CWD/libjpeg-turbo8_2.0.3-0ubuntu1.20.04.3_amd64.deb data.tar.xz
tar xvf data.tar.xz -C $PRGNAM-$VERSION
rm -f data.tar.xz
cd $PRGNAM-$VERSION
chmod -R 755 usr/bin
chown -R root:root .

# Move stuff in /opt as we are repacking binaries
mv usr/lib/x86_64-linux-gnu/* usr/share/duDat/BooktabZ/
mkdir opt
mv usr/share/duDat/BooktabZ opt/
rm -fR usr/lib usr/share/{doc,lintian,duDat} usr/share/applications/booktab.desktop
echo "Categories=Qt;Education;" >> usr/share/applications/booktabz.desktop
sed -i "s|/usr/share/duDat|/opt|g" usr/bin/booktab usr/share/applications/booktabz.desktop

# make all *.so.* files executables
find . -type f -name "*.so.*" -exec chmod +x {} +
find . -type f -name "*.so" -exec chmod +x {} +

cp -a * $PKG/

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
12 changes: 12 additions & 0 deletions academic/Booktab/Booktab.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PRGNAM="Booktab"
VERSION="4.28.1"
HOMEPAGE="https://booktab.it"
DOWNLOAD="https://github.com/sagredo-dev/slackbuilds/raw/refs/heads/main/src/Booktab/BooktabSetup.deb \
https://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8-dev_2.0.3-0ubuntu1.20.04.3_amd64.deb"
MD5SUM="24b718eba57b67435c0fa076cc4ed508 \
6149b13602ab58bc64a199f1b3d26afc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Roberto Puzzanghera"
EMAIL="admin@sagredo.eu"
3 changes: 3 additions & 0 deletions academic/Booktab/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Booktab e' la piattaforma che ti permette di consultare tutti i tuoi
libri scolastici in versione multimediale e interattiva, direttamente
su tablet o su computer.
3 changes: 3 additions & 0 deletions academic/Booktab/doinst.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
19 changes: 19 additions & 0 deletions academic/Booktab/slack-desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.

|-----handy-ruler------------------------------------------------------|
Booktab: Booktab (ebook reader)
Booktab:
Booktab: Booktab e' la piattaforma che ti permette di consultare tutti i tuoi
Booktab: libri scolastici in versione multimediale e interattiva, direttamente
Booktab: su tablet o su computer.
Booktab:
Booktab: homepage: https://booktab.it
Booktab:
Booktab:
Booktab:
Booktab: