OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  r...@openpkg.org
  Module: openpkg-src                      Date:   02-Jun-2009 23:18:18
  Branch: HEAD                             Handle: 2009060222181400

  Added files:
    openpkg-src/activemq    activemq.spec activemq.txt rc.activemq

  Log:
    new package: activemq 5.2.0 (Enterprise Messaging and Integration
    Patterns Provider)

  Summary:
    Revision    Changes     Path
    1.1         +139 -0     openpkg-src/activemq/activemq.spec
    1.1         +156 -0     openpkg-src/activemq/activemq.txt
    1.1         +72 -0      openpkg-src/activemq/rc.activemq
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/activemq/activemq.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 activemq.spec
  --- /dev/null 2009-06-02 23:18:14 +0200
  +++ activemq.spec     2009-06-02 23:18:15 +0200
  @@ -0,0 +1,139 @@
  +##
  +##  activemq.spec -- OpenPKG RPM Package Specification
  +##  Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  +##
  +##  Permission to use, copy, modify, and distribute this software for
  +##  any purpose with or without fee is hereby granted, provided that
  +##  the above copyright notice and this permission notice appear in all
  +##  copies.
  +##
  +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +##  SUCH DAMAGE.
  +##
  +
  +#   package information
  +Name:         activemq
  +Summary:      Enterprise Messaging and Integration Patterns Provider
  +URL:          http://activemq.apache.org/
  +Vendor:       Apache Foundation
  +Packager:     OpenPKG Foundation e.V.
  +Distribution: OpenPKG Community
  +Class:        EVAL
  +Group:        Network
  +License:      Apache
  +Version:      5.2.0
  +Release:      20090602
  +
  +#   list of sources
  +Source0:      
