Pham Ngoc Hai personal web site

Syndicate

Red5-0.7.0.ebuild
 
Written by Pham Ngoc Hai, on 14-03-2008 01:55

This ebuild comes with the hotfix as well, if you want to use it please consider using my overlay instead since it also contains rc init script and config files (from Thilo Bangert overlay).

 

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit java-utils-2 java-pkg-2 java-ant-2

MY_P=${P/_/}
S=${WORKDIR}/${MY_P}

DESCRIPTION="Open Source Flash Server written in Java"
HOMEPAGE="http://osflash.org/red5"
#SRC_URI="http://red5.fr/release/${PV}/tar/${PN}-${PV}.tar.gz"
SRC_URI="http://red5.nl/installer/red5-0.7.0.tar.gz"
LICENSE="LGPL-2.1"
SLOT="1"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples source"
DEPEND=">=virtual/jdk-1.5
        >=dev-java/ant-core-1.5"
RDEPEND=">=virtual/jdk-1.5"

RED5_HOME=/opt/red5

pkg_setup() {
        enewgroup red5
        enewuser red5 -1 -1 ${RED5_HOME} red5
}

src_compile() {
        echo >> build.properties
        echo "java.target_version=$(java-pkg_get-vm-version)" >> build.properties
        mkdir ${WORKDIR}/ivycache
        echo "ivy.default.ivy.user.dir=${WORKDIR}/ivycache" >> build.properties
        cp ${FILESDIR}/ivysettings.xml ./
        eant
        rm red5.jar
        if has_version ">=virtual/jdk-1.6"; then
                wget http://red5.googlecode.com/svn/trunk/snapshots/070hotfix.zip \
                        || die "Cannot download hotfix"
                unzip 070hotfix.zip
                rm 070hotfix.zip
        else
                wget http://red5.googlecode.com/svn/trunk/snapshots/070hotfix_java5.zip \
                        || die "Cannot download hotfix"
                unzip 070hotfix_java5.zip
                rm 070hotfix_java5.zip
        fi
        wget http://red5.googlecode.com/svn/trunk/repository/jetty/jetty-6.1.8.jar \
                http://red5.googlecode.com/svn/trunk/repository/jetty/jetty-util-6.1.8.jar \
                http://red5.googlecode.com/svn/trunk/repository/jetty/jetty-xbean-6.1.8.jar \
                || die "Cannot download hotfix"
        rm lib/jetty-6.1.7.jar lib/jetty-util-6.1.7.jar lib/jetty-xbean-6.1.7.jar
        mv jetty-6.1.8.jar jetty-util-6.1.8.jar jetty-xbean-6.1.8.jar lib/
}

src_install() {
        newinitd "${FILESDIR}"/red5.initd red5
        newconfd "${FILESDIR}"/red5.confd red5
        doenvd "${FILESDIR}"/21red5

        if ! use source ; then
                rm -rf test
                rm -rf bin
                rm -rf src
                rm -rf swf
                rm -f build.xml
                rm -f build.properties
                rm -f Makefile
        fi
        if use doc ; then
                dodoc doc/*
        fi
        rm -rf doc

        keepdir /var/lib/red5-webapps
        fowners red5:red5 /var/lib/red5-webapps/

        if use examples ; then
                insopts -m0644
                insinto /var/lib/red5-webapps
                doins -r dist/webapps/*
                fowners -R red5:red5 /var/lib/red5-webapps/
        fi

        dosym /var/lib/red5-webapps ${RED5_HOME}/webapps

        insinto /var/lib/red5-webapps
        doins  webapps/red5-default.xml
        fowners red5:red5 /var/lib/red5-webapps/red5-default.xml

        rm -rf webapps

        rm -rf dumps
        rm -rf bin
        rm -rf dist
        rm -rf *.bat

        cp -rp * "${D}/${RED5_HOME}"
        fowners -R red5:red5 ${RED5_HOME}
        fperms 0750 ${RED5_HOME}/red5.sh
}
 

Last update: 14-03-2008 01:55

Published in : Computer stuff, Gentoo
Keywords : Red5-0.7.0.ebuild, red5 gentoo ebuild
Quote this article in website Favoured Print Send to friend Related articles Save this to del.icio.us

Users' Comments (5) RSS feed comment
Posted by beba, on 03-12-2009 02:33, , Guest
1. init.d script?
Hi. 
Thank you for ebuild. 
Maybe you can post init.d script for Gentoo? 
Best regards.. Y
 
» Report this comment to administrator
» Reply to this comment...

Posted by Evgen, on 12-01-2009 17:12, , Guest
2. emerge =dev-java/red5-0.7.0 fail
full output avaible at http://www.nopaste.com/p/ aEeXYMSJC 
help please - fix it, or lern me what me do 
Thenks for your work 
Elser
 
» Report this comment to administrator
» Reply to this comment...
» See all 1 replie(s)

Posted by Soal, on 01-10-2008 17:31, , Guest
3. problem with dependencies
This ebuild doesn't work for me: 
"BUILD FAILED 
/var/tmp/portage/dev-java/ red5-0.7.0/work/build.xml:201: The following error occurred while executing this line: 
/var/tmp/portage/dev-java/ red5-0.7.0/work/build.xml:217: The following error occurred while executing this line: 
/var/tmp/portage/dev-java/ red5-0.7.0/work/build.xml:161: impossible to resolve dependencies: 
resolve failed - see output for details" 
 
example of failed dependencies: 
[ivy:resolve] :: red5#xercesImpl;2.9.0: not found 
[ivy:resolve] :: red5#groovy;1.0: not found
 
» Report this comment to administrator
» Reply to this comment...

Posted by Pham Ngoc Hai, on 24-08-2008 03:16, , Guest
4. Thanks
Thanks for your comments, I'll fix that soon.
 
» Report this comment to administrator
» Reply to this comment...

Posted by Jiri, on 21-08-2008 23:32, , Guest
5. Ebuild...
Your ebuild should not use wget inside any process. If you want to apply some patches, you should specify it in the SRC_URI and unpack it in src_unpack(). The same for its dependencies. You should use eclass java-pkg-2 and java-ant-2 for replacement of the packages.
 
» Report this comment to administrator
» Reply to this comment...

Add your comment



mXcomment 1.0.9 © 2007-2010 - visualclinic.fr
License Creative Commons - Some rights reserved
< Prev   Next >


Search

Calendar

 Aug   September 2010   Oct

SMTWTFS
   1  2  3  4
  5  6  7  8  91011
12131415161718
19202122232425
2627282930 
VLSI High Level Synthesis

Random Photos






Donate

Enter Amount:

Sponsored Links

Copyright © 2007 Joomla Templates By Joomladesigns.  Modified By Pham Ngoc Hai