diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | bashc.install | 49 |
3 files changed, 94 insertions, 26 deletions
@@ -1,17 +1,18 @@ pkgbase = bashc - pkgdesc = A version of the GNU Bourne Again shell extended with two-panel OFM file manager. - pkgver = 3.2.33.0 - pkgrel = 4 - url = http://Groups.google.com/group/bashc + pkgdesc = Bash Commander is the GNU Bourne Again shell extended with two-panel OFM file manager. + pkgver = 4.3.r139.c6eb92e + pkgrel = 1 + url = https://github.com/sergev/bash-commander install = bashc.install arch = i686 arch = x86_64 license = GPL depends = ncurses + depends = bash backup = etc/bash_commander backup = etc/bash_dialog - source = http://downloads.sourceforge.net/bashc/bashc-3.2.33.0.tgz - sha256sums = d8cd2a20628ab6aee7d89ec4e3a0163d2b1cb4d7d3e135af3f82474c5d3e6cb8 + source = git+https://github.com/sergev/bash-commander.git + sha256sums = SKIP pkgname = bashc @@ -1,44 +1,78 @@ # Maintainer: Chris Severance aur.severach aATt spamgourmet dott com # Contributor: Nathan Owe <ndowens at archlinux.us> +# TODO: I can't get the function keys to work + +# Finish install: https://github.com/sergev/bash-commander +# add to ~/.bashrc +#declare -x EDITOR="le" +#declare -x VIEWER="le --read-only" +#[ -s '/etc/bash_commander' ] && source '/etc/bash_commander' + +# I have no idea what editor "le" is + +# To test: quit mc, load bashc and hit ^O or enter on a blank line to show panels + +# To jump from panels to command line: Hit ^O + +# To exit: Hit ^D + +# To clean up after remove: +# remove lines from ~/.bashrc +# sudo rm -f '/etc/bash_commander' '/etc/bash_dialog' + set -u +_pkgname='bash-commander' pkgname='bashc' -pkgver='3.2.33.0' -pkgrel='4' -pkgdesc='A version of the GNU Bourne Again shell extended with two-panel OFM file manager.' -url='http://Groups.google.com/group/bashc' +_pkgver='4.3' # no release tags +pkgver=4.3.r139.c6eb92e +pkgrel=1 +pkgdesc='Bash Commander is the GNU Bourne Again shell extended with two-panel OFM file manager.' +#url='http://Groups.google.com/group/bashc' #url='http://sourceforge.net/projects/bashc/' -#url='https://github.com/sergev/bash-commander' -depends=('ncurses') +url="https://github.com/sergev/bash-commander" +depends=('ncurses' 'bash') license=('GPL') install="${pkgname}.install" arch=('i686' 'x86_64') backup=('etc/bash_commander' 'etc/bash_dialog') -source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz") -sha256sums=('d8cd2a20628ab6aee7d89ec4e3a0163d2b1cb4d7d3e135af3f82474c5d3e6cb8') +#source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz") +source=("git+https://github.com/sergev/bash-commander.git") +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_pkgname}" + printf "%s.r%s.%s" "${_pkgver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} prepare() { set -u - cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix='/' --bindir='/usr/bin' --sbindir='/usr/bin' --sysconfdir="/etc/${pkgname}" --with-curses + cd "${srcdir}/${_pkgname}" + ./configure --prefix='/usr' --sysconfdir="/etc/${pkgname}" --with-curses --enable-readline + sed -i -e 's:$(DESTDIR)$(prefix)/etc/:$(DESTDIR)/etc/:g' 'Makefile' set +u } build() { set -u - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${_pkgname}" make -s -j $(nproc) set +u } package() { set -u - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${_pkgname}" + install -dm755 "${pkgdir}/etc" make DESTDIR="${pkgdir}" install + rm -rf "${pkgdir}/usr/share" + rm -f "${pkgdir}/usr/bin/bashbug" + sed -i -e 's:/usr/local/etc/:/etc/:g' "${pkgdir}/etc/bash_commander" # Ensure there are no forbidden paths (git-aurcheck) #! grep -alqr "/sbin" "${pkgdir}" || echo "${}" # Only one instance left and it's POSIX #! grep -alqr "/usr/tmp" "${pkgdir}" || echo "${}" # This is fail over so it's OK + #! grep -alqr "/usr/local" "${pkgdir}" || echo "${}" ! test -d "${pkgdir}/usr/sbin" || echo "${}" set +u } diff --git a/bashc.install b/bashc.install index 90a18f31916b..2f26dc26c572 100644 --- a/bashc.install +++ b/bashc.install @@ -1,10 +1,43 @@ +pre_install() { + : +} + post_install() { - echo "" - echo ">> Change the following line in /etc/passwd:" - echo " root:x:0:0:root:/root:/bin/bash to" - echo " root:x:0:0:root:/root:/bin/bashc" - echo " and do the same with the useraccounts." - echo "" - echo ">> Add . /etc/bash_commander to ~/.bashrc. This will load" - echo " the bashc config. For config examples look at: http://groups.google.com/group/bashc" + grep -qle '/usr/bin/bashc$' '/etc/shells' || echo '/usr/bin/bashc' >> '/etc/shells' + #mandb -q +} + +pre_upgrade() { + : +} + +post_upgrade() { + post_install +} + +pre_remove() { + # This is only necessary on alternate shells. sh and bash + # are at the base of Arch and cannot be removed. + # To test this you should have a spare root shell already open. + # Otherwise, if this doesn't work, you will need to learn how to bypass + # the default shell on login. + # http://stackoverflow.com/questions/11059067/what-is-the-nix-command-to-view-a-users-default-login-shell + if getent passwd root | cut -d: -f7 | grep -qle '/usr/bin/bashc'; then + echo '**********************************************' + echo '*** Warning: ROOT HAS bashc as the login shell.' + echo '*** Shell changed to sh to prevent loss of root access.' + echo '**********************************************' + # sh is more likely to guarantee a login than bash because sh is typically + # unmodified. Crappy, but guaranteed. + chsh -s '/bin/sh' + fi + sed -i -e '/^\/usr\/bin\/bashc$/d' '/etc/shells' +} + +post_remove() { + #mandb -q + if getent passwd | cut -d: -f7 | grep -qle '/usr/bin/bashc'; then + echo '*** Warning: Some users have bashc as their login shell.' + echo '*** Fix promptly to restore access.' + fi } |