office/ghostwriter: Added (distraction-free Markdown editor)

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrzej Telszewski 2020-10-09 09:52:26 +01:00 committed by Willy Sudiarto Raharjo
parent d97909a58a
commit ee543c4264
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
5 changed files with 151 additions and 0 deletions

13
office/ghostwriter/README Normal file
View File

@ -0,0 +1,13 @@
ghostwriter is a distraction-free Markdown editor, featuring a full
screen mode and a clean interface. With Markdown, you can write now,
and format later.
Some of the features include:
- built-in and custom themes,
- live HTML preview,
- export to multiple formats,
- navigation with outline,
- focus and Hemingway modes,
- document and session statistics,
- drag and drop images.

View File

@ -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

View File

@ -0,0 +1,96 @@
#!/bin/sh
# Slackware build script for ghostwriter
# Copyright 2020 Andrzej Telszewski, Szczecin
# 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=ghostwriter
VERSION=${VERSION:-1.8.1}
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}
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.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-st,u+rwX,go-w+rX .
# Adjust docs location.
sed -i $PRGNAM.pro -e "s|man\.path.*$|man.path = /usr/man/man1|"
qmake-qt5 -r $PRGNAM.pro \
QMAKE_CFLAGS="$SLKCFLAGS" \
QMAKE_CXXFLAGS="$SLKCFLAGS" \
PREFIX=/usr
make
make install INSTALL_ROOT=$PKG
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
gzip -9 $PKG/usr/man/man1/$PRGNAM.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a {BUILD_MAC,CHANGELOG,CREDITS,README}.md COPYING $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:-tgz}

View File

@ -0,0 +1,10 @@
PRGNAM="ghostwriter"
VERSION="1.8.1"
HOMEPAGE="https://wereturtle.github.io/ghostwriter/"
DOWNLOAD="https://github.com/wereturtle/ghostwriter/archive/v1.8.1/ghostwriter-1.8.1.tar.gz"
MD5SUM="67f6b671a8e10bc91872fd65dea2b78f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="qt5"
MAINTAINER="Andrzej Telszewski"
EMAIL="atelszewski@gmail.com"

View File

@ -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------------------------------------------------------|
ghostwriter: ghostwriter (distraction-free Markdown editor)
ghostwriter:
ghostwriter: ghostwriter is a distraction-free Markdown editor, featuring a full
ghostwriter: screen mode and a clean interface. With Markdown, you can write now,
ghostwriter: and format later.
ghostwriter:
ghostwriter: Homepage: https://wereturtle.github.io/ghostwriter/
ghostwriter:
ghostwriter:
ghostwriter:
ghostwriter: