diff options
author | B. Watson <yalhcru@gmail.com> | 2022-01-11 12:20:32 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-01-17 09:03:29 +0700 |
commit | d75a925a5e25a2b67864159419a54a42af332bdf (patch) | |
tree | 5b8b190d67ce76e15f1bcb92ae2f8a80ef7f2c76 /graphics | |
parent | ebde9c565dc9ec910055f8bda1174451e7e602ad (diff) | |
download | slackbuilds-d75a925a5e25a2b67864159419a54a42af332bdf.tar.gz |
graphics/mcomix3: Added (comic book reader)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/mcomix3/README | 13 | ||||
-rw-r--r-- | graphics/mcomix3/doinst.sh | 15 | ||||
-rw-r--r-- | graphics/mcomix3/git2tarxz.sh | 44 | ||||
-rw-r--r-- | graphics/mcomix3/mcomix3.SlackBuild | 107 | ||||
-rw-r--r-- | graphics/mcomix3/mcomix3.info | 10 | ||||
-rw-r--r-- | graphics/mcomix3/slack-desc | 19 |
6 files changed, 208 insertions, 0 deletions
diff --git a/graphics/mcomix3/README b/graphics/mcomix3/README new file mode 100644 index 0000000000..5a531628f2 --- /dev/null +++ b/graphics/mcomix3/README @@ -0,0 +1,13 @@ +mcomix3 (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). MComix is a fork of Comix, and MComix3 is +a Python3 fork of MComix. + +Optional runtime dependencies: + +- unrar (for .cbr support) +- p7zip (for .cb7 support) +- mupdf (for .pdf support) diff --git a/graphics/mcomix3/doinst.sh b/graphics/mcomix3/doinst.sh new file mode 100644 index 0000000000..0254ea06d8 --- /dev/null +++ b/graphics/mcomix3/doinst.sh @@ -0,0 +1,15 @@ +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 + +if [ -e usr/share/glib-2.0/schemas ]; then + if [ -x /usr/bin/glib-compile-schemas ]; then + /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1 + fi +fi diff --git a/graphics/mcomix3/git2tarxz.sh b/graphics/mcomix3/git2tarxz.sh new file mode 100644 index 0000000000..9271c6cd0e --- /dev/null +++ b/graphics/mcomix3/git2tarxz.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Create source tarball from git repo, with generated version +# number. + +# Note that this script doesn't need to be run as root. It does +# need to be able to write to the current directory it's run from. + +# Takes one optional argument, which is the commit or tag to create +# a tarball of. With no arg, HEAD is used. + +PRGNAM=mcomix3 +CLONE_URL=https://github.com/multiSnow/mcomix3 + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +if [ "$1" != "" ]; then + git reset --hard "$1" || exit 1 +fi + +GIT_SHA=$( git rev-parse --short HEAD ) + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +VERSION=${DATE}_${GIT_SHA} + +rm -rf .git +find . -name .gitignore -print0 | xargs -0 rm -f + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +echo +echo "Created tarball: $PRGNAM-$VERSION.tar.xz" +echo "VERSION=$VERSION" diff --git a/graphics/mcomix3/mcomix3.SlackBuild b/graphics/mcomix3/mcomix3.SlackBuild new file mode 100644 index 0000000000..c1e07dccd0 --- /dev/null +++ b/graphics/mcomix3/mcomix3.SlackBuild @@ -0,0 +1,107 @@ +#!/bin/bash + +# Slackware build script for mcomix3 + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=mcomix3 +VERSION=${VERSION:-20211016_483f4b3} +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 + +CWD=$(pwd) +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 +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# README.rst says not to use setup.py, use installer.py instead. +# It looks like someone wrote 100 lines of python code that +# does the same thing as "cp -a $src $target" would do, but +# I guess when all you have is a hammer... +python3 installer.py --srcdir=mcomix --target=$PKG/usr/share + +# executables get symlinks. the .desktop and .thumbnailer files +# refer to these as "mcomix" and "comicthumb", with no absolute +# path and without the .py extension, so these are absolutely +# necessary (instead of just being convenient). +mkdir -p $PKG/usr/bin +ln -s ../share/mcomix/mcomixstarter.py $PKG/usr/bin/mcomix +ln -s ../share/mcomix/comicthumb.py $PKG/usr/bin/comicthumb + +# .desktop and icons don't get installed by installer.py +mkdir -p $PKG/usr/share/applications +cp -a mime/mcomix.desktop $PKG/usr/share/applications + +# symlink app icons, not move. it's not 100% clear to me whether the +# application uses them in their original location or not. +PKGHIC=$PKG/usr/share/icons/hicolor +for i in 16 22 24 32 48; do + px="${i}x${i}" + mkdir -p $PKGHIC/$px/{apps,mimetypes} + #cp -a mcomix/mcomix/images/$px/* $PKGHIC/$px/apps + ln -s ../../../../mcomix/mcomix/images/$px/mcomix.png $PKGHIC/$px/apps/mcomix.png + cp -a mime/icons/$px/* $PKGHIC/$px/mimetypes +done + +# mime stuff also needs manual install. +mkdir -p $PKG/usr/share/metainfo \ + $PKG/usr/share/glib-2.0/schemas \ + $PKG/usr/share/thumbnailers +cp -a mime/mcomix.appdata.xml $PKG/usr/share/metainfo +cp -a mime/comicbook.schemas $PKG/usr/share/glib-2.0/schemas +cp -a mime/comicthumb.thumbnailer $PKG/usr/share/thumbnailers + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* $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 diff --git a/graphics/mcomix3/mcomix3.info b/graphics/mcomix3/mcomix3.info new file mode 100644 index 0000000000..c46837b1ff --- /dev/null +++ b/graphics/mcomix3/mcomix3.info @@ -0,0 +1,10 @@ +PRGNAM="mcomix3" +VERSION="20211016_483f4b3" +HOMEPAGE="https://github.com/multiSnow/mcomix3" +DOWNLOAD="https://slackware.uk/~urchlay/src/mcomix3-20211016_483f4b3.tar.xz" +MD5SUM="30be909380290909ccf7e8b154fe3f78" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/graphics/mcomix3/slack-desc b/graphics/mcomix3/slack-desc new file mode 100644 index 0000000000..9aaf378214 --- /dev/null +++ b/graphics/mcomix3/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------------------------------------------------------| +mcomix3: mcomix3 (comic book reader) +mcomix3: +mcomix3: MComix is a user-friendly, customizable image viewer. It is +mcomix3: specifically designed to handle comic books (both Western comics and +mcomix3: manga) and supports a variety of container formats (including CBR, +mcomix3: CBZ, CB7, CBT, LHA and PDF). MComix is a fork of Comix, and MComix3 is +mcomix3: a Python3 fork of MComix. +mcomix3: +mcomix3: +mcomix3: +mcomix3: |