diff options
author | 2010-01-13 15:14:46 +0000 | |
---|---|---|
committer | 2010-01-13 15:14:46 +0000 | |
commit | 72dfefe8972a4c95d0996635f316283c6cbe6861 (patch) | |
tree | 16020bca0f09c312eccb491f8a3420365877e1ca | |
parent | ldap is needed for sogo (diff) | |
download | gnustep-72dfefe8972a4c95d0996635f316283c6cbe6861.tar.gz gnustep-72dfefe8972a4c95d0996635f316283c6cbe6861.tar.bz2 gnustep-72dfefe8972a4c95d0996635f316283c6cbe6861.zip |
Add live ebuild, also by steveb in bug #295636
svn path=/overlay/; revision=427
-rw-r--r-- | gnustep-apps/sogo/ChangeLog | 6 | ||||
-rw-r--r-- | gnustep-apps/sogo/Manifest | 7 | ||||
-rw-r--r-- | gnustep-apps/sogo/files/sogod.confd | 57 | ||||
-rw-r--r-- | gnustep-apps/sogo/files/sogod.initd.1 | 72 | ||||
-rw-r--r-- | gnustep-apps/sogo/sogo-1.1.0-r1.ebuild | 3 | ||||
-rw-r--r-- | gnustep-apps/sogo/sogo-9999.ebuild | 154 |
6 files changed, 296 insertions, 3 deletions
diff --git a/gnustep-apps/sogo/ChangeLog b/gnustep-apps/sogo/ChangeLog index a469872..befce2a 100644 --- a/gnustep-apps/sogo/ChangeLog +++ b/gnustep-apps/sogo/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*sogo-9999 (13 Jan 2010) + + 13 Jan 2010; Bernard Cafarelli <voyageur@gentoo.org> sogo-1.1.0-r1.ebuild, + +sogo-9999.ebuild, +files/sogod.confd, +files/sogod.initd.1: + Add live ebuild, also by steveb in bug #295636 + 12 Jan 2010; Bernard Cafarelli <voyageur@gentoo.org> sogo-1.1.0-r1.ebuild: ldap is mandatory diff --git a/gnustep-apps/sogo/Manifest b/gnustep-apps/sogo/Manifest index a2828a5..8e29c59 100644 --- a/gnustep-apps/sogo/Manifest +++ b/gnustep-apps/sogo/Manifest @@ -1,5 +1,8 @@ +AUX sogod.confd 3033 RMD160 6f3de22c18324cde833ae805ca6b997f47f65be3 SHA1 fbb45d9a42f18baeb37f31f062f682aa3d9a83a6 SHA256 4bc4617ed7af02251b81ea11bb4152e7b95561c0d3d36e3f14c0f5bfb61a790f AUX sogod.initd 1763 RMD160 9b68d4650cf5aacab5e9896193e1d8a18613458e SHA1 c852e81ded69911c359ac5a551414afc119b26b2 SHA256 3f1a6764a7c2ae47080e916fadfcb2139e0a237d3ee8cd1257a5e024a090ee59 +AUX sogod.initd.1 1743 RMD160 76bbc10b05012859c4ec6b1cddd2c33a19f0c549 SHA1 c424aa09b1baf437d2f6b087688f4fa486ee7136 SHA256 f21c6fe81da61c5dc6859daeb4d79f06edd16458895352216c66f45a4be27211 DIST SOGo-1.1.0.tar.gz 3613661 RMD160 b6fd66c0825f34e3fbc12d23c9b8c144a5b9cd65 SHA1 0e19f79fd764e9deba14a6346636b7ee86832014 SHA256 950e1a954d8905e187e09336893c50b3c7a16de42ada5c50932766974d5e7a13 -EBUILD sogo-1.1.0-r1.ebuild 4574 RMD160 e5bbe37f8230b149882c93b2acf9cb46542a56ca SHA1 692d8dbdfda2e293f7d3cc7bf5cae0d00607eb0b SHA256 32d502c320cee0314dbbe0b6c1fbee6578477170d8e53f119b569026d5ad07b3 -MISC ChangeLog 359 RMD160 fd68b09bedc7b556db57c0d68b97cef27723e1c2 SHA1 c5a285e2a64f3da03ebc9b6bf412277ad12e555c SHA256 b27418cd71193c7cffa5e73f19231cb2c9f372703c58d2ab880ef68d06139ec8 +EBUILD sogo-1.1.0-r1.ebuild 4622 RMD160 fd2ebec0b08f961365f9a41af6012a6123144296 SHA1 c2fd21238b9cb529342442d062ae69bd7f17ecc4 SHA256 f3cfd8c1b15fce2249ec887be5326dad9f218581300519dfbd9a3cd6879712a5 +EBUILD sogo-9999.ebuild 6007 RMD160 022ceae107820e33ef7188bebb04e52921c8a28d SHA1 8a3d91cecd7d60de7ee526712ab03be11dde95eb SHA256 2e6282740d026d5ebd4b7ecef9b98986197fbcb40272be49b8767bd1811d6373 +MISC ChangeLog 476 RMD160 1572a4c33f6bd4b6b1042acd6a12b5ec91d44b87 SHA1 44464b83c63eb11d3a206485e027cb086508e2a7 SHA256 0dbcccf6808cd38895cd1b70925d81dc8a85fa35ec198015cddcd4caaa875d26 MISC metadata.xml 793 RMD160 e5e134c336e1294210a98e7ecdf2182b3548eedb SHA1 e168a20cbcf7834b5f9bdd68b5e85b6202f72c35 SHA256 a48efb3457db158cb5420394060ae92c2d3b232a4f01e804e903b1154f80560b diff --git a/gnustep-apps/sogo/files/sogod.confd b/gnustep-apps/sogo/files/sogod.confd new file mode 100644 index 0000000..324c6e0 --- /dev/null +++ b/gnustep-apps/sogo/files/sogod.confd @@ -0,0 +1,57 @@ +# /etc/conf.d/sogod: config file for /etc/init.d/sogod + +# Options for SOGo +SOGOD_OPTS="" + +# Enable all or a subset of the options below to run +# SOGo with additional debug options +### +#SOGOD_OPTS="${SOGOD_OPTS} -DAVParserDebugProp YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SOGoDebugLeaks YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SOGoDebugRequests YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SOGoUIxDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoClassRegistryDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugKeyLookup YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugProductLoading YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugProductRegistry YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugRequestClassification YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugTraversal YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugAuthLookup YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugFactory YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugNegotiate YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugPlistObject YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugRestore YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSResourceManagerDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSWebMethodDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoObjCClassDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectDAVDispatcherDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectDataSourceDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectMethodDispatcherDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectRequestHandlerDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectSOAPDispatcherDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectXmlRpcDispatcherDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoPageInvocationDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoProductResourceManagerDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoRendererDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoSecurityManagerDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugActions YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugComponentAwake YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugComponentDefinition YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugComponentLookup YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugCursor YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugHttpTransaction YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugKeyPathAssociation YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugResourceLookup YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugStaticLinkProcessing YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugTakeValues YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebugZipResponse YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WODebuggingEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WOPageRequestHandlerDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WOResourceURLAssociationDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WOSimpleHTTPParserDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WOSimpleHTTPParserHeavyDebugEnabled YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WOxComponentElemBuilderDebugEnabled YES" +# Additional useful things for debugging +#SOGOD_OPTS="${SOGOD_OPTS} -SoLogSecurityDeclarations YES" +#SOGOD_OPTS="${SOGOD_OPTS} -SoRedirectToDefaultMethods YES" +#SOGOD_OPTS="${SOGOD_OPTS} -WOIsRedirectionEnabled YES" diff --git a/gnustep-apps/sogo/files/sogod.initd.1 b/gnustep-apps/sogo/files/sogod.initd.1 new file mode 100644 index 0000000..8e5b397 --- /dev/null +++ b/gnustep-apps/sogo/files/sogod.initd.1 @@ -0,0 +1,72 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +sogod_bin="" +sogod_port="" + +depend() { + need net + after pg_autovacuum postgresql mysql + after slapd + after mta + after memcached +} + +checkconfig() { + if [ -f "/etc/GNUstep/GNUstep.conf" ]; then + source /etc/GNUstep/GNUstep.conf + else + eerror "Can't find /etc/GNUstep/GNUstep.conf" + return 1 + fi + if [ -x "${HOME}/${GNUSTEP_USER_DIR_ADMIN_TOOLS}/sogod" ]; then + sogod_bin="${HOME}/${GNUSTEP_USER_DIR_ADMIN_TOOLS}/sogod" + elif [ -x "${GNUSTEP_LOCAL_ADMIN_TOOLS}/sogod" ]; then + sogod_bin="${GNUSTEP_LOCAL_ADMIN_TOOLS}/sogod" + elif [ -x "${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod" ]; then + sogod_bin="${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod" + elif [ -x "${GNUSTEP_NETWORK_ADMIN_TOOLS}/sogod" ]; then + sogod_bin="${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod" + else + eerror "Can't find sogod" + return 1 + fi + if [ -f "${GNUSTEP_MAKEFILES}/GNUstep.sh" ]; then + source "${GNUSTEP_MAKEFILES}/GNUstep.sh" + else + eerror "Can't find ${GNUSTEP_MAKEFILES}/GNUstep.sh" + return 1 + fi + sogod_port="$(defaults -u sogo read sogod WOPort 2>/dev/null)" + if [ "${?}" -eq 0 ]; then + sogod_port="${sogod_port##* }" + if [ "$((${sogod_port}+1-1))" != "${sogod_port}" ]; then + sogod_port="20000" + fi + else + sogod_port="20000" + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting SOGo service" + start-stop-daemon \ + --start \ + --exec ${sogod_bin} \ + --chuid sogo \ + -- ${SOGOD_OPTS} \ + -WOPort ${sogod_port} \ + -WOLogFile /var/log/sogo/sogod.log \ + -WOPidFile /var/run/sogod/sogod.pid + eend ${?} +} + +stop() { + ebegin "Stopping SOGo service" + start-stop-daemon --stop \ + --pidfile /var/run/sogod/sogod.pid + eend ${?} +} diff --git a/gnustep-apps/sogo/sogo-1.1.0-r1.ebuild b/gnustep-apps/sogo/sogo-1.1.0-r1.ebuild index 4ac379d..681c422 100644 --- a/gnustep-apps/sogo/sogo-1.1.0-r1.ebuild +++ b/gnustep-apps/sogo/sogo-1.1.0-r1.ebuild @@ -4,7 +4,7 @@ EAPI=2 -inherit gnustep-base +inherit gnustep-base flag-o-matic MY_PN="SOGo" MY_PV="${PV/_/}" @@ -43,6 +43,7 @@ pkg_setup() { ewarn "SOPE and your GNUstep (base and make) without any LDFLAGS before filing bugs." ewarn fi + append-ldflags -Wl,--no-as-needed } src_configure() { diff --git a/gnustep-apps/sogo/sogo-9999.ebuild b/gnustep-apps/sogo/sogo-9999.ebuild new file mode 100644 index 0000000..8f27b78 --- /dev/null +++ b/gnustep-apps/sogo/sogo-9999.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 + +inherit gnustep-base flag-o-matic + +MY_PN="SOGo" +MY_PV="${PV/_/}" + +DESCRIPTION="Groupware server built around OpenGroupware.org and the SOPE application server" +HOMEPAGE="http://sogo.opengroupware.org/" +SRC_URI="" +KEYWORDS="" +LICENSE="GPL-2" +SLOT="0" +IUSE="postgres mysql logrotate" +DEPEND="gnustep-libs/sope[ldap,mysql?,postgres?] + !mysql? ( !postgres? ( virtual/postgresql-base ) ) + dev-util/monotone + dev-libs/libmemcached + net-nds/openldap" +RDEPEND="${DEPEND} + logrotate? ( app-admin/logrotate )" + +S=${WORKDIR}/${MY_PN} + +pkg_setup() { + gnustep-base_pkg_setup + local myLDFLAGS="$(gnustep-config --variable=LDFLAGS 2>/dev/null)" + if [ -n "${myLDFLAGS}" ] && (echo "${myLDFLAGS}" | grep -q "\-\-a\(dd\|s\)\-needed" 2>/dev/null); then + ewarn + ewarn "You seem to have compiled GNUstep with custom LDFLAGS:" + for foo in $(gnustep-config --variable=LDFLAGS); do + ewarn " "${foo} + done + ewarn + ewarn "SOGo is very sensitive regarding custom LDFLAGS. Especially with:" + ewarn " --add-needed" + ewarn " --as-needed" + ewarn + ewarn "If your SOGo install does not work as expected then please re-emerge SOGo," + ewarn "SOPE and your GNUstep (base and make) without any LDFLAGS before filing bugs." + ewarn + fi + append-ldflags -Wl,--no-as-needed +} + +src_unpack() { + EMTN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/mtn-src" + addwrite "${EMTN_STORE_DIR}" + if [ ! -d "${EMTN_STORE_DIR}" ]; then + mkdir -p "${EMTN_STORE_DIR}" || die "Can't mkdir ${EMTN_STORE_DIR}." + fi + cd "${EMTN_STORE_DIR}" || die "Can't chdir to ${EMTN_STORE_DIR}" + + if [ ! -f "db.mtn" ]; then + mtn db init --db=./db.mtn || die "Failed to initialize Monotone database" + fi + + # Pull Inverse's SOGo Monotone repository + mtn --db=./db.mtn pull inverse.ca ca.inverse.sogo || die "Failed to pull Monotone repository" + if [ ! -d "SOGo" ]; then + mtn --db=./db.mtn checkout --branch ca.inverse.sogo SOGo || die "Failed to checkout SOGo branch" + else + cd SOGo + mtn update + fi + + # Pull SOGo Connector, SOGo Integrator and Lightning (Inverse Edition) + #mtn --db=./db.mtn pull inverse.ca ca.inverse.sogo-connector + #mtn --db=./db.mtn checkout --branch ca.inverse.sogo-connector + #mtn --db=./db.mtn pull inverse.ca ca.inverse.sogo-integrator + #mtn --db=./db.mtn checkout --branch ca.inverse.sogo-integrator + #mtn --db=./db.mtn pull inverse.ca ca.inverse.calendar + #mtn --db=./db.mtn checkout --branch ca.inverse.calendar + + mkdir -p "${S}" + cd "${EMTN_STORE_DIR}"/SOGo + rsync -rlpgo --exclude=".mtn-ignore" . "${S}" || die "Can't export to ${S}" + + cd "${S}" + gnustep-base_src_prepare +} + +src_configure() { + egnustep_env + ./configure \ + $(use_enable debug) \ + $(use_enable debug strip) \ + $(use_enable ldap ldap-config) \ + || die "configure failed" +} + +src_test() { + # SOGo tends to break horribly if gnustep-make is build with LDFLAGS such as + # -Wl,--add-needed or -Wl,--as-needed. So we check here some vital binaries. + # Check if Appointments.SOGo, Contacts.SOGo, Mailer.SOGo is correctly build/linked + local myAppointmentsLDD=$(ldd -d "${S}"/SoObjects/Appointments/Appointments.SOGo/Appointments 2>&1 | grep "lib\(OGoContentStore\|NG\(Cards\|ObjWeb\|Mime\|Streams\|Extensions\)\|SOGo\|GDL\(Access\|ContentStore\)\|EOControl\|DOM\|SaxObjC\|XmlRpc\)\.so\." | wc -l) + local myContactsLDD=$(ldd -d "${S}"/SoObjects/Contacts/Contacts.SOGo/Contacts 2>&1 | grep "lib\(OGoContentStore\|NG\(Cards\|ObjWeb\|Mime\|Streams\|Extensions\)\|SOGo\|GDL\(Access\|ContentStore\)\|EOControl\|DOM\|SaxObjC\|XmlRpc\)\.so\." | wc -l) + local myMailerLDD=$(ldd -d "${S}"/SoObjects/Mailer/Mailer.SOGo/Mailer 2>&1 | grep "lib\(OGoContentStore\|NG\(Cards\|ObjWeb\|Mime\|Streams\|Extensions\)\|SOGo\|GDL\(Access\|ContentStore\)\|EOControl\|DOM\|SaxObjC\|XmlRpc\)\.so\." | wc -l) + if [ -z "${myAppointmentsLDD}" -o -z "${myContactsLDD}" -o -z "${myMailerLDD}" -o "${myAppointmentsLDD}" != "13" -o "${myContactsLDD}" != "13" -o "${myMailerLDD}" != "13" ]; then + ewarn + ewarn "This SOGo installtion is not correctly build. Probably you are using" + ewarn "LDFLAGS to build SOGo that are not correctly handled in SOGo or you" + ewarn "have emerged gnustep-base/gnustep-make with LDFLAGS which are" + ewarn "preventing SOGo to link the needed libraries into it's own binaries." + ewarn "Please remerge gnustep-base/gnustep-make and/or SOGo with empty LDFLAGS." + ewarn + die "SOGo build is not complete (Appointments.SOGo, Contacts.SOGo, Mailer.SOGo)" + fi + # We could do the same for AdministrationUI.SOGo, CommonUI.SOGo, ContactsUI.SOGo, + # MailPartViewers.SOGo, MailerUI.SOGo, MainUI.SOGo, SOGoElements.wox and SchedulerUI.SOGo + # but if Appointments.SOGo, Contacts.SOGo and Mailer.SOGo are build correctly then the + # chance that the others are build/linked correctly is pretty high. So we don't test again. +} + +src_install() { + gnustep-base_src_install + newinitd "${FILESDIR}"/sogod.initd.1 sogod \ + || die "init.d script installation failed" + newconfd "${FILESDIR}"/sogod.confd sogod \ + || die "conf.d script installation failed" + diropts -m 0770 -o sogo -g root + dodir /var/log/sogo + dodir /var/run/sogod + if use logrotate; then + insopts -m644 -o root -g root + insinto /etc/logrotate.d + newins Scripts/logrotate SOGo || die "Failed to install logrotate.d file" + fi + newdoc Apache/SOGo.conf SOGo-Apache.conf +} + +pkg_preinst() { + enewuser sogo -1 /bin/bash /var/lib/sogo +} + +pkg_postinst() { + gnustep-base_pkg_postinst + elog + elog "Now follow the steps from the SOGo documentation:" + elog "http://www.inverse.ca/contributions/sogo/documentation.html#c803" + elog "The sogo user home directory is /var/lib/sogo" + elog + elog "Then you can start/stop sogo with /etc/init.d/sogod" + elog + elog "If you plan to use SOGo with Apache then please have a look at the" + elog "'SOGo-Apache.conf' included in the documentation directory of this" + elog "SOGo installation and don't forget to add '-D PROXY' to your" + elog "APACHE2_OPTS." + elog +} |