summaryrefslogtreecommitdiff
path: root/community/tcsh
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/tcsh
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/tcsh')
-rw-r--r--community/tcsh/PKGBUILD44
-rw-r--r--community/tcsh/csh.cshrc96
-rw-r--r--community/tcsh/csh.login71
-rw-r--r--community/tcsh/tcsh-6.17.00-ls-colors-var.patch13
-rw-r--r--community/tcsh/tcsh.install25
5 files changed, 249 insertions, 0 deletions
diff --git a/community/tcsh/PKGBUILD b/community/tcsh/PKGBUILD
new file mode 100644
index 000000000..772cf8afc
--- /dev/null
+++ b/community/tcsh/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 34438 2010-12-07 21:04:26Z lfleischer $
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Eric Belanger <eric@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=tcsh
+pkgver=6.17.00
+pkgrel=3
+pkgdesc='Enhanced version of the Berkeley C shell.'
+arch=('i686' 'x86_64')
+url='http://www.tcsh.org/Welcome'
+license=('BSD')
+depends=('ncurses')
+backup=('etc/csh.cshrc'
+ 'etc/csh.login')
+install='tcsh.install'
+source=("ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'csh.cshrc'
+ 'tcsh-6.17.00-ls-colors-var.patch'
+ 'csh.login')
+md5sums=('c47de903e3d52f6824c8dd0c91eeb477'
+ '7ca0fe6d1a1b9a0093f632499d4fb112'
+ '0ed594ef77bc689265632682e18462eb'
+ '4869b9da87c79854e2cc97241f125853')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p0 < ../tcsh-6.17.00-ls-colors-var.patch
+
+ ./configure --prefix=/ --sysconfdir=/etc
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" mandir=/usr/share/man install install.man
+
+ install -Dm0644 "${srcdir}/csh.cshrc" "${pkgdir}/etc/csh.cshrc"
+ install -Dm0644 "${srcdir}/csh.login" "${pkgdir}/etc/csh.login"
+ install -Dm0644 Copyright "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ ln -s tcsh "${pkgdir}/bin/csh"
+}
diff --git a/community/tcsh/csh.cshrc b/community/tcsh/csh.cshrc
new file mode 100644
index 000000000..a6dfcad12
--- /dev/null
+++ b/community/tcsh/csh.cshrc
@@ -0,0 +1,96 @@
+#############################################################################
+##
+## Gentoo's csh.cshrc
+##
+## Based on the TCSH package (http://tcshrc.sourceforge.net)
+##
+## .tcshrc 2Sep2001, Simos Xenitellis (simos@hellug.gr)
+##
+## 2003-01-13 -- Alain Penders (alain@gentoo.org)
+## Renamed to /etc/csh.cshrc, basic cleanup work.
+##
+## 2003-01-24 -- Alain Penders (alain@gentoo.org)
+## Improved config file handling.
+##
+onintr -
+##
+
+##
+## Load the environment defaults.
+##
+if ( -r /etc/csh.env ) then
+ source /etc/csh.env
+endif
+
+
+##
+## Make sure our path includes the basic stuff for root and normal users.
+##
+if ($LOGNAME == "root") then
+ set -f path = ( $path /sbin )
+ set -f path = ( $path /usr/sbin )
+ set -f path = ( $path /usr/local/sbin )
+endif
+set -f path = ( $path /bin )
+set -f path = ( $path /usr/bin )
+set -f path = ( $path /usr/local/bin )
+set -f path = ( $path /opt/bin )
+
+
+##
+## Load our settings -- most are for interactive shells only, but not all.
+##
+if ( -e /etc/profile.d/tcsh-settings ) then
+ source /etc/profile.d/tcsh-settings
+endif
+
+
+##
+## Source extensions installed by ebuilds
+##
+if ( -d /etc/profile.d ) then
+ set _tmp=${?nonomatch}
+ set nonomatch
+ foreach _s ( /etc/profile.d/*.csh )
+ if ( -r $_s ) then
+ source $_s
+ endif
+ end
+ if ( ! ${_tmp} ) unset nonomatch
+ unset _tmp _s
+endif
+
+
+# Everything after this point is interactive shells only.
+if ( $?prompt == 0 ) goto end
+
+
+##
+## Load our aliases -- for interactive shells only
+##
+if ( -e /etc/profile.d/tcsh-aliases ) then
+ source /etc/profile.d/tcsh-aliases
+endif
+
+
+##
+## Load our key bindings -- for interactive shells only
+##
+if ( -e /etc/profile.d/tcsh-bindkey ) then
+ source /etc/profile.d/tcsh-bindkey
+endif
+
+
+##
+## Load our command completions -- for interactive shells only
+##
+if ( -e /etc/profile.d/tcsh-complete ) then
+ source /etc/profile.d/tcsh-complete
+endif
+
+
+end:
+##
+onintr
+##
+
diff --git a/community/tcsh/csh.login b/community/tcsh/csh.login
new file mode 100644
index 000000000..58501398c
--- /dev/null
+++ b/community/tcsh/csh.login
@@ -0,0 +1,71 @@
+#############################################################################
+##
+## Gentoo's csh.login
+##
+## 2003-01-13 -- Alain Penders (alain@gentoo.org)
+##
+## Initial version. Inspired by the Suse version.
+##
+
+
+##
+## Default terminal initialization
+##
+if ( -o /dev/$tty && ${?prompt} ) then
+ # Console
+ if ( ! ${?TERM} ) setenv TERM linux
+ if ( "$TERM" == "unknown" ) setenv TERM linux
+ # No tset available on SlackWare
+ if ( -x "`which stty`" ) stty sane cr0 pass8 dec
+ if ( -x "`which tset`" ) tset -I -Q
+ unsetenv TERMCAP
+ settc km yes
+endif
+
+##
+## Default UMASK
+##
+umask 022
+
+##
+## Set our SHELL variable.
+##
+setenv SHELL /bin/tcsh
+
+##
+## Setup a default MAIL variable
+##
+if ( -f /var/spool/mail/$USER ) then
+ setenv MAIL /var/spool/mail/$USER
+ set mail=$MAIL
+endif
+
+##
+## If we're root, report who's logging in and out.
+##
+if ( "$uid" == "0" ) then
+ set who=( "%n has %a %l from %M." )
+ set watch=( any any )
+endif
+
+##
+## Show the MOTD once the first time, and once after it has been changed.
+##
+## Note: if this is a SSH login, SSH will always show the MOTD, so we
+## skip it. Create ~/.hushlogin is you don't want SSH to show it.
+##
+if (-f /etc/motd ) then
+ if ( ! $?SSH_CLIENT ) then
+ cmp -s /etc/motd ~/.hushmotd
+ if ($status) then
+ tee ~/.hushmotd < /etc/motd
+ echo "((( MOTD shown only once, unless it is changed )))"
+ endif
+ endif
+endif
+
+##
+## Send us home.
+##
+cd
+
diff --git a/community/tcsh/tcsh-6.17.00-ls-colors-var.patch b/community/tcsh/tcsh-6.17.00-ls-colors-var.patch
new file mode 100644
index 000000000..9aa5198d3
--- /dev/null
+++ b/community/tcsh/tcsh-6.17.00-ls-colors-var.patch
@@ -0,0 +1,13 @@
+--- tw.color.c.orig 2008-10-17 16:57:33.000000000 -0300
++++ tw.color.c 2010-10-18 23:34:36.764372377 -0300
+@@ -86,6 +86,10 @@
+ VAR(NOS, "ow", ""), /* Other writable dir (o+w) but not sticky */
+ VAR(NOS, "st", ""), /* Sticky dir (+t) but not other writable */
+ VAR(NOS, "rs", "0"), /* Reset to normal color */
++ VAR(NOS, "hl", ""), /* Regular file with more than one link */
++ VAR(NOS, "ca", ""), /* File with capability */
++ VAR(NOS, "mh", ""), /* MULTIHARDLINK */
++ VAR(NOS, "cl", ""), /* CLRTOEOL */
+ };
+
+ enum FileType {
diff --git a/community/tcsh/tcsh.install b/community/tcsh/tcsh.install
new file mode 100644
index 000000000..023ddd115
--- /dev/null
+++ b/community/tcsh/tcsh.install
@@ -0,0 +1,25 @@
+post_install() {
+ if [ ! "`grep /bin/tcsh etc/shells`" ]; then
+ echo "updating /etc/shells... done."
+ sed -i "s|/bin/bash|/bin/bash\n/bin/tcsh\n/bin/csh|" etc/shells
+ else
+ sed -i "s|/usr/bin/tcsh|/bin/tcsh|" etc/shells
+ sed -i "s|/usr/bin/csh|/bin/csh|" etc/shells
+
+ echo ""
+ echo ">> WARNING: /usr/bin/tcsh has moved to /bin/tcsh,"
+ echo ">> WARNING: /usr/bin/csh has moved to /bin/csh,"
+ echo ">> please update your user accounts as needed"
+ echo ""
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ echo "updating /etc/shells... done."
+ sed -i "\|/bin/tcsh|d" etc/shells
+ sed -i "\|/bin/csh|d" etc/shells
+}