summaryrefslogtreecommitdiff
blob: 88ed605702d22c48d8b623096580848a80c3f819 (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
47
48
49
50
51
52
53
54
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ajaxterm/ajaxterm-0.10.ebuild,v 1.4 2011/03/30 23:19:19 arfrever Exp $

EAPI="3"
PYTHON_DEPEND="2"

inherit python

MY_P="Ajaxterm-${PV}"

DESCRIPTION="Ajaxterm is a web based terminal"
HOMEPAGE="http://antony.lesuisse.org/qweb/trac/wiki/AjaxTerm"
SRC_URI="http://antony.lesuisse.org/qweb/files/${MY_P}.tar.gz"

LICENSE="public-domain LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~sparc ~x86"
IUSE=""

DEPEND=""
RDEPEND=""

S="${WORKDIR}/${MY_P}"

pkg_setup() {
	python_set_active_version 2
	python_pkg_setup
}

src_prepare() {
	python_convert_shebangs -r 2 .

	# baselayout's start-stop-daemon wrapper does not allow shell scripts
	sed -i -e "s: -- :\0/usr/share/ajaxterm/ajaxterm.py :" \
		-e "s:\(DAEMON=%(bin)s/\)ajaxterm:\1python:" configure.initd.gentoo
}

src_configure() {
	./configure --prefix=/usr || die "./configure failed"
}

src_install() {
	dodir /etc/init.d
	sed -i -e "s:\"/usr:\"${D}/usr:" \
		-e "s:\"/etc:\"${D}/etc:" \
		-e "s:/usr/man:/usr/share/man:" Makefile
	emake install || die "emake install failed"
}

pkg_postinst() {
	ewarn "For remote access, it is strongly recommended to use https SSL/TLS"
	ewarn "On the website is a config for apache web server using mod_proxy"
}