/[gentoo-x86]/www-apps/guacamole/guacamole-0.9.0.ebuild
Gentoo

Contents of /www-apps/guacamole/guacamole-0.9.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat May 3 12:09:01 2014 UTC (5 years, 9 months ago) by nativemad
Branch: MAIN
CVS Tags: HEAD
version bump

(Portage version: 2.2.8-r1/cvs/Linux i686, signed Manifest commit with key C1DE54B2)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-apps/guacamole/guacamole-0.8.3.ebuild,v 1.1 2013/11/26 12:53:33 nativemad Exp $
4
5 EAPI=5
6
7 inherit eutils
8 DESCRIPTION="Guacamole is a html5 vnc client as servlet"
9 HOMEPAGE="http://guacamole.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${PN}-client-${PV}.tar.gz
11 mysql? ( http://sourceforge.net/projects/${PN}/files/current/extensions/${PN}-auth-mysql-0.9.0.tar.gz )
12 ldap? ( http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-ldap-0.9.0.tar.gz )"
13 S="${WORKDIR}/${PN}-client-${PV}"
14
15 LICENSE="AGPL-3"
16
17 SLOT="0"
18
19 KEYWORDS="~x86"
20
21 IUSE="ldap mysql"
22
23 DEPEND="dev-java/maven-bin"
24
25 RDEPEND="${DEPEND}
26 www-servers/tomcat
27 >virtual/jre-1.6
28 net-misc/guacamole-server
29 mysql? ( virtual/mysql )
30 ldap? ( net-nds/openldap )"
31
32 src_compile() {
33 mkdir "${HOME}"/.m2
34 cat /usr/share/`readlink /usr/bin/mvn | sed 's:mvn:maven-bin:'`/conf/settings.xml | \
35 sed -e 's:/path/to/local/repo:'${HOME}/.m2':g' -e 's:<!-- localRepo::' >"${S}"/settings.xml
36 mvn -s "${S}"/settings.xml package
37 }
38
39 src_install() {
40 if use mysql; then
41 echo lib-directory: "/var/lib/${PN}/classpath" >>"${S}/${PN}/doc/example/${PN}.properties"
42 echo auth-provider: net.sourceforge.guacamole.net.auth.mysql.MySQLAuthenticationProvider >>"${S}/${PN}/doc/example/${PN}.properties"
43 echo mysql-hostname: localhost >>"${S}/${PN}/doc/example/${PN}.properties"
44 echo mysql-port: 3306 >>"${S}/${PN}/doc/example/${PN}.properties"
45 echo mysql-database: guacamole >>"${S}/${PN}/doc/example/${PN}.properties"
46 echo mysql-username: guacamole >>"${S}/${PN}/doc/example/${PN}.properties"
47 echo mysql-password: some_password >>"${S}/${PN}/doc/example/${PN}.properties"
48 sed -e 's:basic-user-mapping:#basic-user-mapping:' -i "${S}/${PN}/doc/example/${PN}.properties"
49 insinto "/var/lib/${PN}/classpath"
50 find "${WORKDIR}/${PN}-auth-mysql-0.9.0/lib/" -name '*.jar' -exec doins '{}' +
51 insinto "/usr/share/${PN}/schema"
52 find "${WORKDIR}/${PN}-auth-mysql-0.9.0/schema/" -name '*.sql' -exec doins '{}' +
53 insinto "/usr/share/${PN}/schema/upgrade"
54 find "${WORKDIR}/${PN}-auth-mysql-0.9.0/schema/upgrade/" -name '*.sql' -exec doins '{}' +
55 elog "Please add a mysql database and a user and load the sql files in /usr/share/guacamole/schema/ into it."
56 elog "You will also need to adjust the DB propeties in /etc/guacamole.properties!"
57 elog "The default user and it's password is \"guacadmin\"."
58 elog "You will also need to download the mysql-connector from here http://dev.mysql.com/downloads/connector/j/"
59 elog "and put the contained .jar file into /var/lib/guacamole/classpath!"
60 elog "-"
61 fi
62 if use ldap; then
63 echo lib-directory: "/var/lib/${PN}/classpath" >>"${S}/${PN}/doc/example/${PN}.properties"
64 echo auth-provider: net.sourceforge.guacamole.net.auth.ldap.LDAPAuthenticationProvider >>"${S}/${PN}/doc/example/${PN}.properties"
65 echo ldap-hostname: localhost >>"${S}/${PN}/doc/example/${PN}.properties"
66 echo ldap-port: 389 >>"${S}/${PN}/doc/example/${PN}.properties"
67 echo ldap-user-base-dn: ou=people,dc=example,dc=net >>"${S}/${PN}/doc/example/${PN}.properties"
68 echo ldap-username-attribute: uid >>"${S}/${PN}/doc/example/${PN}.properties"
69 echo ldap-config-base-dn: ou=groups,dc=example,dc=net >>"${S}/${PN}/doc/example/${PN}.properties"
70 sed -e 's:basic-user-mapping:#basic-user-mapping:' -i "${S}/${PN}/doc/example/${PN}.properties"
71 insinto "/var/lib/${PN}/classpath"
72 find "${WORKDIR}/${PN}-auth-ldap-0.9.0/lib/" -name '*.jar' -exec doins '{}' +
73 insinto "/usr/share/${PN}/schema"
74 doins "${WORKDIR}/${PN}-auth-ldap-0.9.0/schema/guacConfigGroup.ldif" "${WORKDIR}/${PN}-auth-ldap-0.9.0/schema/guacConfigGroup.schema"
75 elog "You will need to add and load the .schema file in /usr/share/guacamole/schema/ to your ldap server."
76 elog "There is also an example .lidf file for creating the users."
77 elog "-"
78 fi
79 sed -e 's:/path/to:/etc/guacamole:g' -i "${S}/${PN}/doc/example/${PN}.properties" || die "properties sed failed"
80 insinto /etc/"${PN}"
81 doins "${S}/${PN}/doc/example/guacamole.properties"
82 doins "${S}/${PN}/doc/example/user-mapping.xml"
83 insinto "/var/lib/${PN}"
84 newins "${S}/${PN}/target/${P}.war" "${PN}.war"
85 elog "Please unpack /var/lib/"${PN}"/"${PN}".war in to your servlet container! If it is an update,"
86 elog "delete the old content first!"
87 elog "Read: if you use the command below, delete everything within /var/lib/guacamole/guacamole first!"
88 elog "Please also link /etc/guacamole in to the lib directory of your servlet container."
89 elog "like this:"
90 elog "cd /var/lib/guacamole && mkdir guacamole && cd guacamole && jar -xvf ../guacamole.war && cd .. && mv guacamole /var/lib/tomcat-7/webapps/"
91 elog "ln -sf /etc/guacamole/guacamole.properties /usr/share/tomcat-7/lib/"
92 elog "You will also need to define users and connections in /etc/guacamole/user-mapping.xml if mysql is not used!"
93 }

  ViewVC Help
Powered by ViewVC 1.1.20