diff options
author | Philip van der Hoeven <philip@vd-hoeven.nl> | 2016-11-23 20:32:26 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-11-26 11:47:24 +0700 |
commit | 43d5330383178fd340dcda8dae190d5134d04cc4 (patch) | |
tree | 700aaf8304d09237a7df334484f15db1c2de8f79 | |
parent | 8085ca337ba8965167ca0b6bfe101e0e6d8d0bae (diff) | |
download | slackbuilds-43d5330383178fd340dcda8dae190d5134d04cc4.tar.gz |
system/terminix: Added (Tiling terminal emulator).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r-- | system/terminix/README | 5 | ||||
-rw-r--r-- | system/terminix/doinst.sh | 39 | ||||
-rw-r--r-- | system/terminix/slack-desc | 19 | ||||
-rw-r--r-- | system/terminix/terminix.SlackBuild | 98 | ||||
-rw-r--r-- | system/terminix/terminix.info | 10 | ||||
-rw-r--r-- | system/terminix/vte_terminix.sh | 65 |
6 files changed, 236 insertions, 0 deletions
diff --git a/system/terminix/README b/system/terminix/README new file mode 100644 index 0000000000..b36b5e84b3 --- /dev/null +++ b/system/terminix/README @@ -0,0 +1,5 @@ +Terminix is a tiling terminal emulator which uses the VTE GTK+ 3 widget. + +After installing please enable the profile script: +chmod +x /etc/profile.d/vte_terminix.sh +Otherwise Terminix will warn you about a configuration error on startup. diff --git a/system/terminix/doinst.sh b/system/terminix/doinst.sh new file mode 100644 index 0000000000..50a87a440d --- /dev/null +++ b/system/terminix/doinst.sh @@ -0,0 +1,39 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +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/system/terminix/slack-desc b/system/terminix/slack-desc new file mode 100644 index 0000000000..acf813212a --- /dev/null +++ b/system/terminix/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------------------------------------------------------| +terminix: terminix (Tiling terminal emulator) +terminix: +terminix: A tiling terminal emulator for Linux using GTK+ 3 +terminix: +terminix: +terminix: +terminix: +terminix: +terminix: +terminix: +terminix: diff --git a/system/terminix/terminix.SlackBuild b/system/terminix/terminix.SlackBuild new file mode 100644 index 0000000000..dbf05c12e7 --- /dev/null +++ b/system/terminix/terminix.SlackBuild @@ -0,0 +1,98 @@ +#!/bin/sh + +# Slackware build script for terminix + +# Copyright 2016 Philip van der Hoeven, Almere, The Netherlands +# 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=terminix +VERSION=${VERSION:-1.3.5} +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 . +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 {} \; + +# Remove suffixes from pkgconfig files +sed -i 's/gtkd-3$DC_SUFFIX/gtkd-3/g' configure.ac +sed -i 's/vted-3$DC_SUFFIX/vted-3/g' configure.ac + +./autogen.sh +./configure --prefix=/usr +make DC='dmd' DCFLAGS='-O -inline -release -version=StdLoggerDisableTrace' +make install DESTDIR=$PKG + +mkdir -p $PKG/etc/profile.d +cp $CWD/vte_terminix.sh $PKG/etc/profile.d + +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 \ + CREDITS.md LICENSE 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:-tgz} diff --git a/system/terminix/terminix.info b/system/terminix/terminix.info new file mode 100644 index 0000000000..738a0edc44 --- /dev/null +++ b/system/terminix/terminix.info @@ -0,0 +1,10 @@ +PRGNAM="terminix" +VERSION="1.3.5" +HOMEPAGE="https://github.com/gnunn1/terminix" +DOWNLOAD="https://github.com/gnunn1/terminix/archive/1.3.5/terminix-1.3.5.tar.gz" +MD5SUM="a412ea4cfa3039d62f96b28a33065216" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="GtkD" +MAINTAINER="Philip van der Hoeven" +EMAIL="philip@vd-hoeven.nl" diff --git a/system/terminix/vte_terminix.sh b/system/terminix/vte_terminix.sh new file mode 100644 index 0000000000..ec037f77b9 --- /dev/null +++ b/system/terminix/vte_terminix.sh @@ -0,0 +1,65 @@ +# Copyright © 2006 Shaun McCance <shaunm@gnome.org> +# Copyright © 2013 Peter De Wachter <pdewacht@gmail.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Not bash or zsh? +[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ] || return 0 + +# Not an interactive shell? +[[ $- == *i* ]] || return 0 + +# Not running under vte? +[ "${VTE_VERSION:-0}" -ge 3405 ] || return 0 + +__vte_urlencode() ( + # This is important to make sure string manipulation is handled + # byte-by-byte. + LC_ALL=C + str="$1" + while [ -n "$str" ]; do + safe="${str%%[!a-zA-Z0-9/:_\.\-\!\'\(\)~]*}" + printf "%s" "$safe" + str="${str#"$safe"}" + if [ -n "$str" ]; then + printf "%%%02X" "'$str" + str="${str#?}" + fi + done +) + +# Print a warning so that anyone who's added this manually to his PS1 can adapt. +# The function will be removed in a later version. +__vte_ps1() { + echo -n "(__vte_ps1 is obsolete)" +} + +__vte_osc7 () { + printf "\033]7;file://%s%s\007" "${HOSTNAME%%.*}" "$(__vte_urlencode "${PWD}")" +} + +__vte_prompt_command() { + local pwd='~' + [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} + printf "\033]0;%s@%s:%s\007%s" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)" +} + +case "$TERM" in + xterm*|vte*) + [ -n "$BASH_VERSION" ] && PROMPT_COMMAND="__vte_prompt_command" + [ -n "$ZSH_VERSION" ] && precmd_functions+=(__vte_osc7) + ;; +esac + +true |