Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 68650 Details for
Bug 62197
Ebuild request for open-xchange
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
open-xchange-0.8.1.2.ebuild
open-xchange-0.8.1.2.ebuild (text/plain), 16.82 KB, created by
Jeremy Huddleston (RETIRED)
on 2005-09-17 00:55:09 UTC
(
hide
)
Description:
open-xchange-0.8.1.2.ebuild
Filename:
MIME Type:
Creator:
Jeremy Huddleston (RETIRED)
Created:
2005-09-17 00:55:09 UTC
Size:
16.82 KB
patch
obsolete
># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >inherit eutils webapp ssl-cert toolchain-funcs java-pkg versionator > >MY_PV=$(replace_version_separator 3 '-') >MY_P="${PN}-${MY_PV}" > >DESCRIPTION="A Collaboration and Integration Server Environment" >HOMEPAGE="http://www.open-xchange.org/" >SRC_URI="http://mirror.open-xchange.org/download/${MY_P}.tar.bz2 > http://www.mikefetherston.ca/OX/Crystal_OX_Theme.tgz" >LICENSE="GPL-2" >KEYWORDS="~x86" >RESTRICT="primaryuri" > >IUSE="ssl doc webdav mysql" > >S="${WORKDIR}/${MY_P}" > >RDEPEND=">=virtual/jre-1.4 > >=dev-java/java-config-1.2 > www-servers/tomcat > dev-perl/Net-SSLeay > dev-java/jdom > net-nds/openldap > app-text/ispell > dev-java/sun-javamail-bin > dev-perl/XML-NamespaceSupport > dev-perl/XML-SAX-Base > dev-perl/Authen-SASL > dev-perl/Convert-ASN1 > dev-perl/perl-ldap > net-www/webapp-config > mysql? ( dev-java/jdbc-mysql >=dev-db/mysql-4.1) > !mysql? (dev-java/jdbc3-postgresql dev-db/postgresql) > ssl? ( dev-libs/openssl dev-perl/IO-Socket-SSL)" > >DEPEND="${RDEPEND} > >=virtual/jdk-1.4" > >RDEPEND="${RDEPEND} > app-admin/sudo" > > >get_oxvar() { > local var=$1 > # COMMENT: Clean this up > more /etc/open-xchange/admintools.conf | sed -n "s:^\s*${var}=\"\(.*\)\":\1:p" | head -n 1 >} > >pkg_setup() { > > > if [ -e /etc/open-xchange/admintools.conf ] ; then > echo "Installation of OX detected" > if [[ -n ${OX_AUTODETECT} ]] ; then > if [[ ${OX_AUTODETECT} -eq 1 ]]; then > echo "Using Autodetect feature" > local OX_DBNAME_TEMP=$(get_oxvar DEFAULT_SQL_DB) > if [[ -n ${OX_DBNAME_TEMP} ]] ; then > OX_DBNAME="${OX_DBNAME_TEMP}" > fi > > local OX_DBUSER_TEMP=$(get_oxvar DEFAULT_SQL_USER) > if [[ -n ${OX_DBUSER_TEMP} ]] ; then > OX_DBUSER="${OX_DBUSER_TEMP}" > fi > > local OX_DBPASS_TEMP=$(get_oxvar DEFAULT_SQL_PASS) > if [[ -n ${OX_DBPASS_TEMP} ]] ; then > OX_DBPASS="${OX_DBPASS_TEMP}" > fi > > local OX_ORG_TEMP=$(get_oxvar ORGA) > if [[ -n ${OX_ORG_TEMP} ]] ; then > OX_ORG="${OX_ORG_TEMP}" > fi > > local OX_ROOTDN_TEMP=$(get_oxvar BINDDN) > if [[ -n ${OX_ROOTDN_TEMP} ]] ; then > OX_ROOTDN="${OX_ROOTDN_TEMP}" > fi > > local OX_ROOTPW_TEMP=$(get_oxvar BINDPW) > if [[ -n ${OX_ROOTPW_TEMP} ]] ; then > OX_ROOTPW="${OX_ROOTPW_TEMP}" > fi > > if [[ -e "/etc/open-xchange/groupware/ldap.conf" ]] ; then > # taken from admintools.conf self > local OX_BASEDN_TEMP=`grep -v '^#' /etc/open-xchange/groupware/ldap.conf | grep -i BASE | head -n 1 | awk {'print $2'}` > if [[ -n ${OX_BASEDN_TEMP} ]] ; then > OX_BASEDN="${OX_BASEDN_TEMP}" > fi > fi > fi > fi > fi > > if [[ -z ${OX_DBNAME} ]] ; then > einfo " " > ewarn "The environment \$OX_DBNAME was not set, it is used for the correct name of the database. I will take the default" > ewarn "value 'open_xchange'. " > einfo " " > OX_DBNAME="open_xchange" > FAIL=1 > fi > if [[ -z ${OX_DBUSER} ]] ; then > einfo " " > ewarn "The environment \$OX_DBUSER was not set, it is used for the user accessing the database. I will take the default" > ewarn "value 'open_xchange'." > einfo " " > OX_DBUSER="open_xchange" > FAIL=1 > fi > if [[ -z ${OX_DBPASS} ]] ; then > einfo " " > ewarn "The environment \$OX_DBPASS was not set, it used for accessing the database. I will take the default" > ewarn "value 'xxx'." > einfo " " > OX_DBPASS="xxx" > FAIL=1 > fi > > if [[ -z ${OX_DOMAIN} ]] ; then > einfo " " > ewarn "The environment \$OX_DOMAIN was not set. I will take the default" > ewarn "value 'example.org'." > einfo " " > OX_DOMAIN="example.org" > FAIL=1 > fi > if [[ -z ${OX_ORG} ]] ; then > einfo " " > ewarn "The environment \$OX_ORG was not set. I will take the default" > ewarn "value 'Example Org'." > einfo " " > OX_ORG="Example Org" > FAIL=1 > fi > if [[ -z ${OX_BASEDN} ]] ; then > einfo " " > ewarn "The environment \$OX_BASEDN was not set. I will take the default" > ewarn "value 'dc=example,dc=org'." > einfo " " > OX_BASEDN="dc=example,dc=org" > FAIL=1 > fi > if [[ -z ${OX_ROOTDN} ]] ; then > einfo " " > ewarn "The environment \$OX_ROOTDN was not set. I will take the default" > ewarn "value 'cn=Manager,${OX_BASEDN}'." > einfo " " > OX_ROOTDN="cn=Manager,${OX_BASEDN}" > FAIL=1 > fi > if [[ -z ${OX_ROOTPW} ]] ; then > einfo " " > ewarn "The environment \$OX_ROOTPW was not set, it is used for accesing the LDAP-Server." > ewarn " I will take the default" > ewarn "value 'secret'." > einfo " " > OX_ROOTPW="secret" > FAIL=1 > fi > > if [[ ${FAIL} -eq 1 ]] ; then > ewarn "If you don't want to use the default values then hit <Ctrl-C>" > ewarn "to cancel and set the environment before emerging open-xchange." > einfo " " > echo -ne " >>> " > for TICKER in 1 2 3 4 5 6 7 8; do > # Double beep here. > echo -ne "$TICKER " > echo -ne "\a" ; sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null > echo -ne "\a" ; sleep 1 > done > sleep 5 > echo " " > fi > > webapp_pkg_setup >} > >src_unpack() { > unpack ${A} > cd ${S} > > # COMMENT: This shoud be sent upstream... > #++ reported bug at open-xchang.org #656 > sed -i "s|\${DESTDIR}|\$(DESTDIR)|g" Makefile.am > > export WANT_AUTOMAKE=1.8 > export WANT_AUTOCONF=2.5 > libtoolize --force --copy || die > aclocal -I m4 || die > automake -a -f -c || die > autoheader || die > autoconf || die >} > >src_compile() { > local myconf > local tempvar > local tomcatdir > > tomcatdir=`java-config -g CATALINA_HOME` > > if has_version '>=www-servers/tomcat-5.0.28-r4'; then > # it is now installed to the profile-directory choosen from /etc/conf.d/tomcat-5 > PROFILE="$(sed -n "s:^PROFILE=\(.*\):\1:p" /etc/conf.d/tomcat-5)" > CATALINA_BASE="$(sed -n "s:^CATALINA_BASE=\(.*\)/$.*:\1:p" /etc/conf.d/tomcat-5)" > SERVLETDIR="${CATALINA_BASE}/${PROFILE}/webapps" > else > SERVLETDIR="${tomcatdir}/webapps" > fi > > > myconf="${myconf} --with-servletdir=${SERVLETDIR}" > > myconf="${myconf} $(use_enable doc) $(use_enable webdav) $(use_enable ssl)" > > if use mysql ; then > tempvar="$(java-config --classpath=$(java-config -l | sed -n "s:^\[\(jdbc[^-]*-mysql[^]]*\).*:\1:p" | head -n 1))" > if [[ -f "${tempvar}" && "${tempvar}" != "" ]]; then > myconf="${myconf} --with-jdbcjar=$(java-config --classpath=$(java-config -l | sed -n "s:^\[\(jdbc[^-]*-mysql[^]]*\).*:\1:p" | head -n 1))" > else > myconf="${myconf} --with-jdbcjar=/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.11-stable-bin.jar" > fi > myconf="${myconf} --with-dbdriver=com.mysql.jdbc.Driver" > else #if use postgres ; then > #nothing or postgres was selected postgres should have been installed > tempvar="$(java-config --classpath=$(java-config -l | sed -n "s:^\[\(jdbc[^-]*-postgresql[^]]*\).*:\1:p" | head -n 1))" > if [[ -f "${tempvar}" && "${tempvar}" != "" ]]; then > myconf="${myconf} --with-jdbcjar=$(java-config --classpath=$(java-config -l | sed -n "s:^\[\(jdbc[^-]*-postgresql[^]]*\).*:\1:p" | head -n 1))" > else > myconf="${myconf} --with-jdbcjar=/usr/share/jdbc3-postgresql/lib/jdbc3-postgresql.jar" > fi > myconf="${myconf} --with-dbdriver=org.postgresql.Driver" > fi > > > if has_version '>=www-servers/tomcat-5*'; then > myconf="${myconf} --with-jsdkjar=${tomcatdir}/common/lib/servlet-api.jar" > #else > # tempvar="`for foo in $(java-config --classpath=$(java-config -l | sed -n "s:^\[\(servletapi-2\.[3456789][^]]*\)\].*:\1:p" | head -n 1)|sed "s/:/ /");do if ( echo ${foo} | grep -iq "servlet-api.jar$" ) ; then echo ${foo} ; break ; fi ; done`" > # if [[ -f ${tempvar} && ${tempvar} != "" ]]; then > # myconf="${myconf} --with-jsdkjar=${tempvar}" > # else > # myconf="${myconf} --with-jsdkjar=/usr/share/servletapi-2.3/lib/servlet-api.jar" > # fi > fi > > > > # Servlet API > myconf="${myconf} --with-dbname=${OX_DBNAME}" > myconf="${myconf} --with-dbuser=${OX_DBUSER}" > myconf="${myconf} --with-dbpass=${OX_DBPASS}" > myconf="${myconf} --with-domain=${OX_DOMAIN}" > myconf="${myconf} --with-organization=${OX_ORG}" > myconf="${myconf} --with-basedn=${OX_BASEDN}" > myconf="${myconf} --with-rootdn=${OX_ROOTDN}" > myconf="${myconf} --with-rootpw=${OX_ROOTPW}" > > > myconf="${myconf} --with-mailjar=/usr/share/sun-javamail-bin/lib/mail.jar" > myconf="${myconf} --with-activationjar=/usr/share/sun-jaf-bin/lib/activation.jar" > myconf="${myconf} --with-jdomjar=$(java-config --classpath=$(java-config -l | sed -n "s:^\[\(jdom[^]]*\).*:\1:p" | head -n 1))" > myconf="${myconf} --with-xercesjar=/usr/share/xerces-2/lib/xercesImpl.jar" > myconf="${myconf} --with-jni-dir=$(java-config -O)/include" > myconf="${myconf} --with-runuid=tomcat" > myconf="${myconf} --with-rungid=tomcat" > myconf="${myconf} --with-tomcatuser=tomcat" > myconf="${myconf} --with-htdocsdir=${MY_HTDOCSDIR}" > myconf="${myconf} --with-cgibindir=${MY_CGIBINDIR}" > myconf="${myconf} --sysconfdir=/etc/open-xchange" > myconf="${myconf} --datadir=/usr/share/open-xchange" > myconf="${myconf} --includedir=/usr/include/open-xchange" > > > # COMMENT: These are automatic > #myconf="${myconf} --prefix=/usr" > #myconf="${myconf} --infodir=/usr/share/info" > #myconf="${myconf} --mandir=/usr/share/man" > > # COMMENT: This should probably be --libdir=/usr/$(get_libdir)/open-xchange > myconf="${myconf} --libdir=/usr/$(get_libdir)/open-xchange" > myconf="${myconf} --localstatedir=/var/open-xchange" > > econf ${myconf} || die "bad ./configure" > > # COMMENT: This should likely be sed -i > # ++read that in man 5 ebuild, i thought it is the more official way > # COMMENT: dosed modifies ${D}/Makefile > > # COMMENT: Why can't this be done in Makefile.am or through a configure option? > sed -i "s|oxservletdir =|oxservletdir = ${SERVLETDIR}|g" Makefile > > # COMMENT: These changes shoule be in src_unpack() > # replace the string "jikes" with "modern". We dont want to see all jikes warnings > sed -i "s|jikes|modern|g" build.xml > > emake -j1 || die "make failed" > > # COMMENT: All these remaining changes shoule be in src_unpack() > # use sudo instead of su for the startup script and > # correct var-log > for foo in groupware sessiond webmail > do > sed -i "s:^\([\t ]*\)\(su \$USER.*$\):\1#\2:gI;s:^\([\t ]*\)#\(sudo -u \$USER.*\)$:\1\2:gI" system/etc/init.d/${foo} > sed -i "s|open-xchange/log|log/open-xchange|g" system/etc/init.d/${foo} > done > > sed -i "s|open-xchange/log|log/open-xchange|g" conf/groupware/system.properties > > # correct ispell-handling of german dictionary > sed -i "s|-ddeutsch|-dgerman|g" conf/webmail/spellcheck.cfg > > if use ssl; then > # change login.pm-script if ssl should be used > sed -i "s|connection_mode = 3;|connection_mode = 2;|g" src/misc/login/login.pm > fi > > # change image- and link- to the open-xchange location > find groupware/ -regex '.*\.htm' |xargs sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" > find templates/ -regex '.*\.htm' |xargs sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" > find webmail/ -regex '.*\.htm' |xargs sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" > > find templates/ -regex '.*\.lang' |xargs sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" > > find system/www/ -regex '.*\.htm' |xargs sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" > find system/www/ -regex '.*\.js' |xargs sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" > > sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" conf/groupware/system.properties > sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" conf/webmail/system.properties >} > >src_install() { > webapp_src_preinst > > dodoc AUTHORS ChangeLog INSTALL NEWS README > > # Install this big thing > cd ${S} > make DESTDIR=${D} install || die "Failed on make install" > > # remove obsolete log-files they should be saved in /var/log/open-xchange > rm ${D}/var/open-xchange/log/groupware.log > rm ${D}/var/open-xchange/log/jserv.log > rm ${D}/var/open-xchange/log/sessiond.log > rm ${D}/var/open-xchange/log/webmail.log > rmdir ${D}/var/open-xchange/log/ > > # create log-dir > dodir /var/log/open-xchange > > # remove unessary war-files, they are needed for deploying application > rm ${D}/usr/open-xchange/*.war > > # remove empty include-dir > rmdir ${D}/usr/include/open-xchange/ > rmdir ${D}/usr/include/ > > > # remove unneeded init-script - not used by gentoo > rm ${D}/etc/open-xchange/init.d/openexchange > > # create sslcerts-dir > if use ssl; then > dodir /etc/open-xchange/groupware/sslcerts/oxCA > dodir /etc/open-xchange/groupware/sslcerts/oxCERTS > fi > > # Init script > newinitd "${FILESDIR}/init.d.open-xchange" open-xchange || die "newinitd failed" > > insinto ${SERVLETDIR} > doins lib/*.war > > # Change default icon theme > insinto ${MY_HTDOCSDIR}/cfintranet/images/top/EN/ > insopts -m0644 > doins ${WORKDIR}/*.png > insinto ${MY_HTDOCSDIR}/cfintranet/images/top/DE/ > doins ${WORKDIR}/*.png > > # now mark all items with meta-info for webapp-script > cd ${D}${MY_HTDOCSDIR} > for x in `find . -type f -print` ; do > webapp_serverowned ${MY_HTDOCSDIR}/$x > done > > # Install webapp > webapp_src_install >} > >pkg_preinst(){ > # COMMENT: Why don't we use the existing mail user? > > # create user mailadmin, needed for mailsupport > enewuser mailadmin -1 -1 /dev/null users > _UID=`getent passwd mailadmin | awk -F : '{print $3}'` > > # get the default guid of the group 'users' > OX_STDGID=`getent group users | awk -F : '{print $3}'` > > # replace the SuSE group id 500 of users with the gentoo group id of the group 'users' for the mailadmin in ldif + uid > sed -i "s|500|${OX_STDGID}|g" ${D}/usr/share/open-xchange/init_ldap.ldif > sed -i "s|501|${_UID}|g" ${D}/usr/share/open-xchange/init_ldap.ldif > > # replace the SuSE standard group id 500 with the gentoo group id of the group 'users' > sed -i "s|500|${OX_STDGID}|g" ${D}/etc/open-xchange/admintools.conf > OX_STDGID=`expr ${OX_STDGID} + 1` > sed -i "s|501|${OX_STDGID}|g" ${D}/etc/open-xchange/admintools.conf > >} >pkg_postinst() { > webapp_pkg_postinst > > chgrp -R apache /var/open-xchange/* > einfo " " > einfo " " > einfo " ===========================================================" > einfo " " > einfo " You have successfully installed Open-Xchange" > einfo " " > einfo " ===========================================================" > einfo " " > einfo " o FILE LOCATIONS" > einfo " 1. Configuration: /etc/open-xchange" > einfo " 2. HTML Files: /usr/share/open-xchange" > einfo " " > einfo " o STARTING and STOPPING the Open-Xchange" > einfo " /etc/init.d/openexchange start" > einfo " /etc/init.d/openexchange stop" > einfo " /etc/init.d/openexchange restart" > einfo " " > einfo "Execute the following command" > einfo "ebuild /var/db/pkg/www-apps/${PF}/${PF}.ebuild config" > einfo "to setup the initial open-xchange environment." > einfo " " > > if use ssl; then > einfo "Open-Xchange has been compiled with SSL-support." > einfo "This means communication between OX-components is encrypted too." > einfo "Keys and Certificates are checked:" > einfo "" > local fail=0 > if [[ ! -e "${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/groupwarekey.pem" ]] ; then > ewarn "You have to create key: '${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/groupwarekey.pem'" > fail=1 > fi > if [[ ! -e "${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/groupwarecert.pem" ]] ; then > ewarn "You have to create certificate: '${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/groupwarecert.pem'" > fail=1 > fi > if [[ ! -e "${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/sessiondkey.pem" ]] ; then > ewarn "You have to create key: '${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/sessiondkey.pem'" > fail=1 > fi > if [[ ! -e "${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/sessiondcert.pem" ]] ; then > ewarn "You have to create certificate: '${ROOT}/etc/open-xchange/groupware/sslcerts/oxCERTS/sessiondcert.pem'" > fail=1 > fi > if [[ ! -e "${ROOT}/etc/open-xchange/groupware/sslcerts/oxCA/cacert.pem" ]]; then > ewarn "You have to create CA-certificate: '${ROOT}/etc/open-xchange/groupware/sslcerts/oxCA/cacert.pem'" > fail=1 > fi > if [[ ${fail} -eq 1 ]] ; then > ewarn "No or not all keys and certificates found!" > ewarn "You should generate Certificate-files and -keys." > ewarn "" > ewarn "You could also disable SSL-support just reemerge the package with USE=\"-ssl\"." > else > einfo "Everything ok" > fi > fi > if has_version '=net-nds/openldap-2.1*'; then > ewarn "You have got OpenLDAP-2.1.* installed." > ewarn "Please make sure you've got enabled aci support for this package." > ewarn "For more information: http://gentoo-wiki.com/HOWTO_Open-Xchange#OpenLDAP" > ewarn "" > ewarn "If you already have this done, ignore this warning" > fi >} > >pkg_config() { > # COMMENT: You should create self signed certs if they don't exist > > if [[ ! -e "${ROOT}/etc/open-xchange/groupware/ldap.conf" ]] ; then > dosym /etc/openldap/ldap.conf /etc/open-xchange/groupware/ldap.conf > fi > if [[ ! -e "${ROOT}/etc/open-xchange/webmail/ldap.conf" ]] ; then > dosym /etc/openldap/ldap.conf /etc/open-xchange/webmail/ldap.conf > fi > if [[ ! -e "${ROOT}/etc/openldap/schema/openxchange.schema" ]] ; then > dosym /usr/share/open-xchange/openxchange.schema /etc/openldap/schema/openxchange.schema > fi > correctfilespool ># ewarn "Postgres-Database is setup" ># ewarn "to cancel." ># einfo " " ># echo -ne " >>> " ># for TICKER in 1 2 3 4 5 6 7 8; do ># # Double beep here. ># echo -ne "$TICKER " ># echo -ne "\a" ; sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null ># echo -ne "\a" ; sleep 1 ># done ># sleep 5 ># echo " " ># su postgres -c "createuser -- > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 62197
:
38529
|
38692
|
38693
|
38705
|
38708
|
38710
|
38778
|
38779
|
38793
|
38831
|
38832
|
38907
|
38908
|
38909
|
38910
|
38911
|
38912
|
38950
|
39161
|
39638
|
40395
|
40677
|
43006
|
45598
|
51564
|
52969
|
57322
|
58355
|
58364
|
58367
|
59319
|
59327
|
61190
|
61191
|
61270
|
62568
|
66393
|
66394
|
66402
|
66592
|
66692
|
66817
|
66818
|
66890
|
66902
|
67034
|
67087
|
67399
|
67511
|
67595
|
67907
|
68648
|
68650
|
68695
|
68701
|
68702
|
68705
|
68706
|
68895
|
68946
|
68947
|
68959
|
68960
|
68961
|
68968
|
68973
|
68981
|
68991
|
68993
|
68994
|
69097
|
69101
|
69139
|
69140
|
69179
|
69205
|
70998
|
72090
|
72748
|
77974
|
77975
|
79765
|
79766
|
79767
|
79851
|
79943
|
79944
|
80431
|
80432
|
83756
|
83946
|
85610
|
87053
|
87995
|
87996
|
87997
|
87998
|
90889
|
94269
|
100851
|
100852
|
105319