http://www.apache.org/dist/activemq/apache-activemq/%{version}/apache-activemq-%{version}-bin.tar.gz
  +Source1:      activemq.txt
  +Source2:      rc.activemq
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20060823
  +PreReq:       OpenPKG, openpkg >= 20060823
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    ActiveMQ is the most popular and powerful Open-Source Enterprise
  +    Messaging and Integration Patterns provider. ActiveMQ supports
  +    OpenWire, STOMP and XMPP transports. ActiveMQ supports JMS 1.1
  +    including support for transient, persistent, transactional and XA
  +    messaging.
  +
  +%track
  +    prog activemq = {
  +        version   = %{version}
  +        url       = http://activemq.apache.org/download.html
  +        regex     = ActiveMQ\s+(__VER__)\+Release
  +    }
  +
  +%prep
  +    %setup -q -n apache-activemq-%{version}
  +
  +%build
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +
  +    #   create installation hierarchy
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/activemq \
  +        $RPM_BUILD_ROOT%{l_prefix}/libexec/activemq \
  +        $RPM_BUILD_ROOT%{l_prefix}/share/activemq \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/activemq/run \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/activemq/log \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/activemq/data
  +
  +    #   install program components
  +    %{l_shtool} install -c -m 644 \
  +        bin/run.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/activemq/
  +    cp -rp lib \
  +        $RPM_BUILD_ROOT%{l_prefix}/libexec/activemq/
  +    cp -rp webapps/* \
  +        $RPM_BUILD_ROOT%{l_prefix}/share/activemq/
  +
  +    #   post-adjust installation
  +    %{l_shtool} subst \
  +        -e 
's;${activemq.base}/conf/credentials\.properties;%{l_prefix}/etc/activemq/activemq.properties;'
 \
  +        
$RPM_BUILD_ROOT%{l_prefix}/share/activemq/admin/WEB-INF/webconsole-embedded.xml
  +
  +    #   install run-command script
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE rc.activemq} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    #   install default configuration
  +    for name in `grep "^<file" %{SOURCE activemq.txt} | sed -e 
's;^.*name=";;' -e 's;".*$;;'`; do
  +        (echo ""; cat %{SOURCE activemq.txt}; echo "") |\
  +            sed -e "1,/^<file name=\"$name\">/d" -e "/<\/file>/,\$d" >$name
  +        %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +            $name $RPM_BUILD_ROOT%{l_prefix}/etc/activemq/
  +    done
  +    %{l_shtool} install -c -m 644 \
  +        conf/broker.ks 
$RPM_BUILD_ROOT%{l_prefix}/etc/activemq/activemq.broker.ks
  +    %{l_shtool} install -c -m 644 \
  +        conf/broker.ts 
$RPM_BUILD_ROOT%{l_prefix}/etc/activemq/activemq.broker.ts
  +
  +    #   determine installation files
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
  +        '%config %{l_prefix}/etc/activemq/*' \
  +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/activemq/*'
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  +%post
  +    #   after upgrade, restart service
  +    if [ $1 -eq 2 ]; then
  +        eval `%{l_rc} activemq status 2>/dev/null`
  +        [ ".$activemq_active" = .yes ] && %{l_rc} activemq restart
  +    fi
  +    exit 0
  +
  +%preun
  +    if [ $1 -eq 0 ]; then
  +        #   before erase, stop service and remove log files
  +        %{l_rc} activemq stop 2>/dev/null
  +        rm -f  $RPM_INSTALL_PREFIX/var/activemq/log/*  >/dev/null 2>&1 || 
true
  +        rm -f  $RPM_INSTALL_PREFIX/var/activemq/run/*  >/dev/null 2>&1 || 
true
  +        rm -rf $RPM_INSTALL_PREFIX/var/activemq/data/* >/dev/null 2>&1 || 
true
  +    fi
  +    exit 0
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/activemq/activemq.txt
  ============================================================================
  $ cvs diff -u -r0 -r1.1 activemq.txt
  --- /dev/null 2009-06-02 23:18:14 +0200
  +++ activemq.txt      2009-06-02 23:18:15 +0200
  @@ -0,0 +1,156 @@
  +<file name="activemq.xml">
  +<!--
  +##
  +##  activemq.xml: ActiveMQ server configuration
  +##
  +-->
  +<beans
  +    xmlns="http://www.springframework.org/schema/beans";
  +    xmlns:amq="http://activemq.apache.org/schema/core";
  +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  +    xsi:schemaLocation="http://www.springframework.org/schema/beans
  +        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  +        http://activemq.apache.org/schema/core
  +        http://activemq.apache.org/schema/core/activemq-core.xsd   
  +        http://activemq.apache.org/camel/schema/spring
  +        http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";>
  +
  +    <bean 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  +         <property name="locations">
  +             
<value>file:///@l_prefix@/etc/activemq/activemq.properties</value>
  +         </property>      
  +    </bean>
  +
  +    <broker
  +        xmlns="http://activemq.apache.org/schema/core";
  +        brokerName="localhost"
  +        dataDirectory="@l_prefix@/var/activemq/data">
  +
  +        <destinationPolicy>
  +            <policyMap>
  +                <policyEntries>
  +                    <policyEntry queue=">" memoryLimit="5mb"/>
  +                    <policyEntry topic=">" memoryLimit="5mb">
  +                        <dispatchPolicy>
  +                            <strictOrderDispatchPolicy/>
  +                        </dispatchPolicy>
  +                        <subscriptionRecoveryPolicy>
  +                            <lastImageSubscriptionRecoveryPolicy/>
  +                        </subscriptionRecoveryPolicy>
  +                    </policyEntry>
  +                </policyEntries>
  +            </policyMap>
  +        </destinationPolicy>
  +
  +        <managementContext>
  +            <managementContext createConnector="false"/>
  +        </managementContext>
  +
  +        <networkConnectors>
  +            <networkConnector name="default-nc" uri="multicast://default"/>
  +            <!-- <networkConnector name="host1 and host2" 
uri="static://(tcp://host1:61616,tcp://host2:61616)"/> -->
  +        </networkConnectors>
  +
  +        <persistenceAdapter>
  +            <amqPersistenceAdapter syncOnWrite="false" 
directory="@l_prefix@/var/activemq/data" maxFileLength="20 mb"/>
  +        </persistenceAdapter>
  +
  +        <sslContext>
  +            <sslContext
  +                keyStore="file:@l_prefix@/etc/activemq/activemq.broker.ks" 
keyStorePassword="password"
  +                trustStore="file:@l_prefix@/etc/activemq/activemq.broker.ts" 
trustStorePassword="password"
  +            />
  +        </sslContext>
  +        
  +        <systemUsage>
  +            <systemUsage>
  +                <memoryUsage>
  +                    <memoryUsage limit="20 mb"/>
  +                </memoryUsage>
  +                <storeUsage>
  +                    <storeUsage limit="1 gb" name="example"/>
  +                </storeUsage>
  +                <tempUsage>
  +                    <tempUsage limit="100 mb"/>
  +                </tempUsage>
  +            </systemUsage>
  +        </systemUsage>
  +
  +        <transportConnectors>
  +            <transportConnector name="openwire" uri="tcp://localhost:61616" 
discoveryUri="multicast://default"/>
  +            <transportConnector name="ssl"      uri="ssl://localhost:61617"/>
  +            <transportConnector name="stomp"    
uri="stomp://localhost:61613"/>
  +            <transportConnector name="xmpp"     
uri="xmpp://localhost:61222"/>
  +        </transportConnectors>
  +    </broker>
  +
  +    <camelContext
  +        id="camel"
  +        xmlns="http://activemq.apache.org/camel/schema/spring";>
  +        <package>org.example</package>
  +        <route>
  +            <from uri="activemq:example.A"/>
  +            <to uri="activemq:example.B"/>
  +        </route>
  +    </camelContext>
  +
  +    <bean id="activemq" 
class="org.apache.activemq.camel.component.ActiveMQComponent">
  +        <property name="connectionFactory">
  +            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
  +                <property name="brokerURL" 
value="vm://localhost?create=false&amp;waitForStart=10000"/>
  +                <property name="userName" value="${activemq.username}"/>
  +                <property name="password" value="${activemq.password}"/>
  +            </bean>
  +        </property>
  +    </bean>
  +
  +    <commandAgent
  +        xmlns="http://activemq.apache.org/schema/core";
  +        brokerUrl="vm://localhost"
  +        username="${activemq.username}"
  +        password="${activemq.password}"
  +    />
  +
  +    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0";>
  +        <connectors>
  +            <nioConnector port="8161"/>
  +        </connectors>
  +        <handlers>
  +            <webAppContext contextPath="/admin"      
resourceBase="@l_prefix@/share/activemq/admin"      logUrlOnStart="true"/>
  +            <webAppContext contextPath="/demo"       
resourceBase="@l_prefix@/share/activemq/demo"       logUrlOnStart="true"/>
  +            <webAppContext contextPath="/fileserver" 
resourceBase="@l_prefix@/share/activemq/fileserver" logUrlOnStart="true"/>
  +        </handlers>
  +    </jetty>
  +</beans>
  +</file>
  +<file name="activemq.properties">
  +##
  +##  activemq.properties: ActiveMQ configuration properties
  +##
  +
  +activemq.username=system
  +activemq.password=manager
  +
  +</file>
  +<file name="log4j.properties">
  +##
  +##  log4j.properties: ActiveMQ Log4J logging configuration
  +##
  +
  +log4j.rootLogger=INFO,logfile
  +
  +log4j.logger.org.apache.activemq.spring=WARN
  +log4j.logger.org.apache.xbean.spring=WARN
  +log4j.logger.org.springframework=WARN
  +#log4j.logger.org.apache.activemq=WARN
  +#log4j.logger.org.apache.camel=WARN
  +
  +log4j.appender.logfile=org.apache.log4j.RollingFileAppender
  +log4j.appender.logfile.fi...@l_prefix@/var/activemq/log/activemq.log
  +log4j.appender.logfile.maxFileSize=1024KB
  +log4j.appender.logfile.maxBackupIndex=9
  +log4j.appender.logfile.append=true
  +log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
  +log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p 
%-30.30c{1} - %m%n
  +
  +</file>
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/activemq/rc.activemq
  ============================================================================
  $ cvs diff -u -r0 -r1.1 rc.activemq
  --- /dev/null 2009-06-02 23:18:15 +0200
  +++ rc.activemq       2009-06-02 23:18:15 +0200
  @@ -0,0 +1,72 @@
  +...@l_prefix@/bin/openpkg rc
  +##
  +##  rc.activemq -- Run-Commands
  +##
  +
  +%config
  +    activemq_enable="$openpkg_rc_def"
  +    activemq_flags="-server -Xms256M -Xmx512M 
-Dorg.apache.activemq.UseDedicatedTaskRunner=true 
-Dcom.sun.management.jmxremote"
  +    activemq_log_prolog="true"
  +    activemq_log_epilog="true"
  +    activemq_log_numfiles="10"
  +    activemq_log_minsize="1M"
  +    activemq_log_complevel="9"
  +
  +%common
  +    activemq_pidfile="@l_prefix@/var/activemq/run/activemq.pid"
  +    activemq_logfile="@l_prefix@/var/activemq/log/activemq.log"
  +    activemq_signal () {
  +        [ -f $activemq_pidfile ] && kill -$1 `cat $activemq_pidfile`
  +    }
  +
  +%status -u @l_rusr@ -o
  +    activemq_usable="unknown"
  +    activemq_active="no"
  +    rcService activemq enable yes && \
  +        activemq_signal 0 && activemq_active="yes"
  +    echo "activemq_enable=\"$activemq_enable\""
  +    echo "activemq_usable=\"$activemq_usable\""
  +    echo "activemq_active=\"$activemq_active\""
  +
  +%start -u @l_rusr@
  +    rcService activemq enable yes || exit 0
  +    rcService activemq active yes && exit 0
  +    activemq_home="@l_prefix@/libexec/activemq"
  +    activemq_base="@l_prefix@/libexec/activemq"
  +    activemq_classpath="@l_prefix@/etc/activemq"
  +    cmd="@l_prefix@/bin/java"
  +    cmd="$cmd $activemq_flags"
  +    cmd="$cmd -Dactivemq.home=\"${activemq_home}\""
  +    cmd="$cmd -Dactivemq.base=\"${activemq_base}\""
  +    cmd="$cmd -Dactivemq.classpath=\"${activemq_classpath}\""
  +    cmd="$cmd -jar @l_prefix@/libexec/activemq/run.jar"
  +    cmd="$cmd start"
  +    ( eval `JAVA_PLATFORM="sun-jdk" @l_prefix@/bin/java-toolkit -e`
  +      jetty_r...@l_prefix@/var/activemq/run
  +      export JETTY_RUN
  +      eval "nohup $cmd </dev/null >$activemq_logfile 2>&1 &"
  +      echo $! >$activemq_pidfile
  +    ) >/dev/null 2>&1
  +
  +%stop -u @l_rusr@
  +    rcService activemq enable yes || exit 0
  +    rcService activemq active no && exit 0
  +    activemq_signal TERM
  +    sleep 2
  +    rm -f $activemq_pidfile 2>/dev/null || true
  +
  +%restart -u @l_rusr@
  +    rcService activemq enable yes || exit 0
  +    rcService activemq active no && exit 0
  +    rc activemq stop
  +    rc activemq start
  +
  +%daily -u @l_rusr@
  +    rcService activemq enable yes || exit 0
  +    shtool rotate -f \
  +        -n $activemq_log_numfiles -s $activemq_log_minsize -d \
  +        -z $activemq_log_complevel -o @l_rusr@ -g @l_rgrp@ -m 644 \
  +        -P "$activemq_log_prolog" \
  +        -E "$activemq_log_epilog; rc activemq restart" \
  +        $activemq_logfile
  +
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to