Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New Jboss Ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
gravis
Apprentice
Apprentice


Joined: 18 Apr 2002
Posts: 176
Location: Compiègne, France

PostPosted: Thu Dec 26, 2002 5:38 pm    Post subject: New Jboss Ebuild Reply with quote

Hello, I wanted to install jboss on my gentoo 1.2 but the ebuild available (3.0.1RC1) is quite old and don't merge any more (jdk1.4).

So, I decided to make a new ebuild for a newer version (3.0.4, last stable available). After several minutes of compilation, I have this error :

***************************************************************
Code:

all:
[execmodules]
    ==
    ==  Finished with 'all' in module 'iiop'.
    ======================================================================
   

_module-iiop-most:
     [copy] Copying 1 file to /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/lib
     [copy] Copying 1 file to /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/client
     [copy] Copying 1 file to /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/lib
     [copy] Copying 1 file to /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/client
     [copy] Copying 1 file to /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/server/all/conf
     [copy] Copying 1 file to /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/server/all/deploy

_module-iiop-all:
    [mkdir] Created dir: /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/docs/api/iiop
     [copy] Copying 136 files to /var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/output/jboss-3.0.4/docs/api/iiop
[execmodules]
    ======================================================================
    ==  Executing 'all' in module 'catalina'...
    ==

BUILD FAILED

/var/tmp/portage/jboss-3.0.4/work/jboss-3.0.4-src/build/build.xml:226: Target `all' does not exist in this project.

Total time: 8 minutes 24 seconds

!!! ERROR: net-www/jboss-3.0.4 failed.
!!! Function src_compile, Line 3, Exitcode 1
!!! (no error message)


***************************************************************
This is the ebuild I used (made from the 3.0.1RC1 one) :

Code:

# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-www/jboss/jboss-3.0.1_rc1.ebuild,v 1.1 2002/07/15 03:08:43 mkennedy Exp $

MY_P="jboss-3.0.4-src"
S=${WORKDIR}/${MY_P}

DESCRIPTION="The Java app-server reference implementation"
SRC_URI=" http://belnet.dl.sourceforge.net/sourceforge/jboss/${MY_P}.tgz"
HOMEPAGE="http://www.jboss.org"
LICENSE="LGPL"

RDEPEND=">=virtual/jdk-1.3"

DEPEND="${RDEPEND}
        dev-java/ant"

SLOT="0"
KEYWORDS="*"

INSTALL_DIR=/usr/lib/${P}

src_unpack() {
        unpack $MY_P.tgz
}

src_compile() {
        export JAVA_HOME=${JDK_HOME}
        cd build
        sh build.sh all || die
}

pkg_preinst() {
        einfo ">>> Adding user and group for JBoss"
        if ! groupmod jboss ; then
                groupadd jboss || die "problem adding jboss group"
        fi
        if ! id jboss ; then
                useradd jboss -g jboss || die "problem adding jboss user"
        fi
}

src_install() {

        dodir ${INSTALL_DIR}
        dodir ${INSTALL_DIR}/bin

        cp build/output/jboss-3.0.4/bin/run.sh ${D}/${INSTALL_DIR}/bin
        cp build/output/jboss-3.0.4/bin/shutdown.sh ${D}/${INSTALL_DIR}/bin
        cp build/output/jboss-3.0.4/bin/run.jar ${D}/${INSTALL_DIR}/bin
        cp build/output/jboss-3.0.4/bin/shutdown.jar ${D}/${INSTALL_DIR}/bin

        exeinto /etc/init.d
        doexe ${FILESDIR}/init.d/jboss
        exeinto /etc/conf.d
        sed -e "s#@jbossprefix@#/usr/lib/${P}#" ${FILESDIR}/conf.d/jboss >${D}/etc/conf.d/jboss

        einfo ">>> Setting up configuration files and library packages..."
        local dirs="build/output/jboss-3.0.4/server build/output/jboss-3.0.4/lib"
        for i in $dirs ; do
                cp -a $i ${D}/${INSTALL_DIR}/
        done
        cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/all/conf
        cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/default/conf
        cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/minimal/conf

        einfo ">>> Installing client libraries..."
        local dirs="build/output/jboss-3.0.4/client/*"
        for i in $dirs ; do
                dojar $i
        done

        einfo ">>> Setting up documentation..."
        dodoc build/output/jboss-3.0.4/docs/LICENSE.txt ${FILESDIR}/README.gentoo
        dohtml -a html,htm,png,gif,css,java -r build/output/jboss-3.0.4/docs/

        einfo ">>> Creating log directory..."
        dodir /var/log/jboss
}

pkg_postinst() {
        einfo ">>> Assigning access rights..."
        chown -R jboss ${INSTALL_DIR}/server
        chgrp -R jboss ${INSTALL_DIR}/server
        chown jboss /var/log/jboss
        chgrp jboss /var/log/jboss
}

pkg_postrm() {
        einfo ">>> Removing user and group for JBoss"
        if ! groupmod jboss ; then
                groupdel jboss
        fi
        if ! id jboss ; then
                userdel jboss
        fi
}


Someone has an idea ???
Back to top
View user's profile Send private message
gravis
Apprentice
Apprentice


Joined: 18 Apr 2002
Posts: 176
Location: Compiègne, France

PostPosted: Thu Dec 26, 2002 5:41 pm    Post subject: jboss Reply with quote

this sounds like an error in jboss src !?
Back to top
View user's profile Send private message
mjhaas
n00b
n00b


Joined: 30 Nov 2002
Posts: 5

PostPosted: Tue Jan 21, 2003 6:30 pm    Post subject: Another ebuild, it works for me Reply with quote

I've been through the same process trying to get jboss to build with sun-jdk-1.4.1.01. Version 3.0.4 does not produce the compilation errors I got with jboss-3.0.1_rc1 so I modified the ebuild as follows. You can see that in src_compile() build.sh doesn't need the "all" parameter, the source of the "Target `all' does not exist in this project" error.

