Merge pull request #6552 from hbasria/master

tmux and zsh package added
This commit is contained in:
Rmys
2019-02-14 15:32:49 +03:00
committed by GitHub
10 changed files with 460 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
autotools.configure()
def build():
autotools.make()
def install():
autotools.rawInstall("PREFIX=/%s DESTDIR=%s" % (get.defaultprefixDIR(), get.installDIR()))
+70
View File
@@ -0,0 +1,70 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>tmux</Name>
<Homepage>http://tmux.sourceforge.net/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>BSD</License>
<License>ISC</License>
<IsA>app:console</IsA>
<Summary>A terminal multiplexer</Summary>
<Description>Tmux is a terminal multiplexer. It's similar to GNU Screen.</Description>
<Archive sha1sum="6a469769a242c95dc8aec443b436d4f8f279f517" type="targz">https://github.com/tmux/tmux/releases/download/2.8/tmux-2.8.tar.gz</Archive>
<BuildDependencies>
<Dependency>libevent-devel</Dependency>
<Dependency>ncurses-devel</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>tmux</Name>
<RuntimeDependencies>
<Dependency>libevent</Dependency>
<Dependency>ncurses</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="config">/etc</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="data">/usr/share</Path>
</Files>
</Package>
<History>
<Update release="4">
<Date>2019-02-13</Date>
<Version>2.8</Version>
<Comment>Version bump.</Comment>
<Name>Hasan Basri</Name>
<Email>hbasria@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2015-01-25</Date>
<Version>1.9</Version>
<Comment>Version bump.</Comment>
<Name>Stefan Gronewold(groni)</Name>
<Email>groni@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2011-12-09</Date>
<Version>1.8</Version>
<Comment>Version Bump</Comment>
<Name>Stefan Gronewold(groni)</Name>
<Email>groni@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2011-09-28</Date>
<Version>1.5</Version>
<Comment>First release</Comment>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>tmux</Name>
<Summary xml:lang="tr">Bir terminal çoğaltıcı uygulaması</Summary>
<Description xml:lang="tr">tmux bir terminal çoğaltıcısıdır. GNU screen gibi terminal pencerenizi birden fazla parçalara bölerek çalışmanızı sağlar.</Description>
</Source>
</PISI>
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
autotools.autoreconf("-vfi")
autotools.configure('--bindir=/bin \
--with-tcsetpgrp \
--enable-maildir-support \
--enable-etcdir=/etc/zsh \
--enable-zshenv=/etc/zsh/zshenv \
--enable-zlogin=/etc/zsh/zlogin \
--enable-zlogout=/etc/zsh/zlogout \
--enable-zprofile=/etc/zsh/zprofile \
--enable-zshrc=/etc/zsh/zshrc \
--enable-fndir=/usr/share/zsh/functions \
--enable-scriptdir=/usr/share/zsh/scripts \
--enable-site-fndir=/usr/share/zsh/site-functions \
--enable-function-subdirs \
--enable-pcre \
--enable-cap \
--enable-multibyte \
--enable-cflags="%s" \
--enable-ldflags="%s"' % (get.CFLAGS(),get.LDFLAGS()))
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
# Remove versioned copy
pisitools.remove("/bin/%s" % (get.srcDIR()))
pisitools.doman("Doc/*.1")
pisitools.dodoc("ChangeLog", "FEATURES", "LICENCE", "META-FAQ", "NEWS", "README")
+130
View File
@@ -0,0 +1,130 @@
### vim:ft=zsh:foldmethod=marker
###
### a generic accept-line wrapper
###
### Frank Terbeck <ft@bewatermyfriend.org>
### Last-Modified: Wed Dec 26 14:37:47 2007
###
### URI: <http://ft.bewatermyfriend.org/comp/zsh.html>
###
function Accept-Line() {
setopt localoptions noksharrays
local -a subs
local -xi aldone
local sub
zstyle -a ":acceptline:${alcontext}" actions subs
(( ${#subs} < 1 )) && return 0
(( aldone = 0 ))
for sub in ${subs} ; do
[[ ${sub} == 'accept-line' ]] && sub='.accept-line'
zle ${sub}
(( aldone > 0 )) && break
done
}
function Accept-Line-getdefault() {
local default_action
zstyle -s ":acceptline:${alcontext}" default_action default_action
case ${default_action} in
((accept-line|))
printf ".accept-line"
;;
(*)
printf ${default_action}
;;
esac
}
function accept-line() {
setopt localoptions noksharrays
local -a cmdline
local -x alcontext
local buf com fname format msg default_action
alcontext='default'
buf="${BUFFER}"
cmdline=(${(z)BUFFER})
com="${cmdline[1]}"
fname="_${com}"
zstyle -t ":acceptline:${alcontext}" rehash \
&& [[ -z ${commands[$com]} ]] \
&& rehash
if [[ -n ${reswords[(r)$com]} ]] \
|| [[ -n ${aliases[$com]} ]] \
|| [[ -n ${functions[$com]} ]] \
|| [[ -n ${builtins[$com]} ]] \
|| [[ -n ${commands[$com]} ]] ; then
# there is something sensible to execute, just do it.
alcontext='normal'
zle Accept-Line
default_action=$(Accept-Line-getdefault)
zstyle -T ":acceptline:${alcontext}" call_default \
&& zle ${default_action}
return
fi
if [[ -o correct ]] \
|| [[ -o correctall ]] \
&& [[ -n ${functions[$fname]} ]] ; then
# nothing there to execute but there is a function called
# _command_name; a completion widget. Makes no sense to
# call it on the commandline, but the correct{,all} options
# will ask for it nevertheless, so warn the user.
if [[ ${LASTWIDGET} == 'accept-line' ]] ; then
# Okay, we warned the user before, he called us again,
# so have it his way.
alcontext='force'
zle Accept-Line
default_action=$(Accept-Line-getdefault)
zstyle -T ":acceptline:${alcontext}" call_default \
&& zle ${default_action}
return
fi
# prepare warning message for the user, configurable via zstyle.
zstyle -s ":acceptline:${alcontext}" compwarnfmt msg
if [[ -z ${msg} ]] ; then
msg="%c will not execute and completion %f exists."
fi
zformat -f msg "${msg}" "c:${com}" "f:${fname}"
zle -M -- "${msg}"
return
elif [[ -n ${buf//[$' \t\n']##/} ]] ; then
# If we are here, the commandline contains something that is not
# executable, which is neither subject to _command_name correction
# and is not empty. might be a variable assignment
alcontext='misc'
zle Accept-Line
default_action=$(Accept-Line-getdefault)
zstyle -T ":acceptline:${alcontext}" call_default \
&& zle ${default_action}
return
fi
# If we got this far, the commandline only contains whitespace, or is empty.
alcontext='empty'
zle Accept-Line
default_action=$(Accept-Line-getdefault)
zstyle -T ":acceptline:${alcontext}" call_default \
&& zle ${default_action}
}
zle -N accept-line
zle -N Accept-Line
+12
View File
@@ -0,0 +1,12 @@
[[ -e "/etc/profile.env" ]] && source /etc/profile.env
umask 022
if [[ "$USER" == root ]]; then
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}"
fi
unset ROOTPATH
@@ -0,0 +1,11 @@
#!/bin/zsh
#
#command not found handler for zsh.
#This handler is part of Zsh and is hooked to command-not-found program.
#man zshmisc is your friend.
function command_not_found_handler()
{
/usr/bin/python /usr/bin/command-not-found $1;
return $?
}
+85
View File
@@ -0,0 +1,85 @@
# /etc/zsh/zshrc is sourced in interactive shells. It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
# Colors
test -f /etc/DIR_COLORS && eval `dircolors /etc/DIR_COLORS`
autoload -U colors
colors
# Default prompt
if [[ "$USER" == root ]]; then
PROMPT="%{$bold_color$fg[red]%}%m %{$bold_color$fg[blue]%}%1~ %# %{$reset_color%}"
else
PROMPT="%{$bold_color%}%n@%m %{$reset_color$fg[red]%}%1~ %# %{$reset_color%}"
fi
# Auto completion
autoload -U compinit
compinit
# An accept-line wrapper, see http://bewatermyfriend.org/posts/2007/12-26.11-50-38-tooltime.html
autoload -U accept-line
accept-line
# History
export HISTFILE=~/.zsh_history
export HISTSIZE=50000
export SAVEHIST=50000
export HISTCONTROL=ignoredups
setopt SHARE_HISTORY
setopt EXTENDED_HISTORY
setopt EXTENDED_GLOB
# Aliases
alias dir='ls --color=auto'
alias grep='grep --color=auto'
alias la='ls --color=auto -la'
alias ll='ls --color=auto -l'
alias ls='ls --color=auto'
alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
alias rm='rm -i'
alias scp-resume='rsync --compress-level=3 --partial --progress --rsh=ssh'
# Key bindings
bindkey -e # emacs key bindings
bindkey ' ' magic-space # also do history expansion on space
bindkey "\e[3~" delete-char
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
bindkey "\e[7~" beginning-of-line
bindkey "\e[8~" end-of-line
bindkey "^[[5~" up-line-or-history
bindkey "^[[6~" down-line-or-history
# Editor
export VISUAL="nano"
# Other options
setopt NO_BEEP
setopt CORRECT_ALL
setopt AUTO_LIST
setopt AUTO_PUSHD
setopt PUSHD_IGNORE_DUPS
setopt PUSHD_SILENT
setopt INTERACTIVE_COMMENTS
setopt NONOMATCH
setopt NOPROMPT_SP
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh_cache
zstyle ':acceptline:*' rehash true
case $TERM in
xterm*)
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
;;
esac
if [ -f /etc/zsh/zsh_command_not_found ] && [ -x /usr/bin/command-not-found ]; then
. /etc/zsh/zsh_command_not_found
fi
+75
View File
@@ -0,0 +1,75 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>zsh</Name>
<Homepage>http://www.zsh.org</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>as-is</License>
<IsA>app:console</IsA>
<Summary>Powerful command line shell</Summary>
<Description>Zsh is a command interpreter (shell) which has command-line editing, built-in spelling correction, programmable command completion, shell functions (with autoloading), a history mechanism, and a lots of other features.</Description>
<Archive sha1sum="fedd82419881323b1087241d536d2fb1528a9deb" type="tarxz">mirrors://sourceforge/zsh/zsh-5.7.1.tar.xz</Archive>
<BuildDependencies>
<Dependency>libcap-devel</Dependency>
<Dependency>libpcre-devel</Dependency>
<Dependency>ncurses-devel</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>zsh</Name>
<Files>
<Path fileType="config">/etc</Path>
<Path fileType="executable">/bin</Path>
<Path fileType="library">/usr/lib/zsh</Path>
<Path fileType="data">/usr/share/zsh</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc/</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/zsh/zprofile">zprofile</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/zsh/zshrc">zshrc</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/zsh/zsh_command_not_found">zsh_command_not_found</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/share/zsh/site-functions/accept-line">accept-line</AdditionalFile>
</AdditionalFiles>
<RuntimeDependencies>
<Dependency>libcap</Dependency>
<Dependency>libpcre</Dependency>
<Dependency>ncurses</Dependency>
</RuntimeDependencies>
</Package>
<History>
<Update release="4">
<Date>2019-02-14</Date>
<Version>5.7.1</Version>
<Comment>Version bump.</Comment>
<Name>Hasan Basri</Name>
<Email>hbasria@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-02-14</Date>
<Version>5.0.2</Version>
<Comment>Buildhost rebuild.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-04-30</Date>
<Version>5.0.2</Version>
<Comment>Version bump.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2011-06-01</Date>
<Version>4.3.12</Version>
<Comment>First release</Comment>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>zsh</Name>
<Summary xml:lang="tr">Güçlü bir diğer komut satırı kabuğu</Summary>
<Description xml:lang="tr">Zsh komut satırı düzenleme, yanlışları düzeltme, programlanabilir komut tamamlama, kabuk fonksiyonları, geçmiş mekanizması ve diğer bir çok özellikleriyle birlikte gelen bir (kabuk) komut yorumlayıcısıdır.</Description>
</Source>
</PISI>