diff options
Diffstat (limited to 'graphics/mcomix')
-rw-r--r-- | graphics/mcomix/README | 12 | ||||
-rw-r--r-- | graphics/mcomix/doinst.sh | 9 | ||||
-rw-r--r-- | graphics/mcomix/mcomix.SlackBuild | 98 | ||||
-rw-r--r-- | graphics/mcomix/mcomix.info | 12 | ||||
-rw-r--r-- | graphics/mcomix/slack-desc | 19 |
5 files changed, 150 insertions, 0 deletions
diff --git a/graphics/mcomix/README b/graphics/mcomix/README new file mode 100644 index 0000000000..4ee2c79199 --- /dev/null +++ b/graphics/mcomix/README @@ -0,0 +1,12 @@ +mcomix (comic book reader) + +MComix is a user-friendly, customizable image viewer. It is +specifically designed to handle comic books (both Western comics and +manga) and supports a variety of container formats (including CBR, +CBZ, CB7, CBT, LHA and PDF). + +Optional runtime dependencies: + +- unrar (for .cbr support) +- p7zip (for .cb7 support) +- mupdf (for .pdf support) diff --git a/graphics/mcomix/doinst.sh b/graphics/mcomix/doinst.sh new file mode 100644 index 0000000000..3e5691a052 --- /dev/null +++ b/graphics/mcomix/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/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 usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/graphics/mcomix/mcomix.SlackBuild b/graphics/mcomix/mcomix.SlackBuild new file mode 100644 index 0000000000..8fb34f22ef --- /dev/null +++ b/graphics/mcomix/mcomix.SlackBuild @@ -0,0 +1,98 @@ +#!/bin/bash + +# Slackware build script for mcomix + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20240207 bkw: update for v3.1.0. +# 20231124 bkw: update for v3.0.0. +# 20230905 bkw: update for v2.3.0 +# 20230822 bkw: update for v2.2.1. +# 20230625 bkw: update for v2.1.1. + +# Note to self: it would be possible to use bsdtar in place of unrar +# and p7zip, but it would require too much patching. Better to talk +# upstream into adding it as an option. + +# 20230111 bkw: This is an all-new SlackBuild for mcomix. We removed +# mcomix from SBo in May of 2020 because it needed python2 libraries +# that no longer existed in Slackware. It was replaced with mcomix3, +# a python3 fork of mcomix. Since then, the original mcomix has been +# ported to python3, and mcomix3 development has ended. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=mcomix +VERSION=${VERSION:-3.1.0} +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} + +# No need for SLKCFLAGS (no C code here). No LIBDIRSUFFIX either, +# setup.py is smart enough to choose lib or lib64 as needed. + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +# Bad tarball permissions (every file is +x), please do not "fix" this +# by reverting to template. +find . -type f -a -exec chmod 644 {} + -o \ + -type d -a -exec chmod 755 {} + + +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +export PYTHONPATH=/opt/python$PYVER/site-packages +python3 -m build --wheel --no-isolation +python3 -m installer --destdir "$PKG" dist/*.whl + +# 20231124 bkw: 3.0.0 ships this stuff but doesn't install it like +# the 2.x series did. +mv share/man man +cp -a share man $PKG/usr + +# 20230905 bkw: 2.2.1 has good icons. The ones in 2.3.0 are wrong-sized, +# e.g. the "32x32" one is actually 32x24. So I made a tarball of the old +# icons... which didn't include the giant 256x256 one. +# 20231124 bkw: 3.0.0 icons are still b0rked. +rm -rf $PKG/usr/share/icons/hicolor/256x256 +( cd $PKG ; tar xvf $CWD/mcomix-good-icons.tar.xz ) +mkdir -p $PKG/usr/share/pixmaps + +# 20230905 bkw: old-style icon. +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a COPYING README* ChangeLog* $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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 diff --git a/graphics/mcomix/mcomix.info b/graphics/mcomix/mcomix.info new file mode 100644 index 0000000000..c50562ab6d --- /dev/null +++ b/graphics/mcomix/mcomix.info @@ -0,0 +1,12 @@ +PRGNAM="mcomix" +VERSION="3.1.0" +HOMEPAGE="https://sourceforge.net/projects/mcomix/" +DOWNLOAD="https://downloads.sourceforge.net/project/mcomix/MComix-3.1.0/mcomix-3.1.0.tar.gz \ + https://slackware.uk/~urchlay/src/mcomix-good-icons.tar.xz" +MD5SUM="4d55265ebd28f24a86a7e88ef2d84353 \ + dea5da6a93d316d3c4aad92ec40d1be1" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python3-setuptools-opt" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/graphics/mcomix/slack-desc b/graphics/mcomix/slack-desc new file mode 100644 index 0000000000..a049e626a9 --- /dev/null +++ b/graphics/mcomix/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------------------------------------------------------| +mcomix: mcomix (comic book reader) +mcomix: +mcomix: MComix is a user-friendly, customizable image viewer. It is +mcomix: specifically designed to handle comic books (both Western comics and +mcomix: manga) and supports a variety of container formats (including CBR, +mcomix: CBZ, CB7, CBT, LHA and PDF). +mcomix: +mcomix: +mcomix: +mcomix: +mcomix: |