summaryrefslogtreecommitdiffstats
path: root/abs/extra/shellinabox/PKGBUILD
blob: baa19a577e7cef0dd3d852912ab3b9a30d2bfe71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pkgname=shellinabox
pkgver=2.20
pkgrel=1
_pkghash=master
pkgdesc="Implementation of a web server that can export arbitrary command line tools to a web based terminal emulator"
arch=('i686' 'x86_64')
url="http://shellinabox.com/"
license=('GPL2')
depends=('runit-scripts>=8.0-2' 'openssh')
install=shellinaboxd.install
source=("https://github.com/shellinabox/shellinabox/archive/${_pkghash}.tar.gz"
        "shellinaboxd.include"
        "shellinaboxd.gen_light_conf.d")

build() {
  cd "$srcdir/$pkgname-${_pkghash}"

  #change default to show onscreen keyboard
  sed -i "s/this.softKeyboard         = false;/this.softKeyboard         = true;/g" ./shellinabox/vt100.jspp

  #fix unsupported option errors with openssh
  find . -name "service.c" -exec sed -i -e "s|-oRhostsRSAAuthentication=no||g" {} \;
  find . -name "service.c" -exec sed -i -e "s|-oRSAAuthentication=no||g" {} \; 

  autoreconf -i
  export CPPFLAGS="${CPPFLAGS/-D_FORTIFY_SOURCE=2/}"
  ./configure  --prefix=/usr

  #fix ssl libs
  sed -i -e "s|LIBS = -lz -ldl -lutil|LIBS = -lz -ldl -lutil -lssl -lcrypto|g" ./Makefile

  make
}
package() {
  cd "$srcdir/$pkgname-${_pkghash}"
  make DESTDIR=$pkgdir install || return 1

  #install conf files for lighttpd
  mkdir -p ${pkgdir}/etc/lighttpd
  install -D -m 644 ${srcdir}/shellinaboxd.include ${pkgdir}/etc/lighttpd/
  #gen_light_conf
  install -D -m 744 ${srcdir}/shellinaboxd.gen_light_conf.d ${pkgdir}/etc/gen_light_conf.d/shellinaboxd.conf
}
md5sums=('20e8876ce8637ebf4fc98b1e7807bed9'
         '4c5ce3c17bed94ca71ebafba7f934bba'
         'aadd1edf4110aca2d16d806791e90019')