diff options
author | Mike Gardiner <obz@gentoo.org> | 2003-11-05 12:03:19 +0000 |
---|---|---|
committer | Mike Gardiner <obz@gentoo.org> | 2003-11-05 12:03:19 +0000 |
commit | 620003c0f638f973fc7458675b4a002c844841f0 (patch) | |
tree | 45781c64379c638d838c16c94f68b237b3bf30b4 /x11-wm/trswm | |
parent | New version (diff) | |
download | gentoo-2-620003c0f638f973fc7458675b4a002c844841f0.tar.gz gentoo-2-620003c0f638f973fc7458675b4a002c844841f0.tar.bz2 gentoo-2-620003c0f638f973fc7458675b4a002c844841f0.zip |
New version
Diffstat (limited to 'x11-wm/trswm')
-rw-r--r-- | x11-wm/trswm/ChangeLog | 11 | ||||
-rw-r--r-- | x11-wm/trswm/Manifest | 5 | ||||
-rw-r--r-- | x11-wm/trswm/files/digest-trswm-0.4.9 | 1 | ||||
-rw-r--r-- | x11-wm/trswm/files/trswm | 119 | ||||
-rw-r--r-- | x11-wm/trswm/trswm-0.4.9.ebuild | 52 |
5 files changed, 185 insertions, 3 deletions
diff --git a/x11-wm/trswm/ChangeLog b/x11-wm/trswm/ChangeLog index c6db48f7460f..27ee2de91c21 100644 --- a/x11-wm/trswm/ChangeLog +++ b/x11-wm/trswm/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-wm/trswm # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/trswm/ChangeLog,v 1.1 2003/06/17 20:02:33 twp Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/trswm/ChangeLog,v 1.2 2003/11/05 12:03:03 obz Exp $ + +*trswm-0.4.9 (05 Nov 2003) + + 05 Nov 2003; Mike Gardiner <obz@gentoo.org> trswm-0.4.9.ebuild, files/trswm: + New version, 0.4.9, with re-written ebuild. Includes a wrapper script to + handle per user configuration, in place of the trswm binary which is now + trswm.bin. trswm --help should give more information on it's usage, and it is + a complete launcher, so adding exec trswm to ~/.xinitrc is all that's + required to launch trswm. *trswm-0.3 (17 Jun 2003) diff --git a/x11-wm/trswm/Manifest b/x11-wm/trswm/Manifest index 4b3755ec812c..66598b41d05f 100644 --- a/x11-wm/trswm/Manifest +++ b/x11-wm/trswm/Manifest @@ -1,6 +1,7 @@ -MD5 fd9a3ae4552bd21294caae308823f164 trswm-0.4.9.ebuild 1261 +MD5 592791e9744e39f04a41677e39729970 trswm-0.4.9.ebuild 1350 MD5 8a6489c4d9aa14401db3981520316a3b trswm-0.3.ebuild 762 -MD5 ed785a159844c0ddc5998f448a08c627 ChangeLog 309 +MD5 abaf4499867fb8275e3a9e03dd1a9a14 ChangeLog 748 MD5 e7307c1653035014c1e36a27ca8ccb45 metadata.xml 163 +MD5 72d307e32c81a38a097d38268f82bc63 files/trswm 2817 MD5 3b077cf8b663647f78eaafdbf42b8aec files/digest-trswm-0.4.9 63 MD5 5e8a957f2d35d3e74e2f5fa7ce9c3c34 files/digest-trswm-0.3 122 diff --git a/x11-wm/trswm/files/digest-trswm-0.4.9 b/x11-wm/trswm/files/digest-trswm-0.4.9 new file mode 100644 index 000000000000..1a5b8755559b --- /dev/null +++ b/x11-wm/trswm/files/digest-trswm-0.4.9 @@ -0,0 +1 @@ +MD5 5da8e4233b659e29fccd8bc298d558d7 trswm-0.4.9.tar.gz 286229 diff --git a/x11-wm/trswm/files/trswm b/x11-wm/trswm/files/trswm new file mode 100644 index 000000000000..8f7bfd004e73 --- /dev/null +++ b/x11-wm/trswm/files/trswm @@ -0,0 +1,119 @@ +#!/bin/bash + +# Setup the user's local configuration files as unfortunately +# trswm only supports looking in a single place for configs. + +# author: Mike Gardiner <obz@gentoo.org> +# last modified: 5 November 2003 +# trswm version: 0.4.9 + +# the default, distribution supplied files +DISTCONF="/etc/trswm" +DISTCONFFILES=$( ls ${DISTCONF} ) + +# the directory for local configuration, can be found by +# prepending the $HOME variable to the beginning of +# TRS_CONFIG_PATH in /usr/include/trswm/tc_defs.h +TCDIR="${HOME}/.trswm-devel" + +# and the trswm binary +TRSWM_BIN="/usr/bin/trswm.bin" + +# check the local configuration files exist +check_config() { + + local have_missing="false" + local missing="" + for conf in ${DISTCONFFILES}; do + [ ! -e ${TCDIR}/${conf} ] \ + && missing="$missing $conf" \ + && have_missing="true" + + done + + [ $have_missing == "true" ] \ + && echo "Configuration files missing: $missing" \ + || echo "No configuration files missing" + +} + +# create the local configuration files. +# $1 may be the string "force" which will +# copy DISTCONF/*.lua without checking to see +# what exists, or "noforce" will be force checks. +create_config() { + + # if the config directory doesnt exist, create it + [ ! -e ${TCDIR} ] && mkdir ${TCDIR} + # if we're doing a force, then we just copy all + # of the configs across and finish + if [ $1 == "force" ]; then + cp ${DISTCONF}/*.lua ${TCDIR}/ + + else + # now check for the config files, and copy across + # the missing ones + for conf in ${DISTCONFFILES}; do + [ ! -e ${TCDIR}/${conf} ] && \ + cp ${DISTCONF}/${conf} ${TCDIR}/ + done + + fi + +} + +# print out the help information +print_help() { + + echo "Gentoo Linux trswm wrapper (Nov 5, 2003)" + echo "" + echo " Usage is trswm -[h|c|f|m] [--noexec]" + echo " Default behaviour is equivalent to trswm -m" + echo "" + echo " Supported options:" + echo " -h --help -> Print this help" + echo " -c --check -> Check the local configuration for validity" + echo " -f --force -> Force reset of local configuration to default" + echo " -m --missing -> Create missing files in local configuration" + echo " --noexec -> Don't execute the trswm binary (use with -f/-m)" + echo "" + +} + +main() { + + # do we want to execute the trswm binary after + # we've checked the config etc ? + local trswm_exec="yes" + + case $1 in + + -h|--help) print_help + exit 0 + ;; + -c|--check) check_config + exit 0 + ;; + -f|--force) create_config "force" + ;; + -m|--missing) create_config "noforce" + ;; + *) create_config "noforce" + ;; + + esac + + # test for whether we have exec set or not + [ "x$2" == "x--noexec" ] && trswm_exec="no" + + # decide whether to continue on and execute the + # window manager or not + [ $trswm_exec == "yes" ] && exec ${TRSWM_BIN} + + exit 0 + +} + +main $@ + +# vim:set ts=4 diff --git a/x11-wm/trswm/trswm-0.4.9.ebuild b/x11-wm/trswm/trswm-0.4.9.ebuild new file mode 100644 index 000000000000..4109b10a7f2c --- /dev/null +++ b/x11-wm/trswm/trswm-0.4.9.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/trswm/trswm-0.4.9.ebuild,v 1.1 2003/11/05 12:03:03 obz Exp $ + +DESCRIPTION="An ion-based window manager that aims to provide a desktop environment based on the keyboard, making the mouse optional" +HOMEPAGE="http://www.relex.ru/~yarick/trswm/" +SRC_URI="http://www.relex.ru/~yarick/${PN}/${P}.tar.gz" +LICENSE="as-is" + +IUSE="debug" +SLOT="0" +KEYWORDS="~alpha ~arm ~hppa ~mips ~sparc ~x86" + +DEPEND="virtual/x11 + >=dev-lang/lua-5" + +src_compile() { + + local debugconf="" + use debug \ + && debugconf="--with-debug=2" \ + || debugconf="--with-debug=0" + + econf ${debugconf} || die + emake || die + +} + +src_install() { + + make DESTDIR=${D} install || die + # move the real window manager binary away, and install + # our own wrapper script in its place + mv ${D}/usr/bin/trswm ${D}/usr/bin/trswm.bin + dobin ${FILESDIR}/trswm + + dodoc BUGS Roadmap TODO + +} + +pkg_postinst() { + + einfo "To use trswm please use \"exec trswm\" in ~/.xinitrc." + echo "" + einfo "The trswm script installed here is a wrapper around the" + einfo "trswm binary (trswm.bin), which will install the" + einfo "necessary configuration files in \$HOME/.trswm-devel/" + einfo "Please see trswm --help for additional usage information." + echo "" + +} + |