summaryrefslogtreecommitdiff
path: root/repo/tcsh/tcsh.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-27 23:09:07 +0100
committerdavidovski <david@davidovski.xyz>2022-06-27 23:09:07 +0100
commitf6332a43c35387c4a2dea1746be5fd092890ae0e (patch)
treed6599f63de04096f3fc21a98e0b3bb39d55a3531 /repo/tcsh/tcsh.xibuild
parentf13e0cac13f90f7f57bce3b26b2e6383de6e4ad2 (diff)
added lf and iptables
Diffstat (limited to 'repo/tcsh/tcsh.xibuild')
-rw-r--r--repo/tcsh/tcsh.xibuild52
1 files changed, 52 insertions, 0 deletions
diff --git a/repo/tcsh/tcsh.xibuild b/repo/tcsh/tcsh.xibuild
new file mode 100644
index 0000000..9bca519
--- /dev/null
+++ b/repo/tcsh/tcsh.xibuild
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+NAME="tcsh"
+DESC="extended C-shell"
+
+MAKEDEPS="ncurses"
+
+PKG_VER=6.24.00
+SOURCE="https://github.com/tcsh-org/tcsh/archive/TCSH6_21_00.tar.gz"
+
+ADDITIONAL="
+001-sysmalloc.patch
+6974bc35a5cda6eab748e364bd76a860ca66968b.patch
+csh.cshrc
+csh.login
+tcsh.post-install
+"
+
+prepare() {
+ apply_patches
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --bindir=/bin \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-rpath
+ make
+}
+
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+ install -Dm0644 "$BUILD_ROOT/csh.cshrc" "$PKG_DEST/etc/csh.cshrc"
+ install -Dm0644 "$BUILD_ROOT/csh.login" "$PKG_DEST/etc/csh.login"
+ ln -s tcsh "$PKG_DEST/bin/csh"
+ ln -s tcsh.1 "$PKG_DEST/usr/share/man/man1/csh.1"
+ rm -rf "$PKG_DEST"/usr/share/locale
+}
+
+postinstall () {
+ if [ -f /etc/shells ] || grep -vq "tcsh" /etc/shells; then
+ echo "/bin/tcsh" >> /etc/shells
+ fi
+
+ if [ -f /etc/shells ] || grep -vq "csh" /etc/shells; then
+ echo "/bin/csh" >> /etc/shells
+ fi
+}