Code:
MY_P="jboss-3.0.4-src"
S=${WORKDIR}/${MY_P}

DESCRIPTION="The Java app-server reference implementation"
SRC_URI=" http://belnet.dl.sourceforge.net/sourceforge/jboss/${MY_P}.tgz"
HOMEPAGE="http://www.jboss.org"
LICENSE="LGPL"

RDEPEND=">=virtual/jdk-1.3"

DEPEND="${RDEPEND}
   dev-java/ant"

SLOT="0"
KEYWORDS="*"

INSTALL_DIR=/usr/lib/${P}

src_unpack() {
   unpack $MY_P.tgz
}

src_compile() {
   export JAVA_HOME=${JDK_HOME}
   cd build
   sh build.sh || die
}

pkg_preinst() {
   einfo ">>> Adding user and group for JBoss"
   if ! groupmod jboss ; then
      groupadd jboss || die "problem adding jboss group"
   fi
   if ! id jboss ; then
      useradd jboss -g jboss || die "problem adding jboss user"
   fi
}

src_install() {

   dodir ${INSTALL_DIR}
   dodir ${INSTALL_DIR}/bin

   cp build/output/jboss-3.0.4/bin/run.sh ${D}/${INSTALL_DIR}/bin
   cp build/output/jboss-3.0.4/bin/shutdown.sh ${D}/${INSTALL_DIR}/bin
   cp build/output/jboss-3.0.4/bin/run.jar ${D}/${INSTALL_DIR}/bin
   cp build/output/jboss-3.0.4/bin/shutdown.jar ${D}/${INSTALL_DIR}/bin

   exeinto /etc/init.d
   doexe ${FILESDIR}/init.d/jboss
   exeinto /etc/conf.d
   sed -e "s#@jbossprefix@#/usr/lib/${P}#" ${FILESDIR}/conf.d/jboss >${D}/etc/conf.d/jboss

   einfo ">>> Setting up configuration files and library packages..."
   local dirs="build/output/jboss-3.0.4/server build/output/jboss-3.0.4/lib"
   for i in $dirs ; do
       cp -a $i ${D}/${INSTALL_DIR}/
        done
   cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/all/conf
   cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/default/conf
   cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/minimal/conf

   einfo ">>> Installing client libraries..."
   local dirs="build/output/jboss-3.0.4/client/*"
   for i in $dirs ; do
      dojar $i
   done

   einfo ">>> Setting up documentation..."
   dodoc ${FILESDIR}/README.gentoo
   dohtml -a dtd,xml -r build/output/jboss-3.0.4/docs/dtd
   dohtml -a dtd,xml -r build/output/jboss-3.0.4/docs/examples

   einfo ">>> Creating log directory..."
   dodir /var/log/jboss
}

pkg_postinst() {
   einfo ">>> Assigning access rights..."
   chown -R jboss ${INSTALL_DIR}/server
   chgrp -R jboss ${INSTALL_DIR}/server
   chown jboss /var/log/jboss
   chgrp jboss /var/log/jboss
}

pkg_postrm() {
   einfo ">>> Removing user and group for JBoss"
   if ! groupmod jboss ; then
      groupdel jboss
   fi
   if ! id jboss ; then
      userdel jboss
   fi
}


The 3.0.4 documentation only consists of some DTDs and XML examples so I'm not sure it's correct to install them using dohtml but I wasn't sure what else to use.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum