diff options
author | Brandon Pribula <b.pribs11@gmail.com> | 2022-05-04 08:53:15 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-05-07 13:59:33 +0700 |
commit | 558914cff071b8e7a22e239de7296985c3dd4654 (patch) | |
tree | 999f6c30eed7ea0b4d84473f1996d82609af4484 | |
parent | 2d558622be1dd3fb9db187cbe68fa3821894baa4 (diff) | |
download | slackbuilds-558914cff071b8e7a22e239de7296985c3dd4654.tar.gz |
office/featherpad: Added (text editor)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | office/featherpad/README | 41 | ||||
-rw-r--r-- | office/featherpad/doinst.sh | 13 | ||||
-rw-r--r-- | office/featherpad/featherpad.SlackBuild | 120 | ||||
-rw-r--r-- | office/featherpad/featherpad.info | 10 | ||||
-rw-r--r-- | office/featherpad/slack-desc | 19 |
5 files changed, 203 insertions, 0 deletions
diff --git a/office/featherpad/README b/office/featherpad/README new file mode 100644 index 0000000000..915db8801b --- /dev/null +++ b/office/featherpad/README @@ -0,0 +1,41 @@ +FeatherPad (by Pedram Pourang, a.k.a. Tsu Jan) is a lightweight Qt +plain-text editor for Linux. It is independent of any desktop +environment. Some of the features include: + + Drag-and-drop support, including tab detachment and attachment. + X11 virtual desktop awareness + (using tabs on current desktop but opening a new window on another). + An optionally permanent search-bar with a different search + entry for each tab. + Instant highlighting of found matches when searching. + A docked window for text replacement. + Support for showing line numbers and jumping to a specific line. + Optional selection highlighting. + Automatic detection of text encoding as far as possible and + optional saving with encoding. + Syntax highlighting for common programming languages. + Ability to open URLs with appropriate applications. + Session management. + Side-pane mode. + Auto-saving. + Spell checking with Hunspell. + Printing. + Text zooming. + Appropriate but non-interrupting prompts. + +FeatherPad was written in GTK+ at first, then ported to Qt with more +features. + +Note: + +FeatherPad can be compiled without X11 support: + + NOX11=on ./featherpad.SlackBuild + +the result will have all features except for virtual desktop awareness +and tab DND. On Linux, FeatherPad works under Wayland and you don't +need to disable its X11 support for that. + +To compile with X11 support: + + ./featherpad.Slackbuild diff --git a/office/featherpad/doinst.sh b/office/featherpad/doinst.sh new file mode 100644 index 0000000000..aea0f894eb --- /dev/null +++ b/office/featherpad/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/featherpad/featherpad.SlackBuild b/office/featherpad/featherpad.SlackBuild new file mode 100644 index 0000000000..ec64482f5e --- /dev/null +++ b/office/featherpad/featherpad.SlackBuild @@ -0,0 +1,120 @@ +#!/bin/bash + +# Slackware build script for FeatherPad + +# Copyright 2022 Brandon Pribula, BC Canada +# 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. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=featherpad +VERSION=${VERSION:-1.2.0} +SRCNAM=FeatherPad +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} + +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 +mv $SRCNAM-$VERSION $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# FeatherPad can be built without X11 support by assigning +# 'on' to the NOX11 environment variable. All other values +# or no value at all will build with X11 support. +if [ "$NOX11" = "on" ]; then + echo "" + echo "Building WITHOUT X11 support..." + echo "" +else + NOX11=off + echo "" + echo "Building WITH X11 support..." + echo "" +fi + +mkdir -p build +cd build +cmake \ + -DWITHOUT_X11="$NOX11" \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DCMAKE_BUILD_TYPE:STRING=Release .. + make + make install DESTDIR=$PKG +cd .. + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING ChangeLog NEWS README.md $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/office/featherpad/featherpad.info b/office/featherpad/featherpad.info new file mode 100644 index 0000000000..40112c780e --- /dev/null +++ b/office/featherpad/featherpad.info @@ -0,0 +1,10 @@ +PRGNAM="featherpad" +VERSION="1.2.0" +HOMEPAGE="https://github.com/tsujan/FeatherPad" +DOWNLOAD="https://github.com/tsujan/FeatherPad/archive/refs/tags/V1.2.0/featherpad-1.2.0.tar.gz" +MD5SUM="bc46145ed71d6c49e87a265cb568a3f8" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Brandon Pribula" +EMAIL="b.pribs11@gmail.com" diff --git a/office/featherpad/slack-desc b/office/featherpad/slack-desc new file mode 100644 index 0000000000..5f40ed1b3e --- /dev/null +++ b/office/featherpad/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------------------------------------------------------| +featherpad: featherpad (text editor) +featherpad: +featherpad: A lightweight Qt plain-text editor for Linux. It's independent of +featherpad: any desktop environment. It was written in GTK+ at first, then ported +featherpad: to Qt with more features. +featherpad: +featherpad: +featherpad: +featherpad: +featherpad: Homepage: https://github.com/tsujan/FeatherPad +featherpad: |