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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Jun 13 09:29:48 2015 UTC (4 years, 8 months ago) by nativemad
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
version bump, license change, support for postgres and noauth extensions

(Portage version: 2.2.18/cvs/Linux i686, signed Manifest commit with key 60373227)

1 # Copyright 1999-2015 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.9.3.ebuild,v 1.1 2014/10/28 16:35:48 nativemad Exp $
4
5 EAPI=5
6
7 inherit eutils
8 DESCRIPTION="Guacamole is a html5 vnc client as servlet"
9 HOMEPAGE="http://guac-dev.org/"
10 SRC_URI="mirror://sourceforge/${PN}/${PN}-client-${PV}.tar.gz
11 mysql? ( http://sourceforge.net/projects/${PN}/files/current/extensions/${PN}-auth-jdbc-${PV}.tar.gz )
12 postgres? ( http://sourceforge.net/projects/${PN}/files/current/extensions/${PN}-auth-jdbc-${PV}.tar.gz )
13 noauth? ( http://sourceforge.net/projects/${PN}/files/current/extensions/${PN}-auth-noauth-${PV}.tar.gz )
14 ldap? ( http://sourceforge.net/projects/guacamole/files/current/extensions/${PN}-auth-ldap-${PV}.tar.gz )"
15 S="${WORKDIR}/${PN}-client-${PV}"
16
17 LICENSE="MIT"
18
19 SLOT="0"
20
21 KEYWORDS="~x86 ~amd64"
22
23 IUSE="ldap mysql postgres noauth"
24 REQUIRED_USE="ldap? ( !mysql !postgres !noauth )
25 mysql? ( !ldap !postgres !noauth )
26 postgres? ( !ldap !mysql !noauth )
27 noauth? ( !ldap !mysql !noauth )"
28
29 DEPEND="dev-java/maven-bin:*"
30
31 RDEPEND="${DEPEND}
32 www-servers/tomcat[websockets]
33 >virtual/jre-1.6
34 net-misc/guacamole-server
35 mysql? ( virtual/mysql )
36 postgres? ( dev-db/postgresql )
37 ldap? ( net-nds/openldap )"
38
39 src_compile() {
40 mkdir "${HOME}"/.m2
41 cat /usr/share/`readlink /usr/bin/mvn | sed 's:mvn:maven-bin:'`/conf/settings.xml | \
42 sed -e 's:/path/to/local/repo:'${HOME}/.m2':g' -e 's:<!-- localRepo::' >"${S}"/settings.xml
43 mvn -s "${S}"/settings.xml package
44 }
45
46 src_install() {
47 echo guacd-hostname: localhost >>"${S}/${PN}/doc/example/${PN}.properties"
48 echo guacd-port: 4822 >>"${S}/${PN}/doc/example/${PN}.properties"
49 echo basic-user-mapping: /etc/guacamole/user-mapping.xml >>"${S}/${PN}/doc/example/${PN}.properties"
50 if use noauth; then
51 sed -e 's:basic-user-mapping:#basic-user-mapping:' -i "${S}/${PN}/doc/example/${PN}.properties"
52 echo lib-directory: "/var/lib/${PN}/classpath" >>"${S}/${PN}/doc/example/${PN}.properties"
53 echo auth-provider: net.sourceforge.guacamole.net.auth.noauth.NoAuthenticationProvider >>"${S}/${PN}/doc/example/${PN}.properties"
54 echo noauth-config: /etc/guacamole/noauth-config.xml >>"${S}/${PN}/doc/example/${PN}.properties"
55 insinto "/var/lib/${PN}/classpath"
56 find "${WORKDIR}/${PN}-auth-noauth-${PV}/" -name '*.jar' -exec doins '{}' +
57 insinto "/etc/guacamole"
58 find "${WORKDIR}/${PN}-auth-noauth-${PV}/doc/example/" -name '*.xml' -exec doins '{}' +
59 elog "Warning: Setting No Athentication is obviously very insecure! Only use it if you know what you are doing!"
60 elif use mysql; then
61 echo lib-directory: "/var/lib/${PN}/classpath" >>"${S}/${PN}/doc/example/${PN}.properties"
62 echo auth-provider: net.sourceforge.guacamole.net.auth.mysql.MySQLAuthenticationProvider >>"${S}/${PN}/doc/example/${PN}.properties"
63 echo mysql-hostname: localhost >>"${S}/${PN}/doc/example/${PN}.properties"
64 echo mysql-port: 3306 >>"${S}/${PN}/doc/example/${PN}.properties"
65 echo mysql-database: guacamole >>"${S}/${PN}/doc/example/${PN}.properties"
66 echo mysql-username: guacamole >>"${S}/${PN}/doc/example/${PN}.properties"
67 echo mysql-password: some_password >>"${S}/${PN}/doc/example/${PN}.properties"
68 sed -e 's:basic-user-mapping:#basic-user-mapping:' -i "${S}/${PN}/doc/example/${PN}.properties"
69 insinto "/var/lib/${PN}/classpath"
70 find "${WORKDIR}/${PN}-auth-jdbc-${PV}/mysql/" -name '*.jar' -exec doins '{}' +
71 insinto "/usr/share/${PN}/schema"
72 find "${WORKDIR}/${PN}-auth-jdbc-${PV}/mysql/schema/" -name '*.sql' -exec doins '{}' +
73 insinto "/usr/share/${PN}/schema/upgrade"
74 find "${WORKDIR}/${PN}-auth-jdbc-${PV}/mysql/schema/upgrade/" -name '*.sql' -exec doins '{}' +
75 elog "Please add a mysql database and a user and load the sql files in /usr/share/guacamole/schema/ into it."
76 elog "You will also need to adjust the DB propeties in /etc/guacamole.properties!"
77 elog "The default user and it's password is \"guacadmin\"."
78 elog "You will also need to download the mysql-connector from here http://dev.mysql.com/downloads/connector/j/"
79 elog "and put the contained .jar file into /var/lib/guacamole/classpath!"
80 elog "-"
81 elif use postgres; then
82 echo lib-directory: "/var/lib/${PN}/classpath" >>"${S}/${PN}/doc/example/${PN}.properties"
83 echo auth-provider: net.sourceforge.guacamole.net.auth.postgresql.PostgreSQLAuthenticationProvider >>"${S}/${PN}/doc/example/${PN}.properties"
84 echo postgresql-hostname: localhost >>"${S}/${PN}/doc/example/${PN}.properties"
85 echo postgresql-port: 5432 >>"${S}/${PN}/doc/example/${PN}.properties"
86 echo postgresql-database: guacamole >>"${S}/${PN}/doc/example/${PN}.properties"
87 echo postgresql-username: guacamole >>"${S}/${PN}/doc/example/${PN}.properties"
88 echo postgresql-password: some_password >>"${S}/${PN}/doc/example/${PN}.properties"
89 sed -e 's:basic-user-mapping:#basic-user-mapping:' -i "${S}/${PN}/doc/example/${PN}.properties"
90 insinto "/var/lib/${PN}/classpath"
91 find "${WORKDIR}/${PN}-auth-jdbc-${PV}/postgresql/" -name '*.jar' -exec doins '{}' +
92 insinto "/usr/share/${PN}/schema"
93 find "${WORKDIR}/${PN}-auth-jdbc-${PV}/postgresql/schema/" -name '*.sql' -exec doins '{}' +
94 insinto "/usr/share/${PN}/schema/upgrade"
95 find "${WORKDIR}/${PN}-auth-jdbc-${PV}/postgresql/schema/upgrade/" -name '*.sql' -exec doins '{}' +
96 elog "Please add a postgresql database and a user and load the sql files in /usr/share/guacamole/schema/ into it."
97 elog "You will also need to adjust the DB propeties in /etc/guacamole.properties!"
98 elog "The default user and it's password is \"guacadmin\"."
99 elog "You will also need to download the postgresql-connector from here https://jdbc.postgresql.org/download.html#current"
100 elog "and put the contained .jar file into /var/lib/guacamole/classpath!"
101 elog "-"
102 elif use ldap; then
103 echo lib-directory: "/var/lib/${PN}/classpath" >>"${S}/${PN}/doc/example/${PN}.properties"
104 echo auth-provider: net.sourceforge.guacamole.net.auth.ldap.LDAPAuthenticationProvider >>"${S}/${PN}/doc/example/${PN}.properties"
105 echo ldap-hostname: localhost >>"${S}/${PN}/doc/example/${PN}.properties"
106 echo ldap-port: 389 >>"${S}/${PN}/doc/example/${PN}.properties"
107 echo ldap-user-base-dn: ou=people,dc=example,dc=net >>"${S}/${PN}/doc/example/${PN}.properties"
108 echo ldap-username-attribute: uid >>"${S}/${PN}/doc/example/${PN}.properties"
109 echo ldap-config-base-dn: ou=groups,dc=example,dc=net >>"${S}/${PN}/doc/example/${PN}.properties"
110 sed -e 's:basic-user-mapping:#basic-user-mapping:' -i "${S}/${PN}/doc/example/${PN}.properties"
111 insinto "/var/lib/${PN}/classpath"
112 find "${WORKDIR}/${PN}-auth-ldap-${PV}/lib/" -name '*.jar' -exec doins '{}' +
113 insinto "/usr/share/${PN}/schema"
114 doins "${WORKDIR}/${PN}-auth-ldap-${PV}/schema/guacConfigGroup.ldif" "${WORKDIR}/${PN}-auth-ldap-${PV}/schema/guacConfigGroup.schema"
115 elog "You will need to add and load the .schema file in /usr/share/guacamole/schema/ to your ldap server."
116 elog "There is also an example .lidf file for creating the users."
117 elog "-"
118 else
119 insinto "/etc/${PN}"
120 doins "${WORKDIR}/${PN}-client-${PV}/${PN}/doc/example/user-mapping.xml"
121 fi
122 insinto "/etc/${PN}"
123 doins "${S}/${PN}/doc/example/guacamole.properties"
124 doins "${S}/${PN}/doc/example/user-mapping.xml"
125 insinto "/var/lib/${PN}"
126 newins "${S}/${PN}/target/${P}.war" "${PN}.war"
127 elog "If it is an update, please make sure to delete the old webapp in /var/lib/tomcat-7/webapps/ first!"
128 elog "To deploy guacamole with tomcat, you will need to link the war file and create the configuration!"
129 elog "ln -sf /var/lib/${PN}/${PN}.war /var/lib/tomcat-7/webapps/ && mkdir /var/lib/tomcat-7/webapps/.${PN}"
130 elog "You will also need to create a configuration in /var/lib/tomcat-7/webapps/.${PN}/${PN}.properties"
131 elog "See http://guac-dev.org/doc/0.9.7/gug/configuring-guacamole.html#initial-setup for a basic setup"
132 elog "or http://guac-dev.org/doc/0.9.7/gug/jdbc-auth.html for a database for authentication and host definitions."
133 }

  ViewVC Help
Powered by ViewVC 1.1.20