diff options
author | Alexander Verbovetsky <alik@ejik.org> | 2019-07-30 22:33:44 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-07-30 22:33:44 +0700 |
commit | 29f8b63af205347a302d4106529264654ab81458 (patch) | |
tree | 49dd85a563ad4747d58cb708274df3ab0dee08f6 | |
parent | 6b9bdc900fc6e1eab32f524e0cfce38871c24d25 (diff) | |
download | slackbuilds-29f8b63af205347a302d4106529264654ab81458.tar.gz |
office/calibre-bin: Added (Ebook manager).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | office/calibre-bin/README | 7 | ||||
-rw-r--r-- | office/calibre-bin/calibre-bin.SlackBuild | 91 | ||||
-rw-r--r-- | office/calibre-bin/calibre-bin.info | 10 | ||||
-rw-r--r-- | office/calibre-bin/calibre-ebook-edit.desktop | 10 | ||||
-rw-r--r-- | office/calibre-bin/calibre-gui.desktop | 10 | ||||
-rw-r--r-- | office/calibre-bin/calibre-viewer.desktop | 10 | ||||
-rw-r--r-- | office/calibre-bin/doinst.sh | 13 | ||||
-rw-r--r-- | office/calibre-bin/slack-desc | 19 |
8 files changed, 170 insertions, 0 deletions
diff --git a/office/calibre-bin/README b/office/calibre-bin/README new file mode 100644 index 0000000000..6266cbab06 --- /dev/null +++ b/office/calibre-bin/README @@ -0,0 +1,7 @@ +Calibre is a powerful and easy to use e-book manager. It allows to do +nearly everything and it takes things a step beyond normal e-book +software. It's also completely free and open source and great for both +casual users and computer experts. + +This script repackage the official binary tarball that includes all its +dependencies. diff --git a/office/calibre-bin/calibre-bin.SlackBuild b/office/calibre-bin/calibre-bin.SlackBuild new file mode 100644 index 0000000000..7175f509fa --- /dev/null +++ b/office/calibre-bin/calibre-bin.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for calibre-bin + +# Copyright 2019, Alexander Verbovetsky, Moscow, Russia +# 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. + +PRGNAM=calibre-bin +VERSION=${VERSION:-3.46.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $PKG +mkdir -p opt/calibre usr/{share/zsh/site-functions,bin} +tar xvf $CWD/${PRGNAM%-bin}-$VERSION-$ARCH.txz -C opt/calibre +opt/calibre/calibre_postinstall --root=usr + +cd usr/bin +for f in $(find . -maxdepth 1 -type l); do + ln -sf "/opt/calibre/${f:2}" . +done +rm calibre-uninstall +cd ../.. + +mkdir -p usr/share/icons/hicolor/{16x16,32x32,48x48,64x64,128x128,256x256}/apps +cp -a opt/calibre/resources/images/{lt,tweak,viewer}.png \ + usr/share/icons/hicolor/256x256/apps +for s in 16 32 48 64 128; do + convert opt/calibre/resources/images/lt.png -resize ${s}x${s} \ + usr/share/icons/hicolor/${s}x${s}/apps/${PRGNAM%-bin}-gui.png + convert opt/calibre/resources/images/viewer.png -resize ${s}x${s} \ + usr/share/icons/hicolor/${s}x${s}/apps/${PRGNAM%-bin}-viewer.png + convert opt/calibre/resources/images/tweak.png -resize ${s}x${s} \ + usr/share/icons/hicolor/${s}x${s}/apps/${PRGNAM%-bin}-ebook-edit.png +done + +mkdir -p usr/share/applications +cp -a $CWD/calibre-{ebook-edit,viewer,gui}.desktop usr/share/applications/ + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +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 usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p install +cat $CWD/slack-desc > install/slack-desc +cat $CWD/doinst.sh > install/doinst.sh + +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/office/calibre-bin/calibre-bin.info b/office/calibre-bin/calibre-bin.info new file mode 100644 index 0000000000..1b125c732e --- /dev/null +++ b/office/calibre-bin/calibre-bin.info @@ -0,0 +1,10 @@ +PRGNAM="calibre-bin" +VERSION="3.46.0" +HOMEPAGE="https://calibre-ebook.com" +DOWNLOAD="https://download.calibre-ebook.com/3.46.0/calibre-3.46.0-i686.txz" +MD5SUM="8a06ebbf808bf3e12d5ca3ad2235a8e1" +DOWNLOAD_x86_64="https://download.calibre-ebook.com/3.46.0/calibre-3.46.0-x86_64.txz" +MD5SUM_x86_64="1e4a175d99e4da2a16b8c10fa9cf9b18" +REQUIRES="" +MAINTAINER="Alexander Verbovetsky" +EMAIL="alik@ejik.org" diff --git a/office/calibre-bin/calibre-ebook-edit.desktop b/office/calibre-bin/calibre-ebook-edit.desktop new file mode 100644 index 0000000000..afcebf7333 --- /dev/null +++ b/office/calibre-bin/calibre-ebook-edit.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=E-book Editor +GenericName=Editor for E-books +Comment=Edit E-books in various formats +TryExec=ebook-edit +Exec=ebook-edit --detach %f +Icon=calibre-ebook-edit +Categories=Office; diff --git a/office/calibre-bin/calibre-gui.desktop b/office/calibre-bin/calibre-gui.desktop new file mode 100644 index 0000000000..c89ad697b4 --- /dev/null +++ b/office/calibre-bin/calibre-gui.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=calibre +GenericName=E-book library management +Comment=E-book library management: Convert, view, share, catalogue all your e-books +TryExec=calibre +Exec=calibre --detach %F +Icon=calibre-gui +Categories=Office; diff --git a/office/calibre-bin/calibre-viewer.desktop b/office/calibre-bin/calibre-viewer.desktop new file mode 100644 index 0000000000..d90b7fd648 --- /dev/null +++ b/office/calibre-bin/calibre-viewer.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=E-book Viewer +GenericName=Viewer for E-books +Comment=Viewer for E-books in all the major formats +TryExec=ebook-viewer +Exec=ebook-viewer --detach %f +Icon=calibre-viewer +Categories=Office;Graphics;Viewer; diff --git a/office/calibre-bin/doinst.sh b/office/calibre-bin/doinst.sh new file mode 100644 index 0000000000..aea0f894eb --- /dev/null +++ b/office/calibre-bin/doinst.sh @@ -0,0 +1,13 @@ +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/calibre-bin/slack-desc b/office/calibre-bin/slack-desc new file mode 100644 index 0000000000..5cb50ffed1 --- /dev/null +++ b/office/calibre-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------------------------------------------------------| +calibre-bin: calibre-bin (Ebook manager) +calibre-bin: +calibre-bin: Calibre is a powerful and easy to use e-book manager. It allows to do +calibre-bin: nearly everything and it takes things a step beyond normal e-book +calibre-bin: software. It's also completely free and open source and great for both +calibre-bin: casual users and computer experts. +calibre-bin: +calibre-bin: This is a repackaging of the official binary tarball that includes all +calibre-bin: its dependencies. +calibre-bin: +calibre-bin: Homepage: https://calibre-ebook.com |