diff --git a/office/csbooks-bin/README b/office/csbooks-bin/README new file mode 100644 index 0000000000..725d56a3df --- /dev/null +++ b/office/csbooks-bin/README @@ -0,0 +1 @@ +csbooks diff --git a/office/csbooks-bin/csbooks b/office/csbooks-bin/csbooks new file mode 100644 index 0000000000..969117dc2d --- /dev/null +++ b/office/csbooks-bin/csbooks @@ -0,0 +1,6 @@ +#!/bin/bash + +#ELECTRON=$(locate electron | grep "/usr/bin") +cd /opt/csBooks/resources || exit +#"$ELECTRON" +electron /opt/csBooks/resources/app.asar diff --git a/office/csbooks-bin/csbooks-bin.SlackBuild b/office/csbooks-bin/csbooks-bin.SlackBuild new file mode 100644 index 0000000000..50792d96a5 --- /dev/null +++ b/office/csbooks-bin/csbooks-bin.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/bash + +# Slackware build script for csbooks + +# Copyright 2025 Ioannis Anagnostakis GR +# 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. + + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=csbooks-bin +VERSION=${VERSION:-8.5.0} +SRCNAM=csBooks_"$VERSION"_amd64 +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 + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT + + +ar x $SRCNAM.deb +rm debian-binary control.tar.?z +tar -xJf data.tar.xz -C "$PKG" 2>/dev/null || \ +tar --use-compress-program=unzstd -xf data.tar.zst -C "$PKG" 2>/dev/null || \ +tar -xzf data.tar.gz -C "$PKG" 2>/dev/null || \ +{ echo "No valid archive found!"; exit 1; } + +find "$PKG" -type d -exec chmod 0755 {} + + + +sed -i 's|^Exec=/opt/csBooks/csbooks %U|Exec=csbooks|' "$PKG"/usr/share/applications/csbooks.desktop || exit +chmod 0644 $PKG/usr/share/applications/csbooks.desktop + +mkdir -p "$PKG"/usr/bin +cp "$CWD/csbooks" "$PKG"/usr/bin +chmod +x "$PKG"/usr/bin/csbooks + +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 +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cp -r $PKG/usr/share/doc/${PRGNAM%-bin}/* $PKG/usr/doc/$PRGNAM-$VERSION/ +rm -rf $PKG/usr/share/doc + +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 diff --git a/office/csbooks-bin/csbooks-bin.info b/office/csbooks-bin/csbooks-bin.info new file mode 100644 index 0000000000..df22cad5c4 --- /dev/null +++ b/office/csbooks-bin/csbooks-bin.info @@ -0,0 +1,10 @@ +PRGNAM="csbooks-bin" +VERSION="8.5.0" +HOMEPAGE="https://caesiumstudio.com/csbooks" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/caesiumstudio/csBooks-updates/releases/download/latest/csBooks_8.5.0_amd64.deb" +MD5SUM_x86_64="fa27a826b32dbcc431712426220315c2" +REQUIRES="electron" +MAINTAINER="Ioannis Anagnostakis" +EMAIL="rizitis@gmail.com" diff --git a/office/csbooks-bin/doinst.sh b/office/csbooks-bin/doinst.sh new file mode 100644 index 0000000000..23e93c7571 --- /dev/null +++ b/office/csbooks-bin/doinst.sh @@ -0,0 +1,15 @@ +( cd opt/csBooks/ ; chmod 4755 chrome-sandbox ) + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/office/csbooks-bin/slack-desc b/office/csbooks-bin/slack-desc new file mode 100644 index 0000000000..9885ae844b --- /dev/null +++ b/office/csbooks-bin/slack-desc @@ -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------------------------------------------------------| +csbooks-bin: csbooks-bin (epub, pdf, mobi book and djvu reader) +csbooks-bin: +csbooks-bin: csBooks is epub, pdf, mobi book and djvu reader. +csbooks-bin: It solves your problems if you need ebook manager, +csbooks-bin: library manager on linux, best comic book reader, +csbooks-bin: cbz file reader, cbr file reader etc. +csbooks-bin: +csbooks-bin: +csbooks-bin: +csbooks-bin: HomePage: https://caesiumstudio.com/csbooks +csbooks-bin: