diff options
author | Andrzej Telszewski <atelszewski@gmail.com> | 2020-10-09 09:52:26 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-10-10 10:18:48 +0700 |
commit | ee543c4264e55a62767230374e6c984cc6473734 (patch) | |
tree | 012fa77a21a7226c3911f2356c0f2f474f92d642 /office/ghostwriter | |
parent | d97909a58a4e13e5bc9962d2d00b031c20e85d7c (diff) |
office/ghostwriter: Added (distraction-free Markdown editor)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/ghostwriter')
-rw-r--r-- | office/ghostwriter/README | 13 | ||||
-rw-r--r-- | office/ghostwriter/doinst.sh | 13 | ||||
-rw-r--r-- | office/ghostwriter/ghostwriter.SlackBuild | 96 | ||||
-rw-r--r-- | office/ghostwriter/ghostwriter.info | 10 | ||||
-rw-r--r-- | office/ghostwriter/slack-desc | 19 |
5 files changed, 151 insertions, 0 deletions
diff --git a/office/ghostwriter/README b/office/ghostwriter/README new file mode 100644 index 0000000000000..b3755370a4b3b --- /dev/null +++ b/office/ghostwriter/README @@ -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. diff --git a/office/ghostwriter/doinst.sh b/office/ghostwriter/doinst.sh new file mode 100644 index 0000000000000..aea0f894eb32b --- /dev/null +++ b/office/ghostwriter/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/ghostwriter/ghostwriter.SlackBuild b/office/ghostwriter/ghostwriter.SlackBuild new file mode 100644 index 0000000000000..5abab5fafe388 --- /dev/null +++ b/office/ghostwriter/ghostwriter.SlackBuild @@ -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} diff --git a/office/ghostwriter/ghostwriter.info b/office/ghostwriter/ghostwriter.info new file mode 100644 index 0000000000000..e2471bb7e672f --- /dev/null +++ b/office/ghostwriter/ghostwriter.info @@ -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" diff --git a/office/ghostwriter/slack-desc b/office/ghostwriter/slack-desc new file mode 100644 index 0000000000000..a710c6fd2b2e6 --- /dev/null +++ b/office/ghostwriter/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------------------------------------------------------| +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: |