mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
office/convertlit: Add man page, use SLKCFLAGS.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
06c4338844
commit
9a2e79831e
3 changed files with 128 additions and 9 deletions
|
@ -11,6 +11,9 @@
|
||||||
# the package name, but not the actual executable. I've renamed the binary
|
# the package name, but not the actual executable. I've renamed the binary
|
||||||
# to convertlit to keep things SFW.
|
# to convertlit to keep things SFW.
|
||||||
|
|
||||||
|
# 20210926 bkw: BUILD=4
|
||||||
|
# - actually use SLKCFLAGS.
|
||||||
|
# - add man page for lit2epub.
|
||||||
# 20170131 bkw: BUILD=3, REQUIRES was ltm, now libtommath
|
# 20170131 bkw: BUILD=3, REQUIRES was ltm, now libtommath
|
||||||
|
|
||||||
cd $(dirname $0) ; CWD=$(pwd)
|
cd $(dirname $0) ; CWD=$(pwd)
|
||||||
|
@ -29,9 +32,6 @@ if [ -z "$ARCH" ]; then
|
||||||
esac
|
esac
|
||||||
fi
|
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
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -68,11 +68,8 @@ mkdir -p $SRCNAME
|
||||||
cd $SRCNAME
|
cd $SRCNAME
|
||||||
unzip $CWD/$SRCNAME.zip
|
unzip $CWD/$SRCNAME.zip
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find -L . \
|
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
|
||||||
-exec chmod 755 {} \; -o \
|
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
||||||
-exec chmod 644 {} \;
|
|
||||||
|
|
||||||
# use system-installed ltm
|
# use system-installed ltm
|
||||||
sed -i \
|
sed -i \
|
||||||
|
@ -83,6 +80,9 @@ sed -i \
|
||||||
# update the help message to reflect the name change
|
# update the help message to reflect the name change
|
||||||
sed -i '/^"/s,cl.t,'$PRGNAM,g cl?t$SRCVER/cl?t.c
|
sed -i '/^"/s,cl.t,'$PRGNAM,g cl?t$SRCVER/cl?t.c
|
||||||
|
|
||||||
|
# 20210926 bkw: SLKCFLAGS weren't being used. Derp.
|
||||||
|
sed -i "s,-O[23],$SLKCFLAGS," */Makefile
|
||||||
|
|
||||||
make -C lib
|
make -C lib
|
||||||
make -C cl?t$SRCVER
|
make -C cl?t$SRCVER
|
||||||
|
|
||||||
|
@ -92,9 +92,11 @@ install -s -m0755 cl?t$SRCVER/cl?t $PKG/usr/bin/$PRGNAM
|
||||||
# handy wrapper script
|
# handy wrapper script
|
||||||
install -m0755 $CWD/lit2epub $PKG/usr/bin
|
install -m0755 $CWD/lit2epub $PKG/usr/bin
|
||||||
|
|
||||||
# man page borrowed from Debian
|
# convertlit man page borrowed from Debian, lit2epub written by
|
||||||
|
# SlackBuild author.
|
||||||
mkdir -p $PKG/usr/man/man1
|
mkdir -p $PKG/usr/man/man1
|
||||||
gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
|
gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
|
||||||
|
gzip -9c < $CWD/lit2epub.1 > $PKG/usr/man/man1/lit2epub.1.gz
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
sed 's,\r,,' cl?t$SRCVER/COPYING > $PKG/usr/doc/$PRGNAM-$VERSION/COPYING
|
sed 's,\r,,' cl?t$SRCVER/COPYING > $PKG/usr/doc/$PRGNAM-$VERSION/COPYING
|
||||||
|
|
65
office/convertlit/lit2epub.1
Normal file
65
office/convertlit/lit2epub.1
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
.\" Man page generated from reStructuredText.
|
||||||
|
.
|
||||||
|
.
|
||||||
|
.nr rst2man-indent-level 0
|
||||||
|
.
|
||||||
|
.de1 rstReportMargin
|
||||||
|
\\$1 \\n[an-margin]
|
||||||
|
level \\n[rst2man-indent-level]
|
||||||
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
|
-
|
||||||
|
\\n[rst2man-indent0]
|
||||||
|
\\n[rst2man-indent1]
|
||||||
|
\\n[rst2man-indent2]
|
||||||
|
..
|
||||||
|
.de1 INDENT
|
||||||
|
.\" .rstReportMargin pre:
|
||||||
|
. RS \\$1
|
||||||
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
||||||
|
. nr rst2man-indent-level +1
|
||||||
|
.\" .rstReportMargin post:
|
||||||
|
..
|
||||||
|
.de UNINDENT
|
||||||
|
. RE
|
||||||
|
.\" indent \\n[an-margin]
|
||||||
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
|
.nr rst2man-indent-level -1
|
||||||
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||||
|
..
|
||||||
|
.TH "LIT2EPUB" 1 "2021-09-26" "20160803" "SlackBuilds.org"
|
||||||
|
.SH NAME
|
||||||
|
lit2epub \- convert a DRM1 .lit file to .epub
|
||||||
|
.\" RST source for lit2epub(1) man page. Convert with:
|
||||||
|
.
|
||||||
|
.\" rst2man.py lit2epub.rst > lit2epub.1
|
||||||
|
.
|
||||||
|
.\" rst2man.py comes from the SBo development/docutils package.
|
||||||
|
.
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.sp
|
||||||
|
lit2epub \fBinput.lit\fP \fI[ output.epub ]\fP
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.sp
|
||||||
|
\fBlit2epub\fP is a wrapper script that uses \fBconvertlit\fP(1) and \fBzip\fP(1) to
|
||||||
|
convert a DRM1 .lit ebook file to an .epub.
|
||||||
|
.sp
|
||||||
|
Default output file is written to the current directory, named after the
|
||||||
|
input filename with the .lit or .LIT extension changed to .epub, or the
|
||||||
|
input filename with .epub appended, if there is no .lit extension.
|
||||||
|
.sp
|
||||||
|
Use \- for the output file, to output to stdout.
|
||||||
|
.sp
|
||||||
|
Exit status is 0 on success, non\-zero on failure.
|
||||||
|
.sp
|
||||||
|
If you need to convert a non\-DRM1 .lit file, use convertlit to downconvert
|
||||||
|
to DRM1 first.
|
||||||
|
.SH AUTHOR
|
||||||
|
.sp
|
||||||
|
\fBlit2epub\fP and this man page were written for the SlackBuilds.org
|
||||||
|
project by B. Watson, and are licensed under the WTFPL.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.sp
|
||||||
|
\fBconvertlit\fP(1), \fBzip\fP(1)
|
||||||
|
.\" Generated by docutils manpage writer.
|
||||||
|
.
|
52
office/convertlit/lit2epub.rst
Normal file
52
office/convertlit/lit2epub.rst
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
.. RST source for lit2epub(1) man page. Convert with:
|
||||||
|
.. rst2man.py lit2epub.rst > lit2epub.1
|
||||||
|
.. rst2man.py comes from the SBo development/docutils package.
|
||||||
|
|
||||||
|
.. |version| replace:: 20160803
|
||||||
|
.. |date| date::
|
||||||
|
|
||||||
|
========
|
||||||
|
lit2epub
|
||||||
|
========
|
||||||
|
|
||||||
|
---------------------------------
|
||||||
|
convert a DRM1 .lit file to .epub
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
:Manual section: 1
|
||||||
|
:Manual group: SlackBuilds.org
|
||||||
|
:Date: |date|
|
||||||
|
:Version: |version|
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
========
|
||||||
|
|
||||||
|
lit2epub **input.lit** *[ output.epub ]*
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
===========
|
||||||
|
|
||||||
|
**lit2epub** is a wrapper script that uses **convertlit**\(1) and **zip**\(1) to
|
||||||
|
convert a DRM1 .lit ebook file to an .epub.
|
||||||
|
|
||||||
|
Default output file is written to the current directory, named after the
|
||||||
|
input filename with the .lit or .LIT extension changed to .epub, or the
|
||||||
|
input filename with .epub appended, if there is no .lit extension.
|
||||||
|
|
||||||
|
Use - for the output file, to output to stdout.
|
||||||
|
|
||||||
|
Exit status is 0 on success, non-zero on failure.
|
||||||
|
|
||||||
|
If you need to convert a non-DRM1 .lit file, use convertlit to downconvert
|
||||||
|
to DRM1 first.
|
||||||
|
|
||||||
|
AUTHOR
|
||||||
|
======
|
||||||
|
|
||||||
|
**lit2epub** and this man page were written for the SlackBuilds.org
|
||||||
|
project by B. Watson, and are licensed under the WTFPL.
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
========
|
||||||
|
|
||||||
|
**convertlit**\(1), **zip**\(1)
|
Loading…
Reference in a new issue