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

  Server: cvs.openpkg.org                  Name:   Michael Schloh
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   19-Apr-2005 18:54:07
  Branch: HEAD                             Handle: 2005041917540700

  Modified files:
    openpkg-src/j2ee14      j2ee14.spec j2ee14.state rc.j2ee14

  Log:
    rename and add option, requires infozip to unpack optional docs and
    samples, correct tracking, set required JAVA_HOME variable in both
    spec and state files, correct and add state identifiers, correct
    J2EE_HOME variable hack to match Sun's totally erratic version scheme,
    and... upgrading package: j2ee14 1.4.01 -> 8.1.01.2005Q1

  Summary:
    Revision    Changes     Path
    1.4         +96 -38     openpkg-src/j2ee14/j2ee14.spec
    1.2         +16 -7      openpkg-src/j2ee14/j2ee14.state
    1.2         +1  -1      openpkg-src/j2ee14/rc.j2ee14
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/j2ee14/j2ee14.spec
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 j2ee14.spec
  --- openpkg-src/j2ee14/j2ee14.spec    24 Mar 2005 11:19:08 -0000      1.3
  +++ openpkg-src/j2ee14/j2ee14.spec    19 Apr 2005 16:54:07 -0000      1.4
  @@ -23,8 +23,11 @@
   ##
   
   #   package versions
  -%define       V_sunjava 1_4_01
  -%define       V_openpkg 1.4.01
  +%define       V_openpkg 8.1.01.2005Q1
  +%define       V_sunjava 8_1_01_2005Q1
  +%define       V_sunsamp 1_4_01_2005Q1
  +%define       V_sundocs 1_4
  +%define       V_basever 1.4
   
   #   package information
   Name:         j2ee14
  @@ -37,29 +40,36 @@
   Group:        Language
   License:      Commercial
   Version:      %{V_openpkg}
  -Release:      20040709
  +Release:      20050419
   
   #   package options
  -%option       with_sampleserver  no
  +%option       with_docs     no
  +%option       with_samples  no
   
   #   list of sources
  -Source0:      
http://java.sun.com/j2ee/::/j2eesdk-%{V_sunjava}-solaris-sparc.bin
  -Source1:      
http://java.sun.com/j2ee/::/j2eesdk-%{V_sunjava}-solaris-i586.bin
  -Source2:      http://java.sun.com/j2ee/::/j2eesdk-%{V_sunjava}-linux.bin
  +Source0:      
http://java.sun.com/j2ee/::/sjsas_pe-%{V_sunjava}-solaris-sparc.bin
  +Source1:      
http://java.sun.com/j2ee/::/sjsas_pe-%{V_sunjava}-solaris-i586.bin
  +Source2:      http://java.sun.com/j2ee/::/sjsas_pe-%{V_sunjava}-linux.bin
  +Source3:      http://java.sun.com/j2ee/::/j2eeri-%{V_sundocs}-doc-api.zip
  +Source4:      http://java.sun.com/j2ee/::/j2eesdk-%{V_sunsamp}-samples.zip
   Source3:      j2ee14.state
   Source4:      rc.j2ee14
   %NoSource     0
   %NoSource     1
   %NoSource     2
  +%NoSource     3
  +%NoSource     4
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20040122, j2se14 >= 1.4.2.04
   PreReq:       OpenPKG, openpkg >= 20040122, j2se14 >= 1.4.2.04
  +%if "%{with_docs}" == "yes" || "%{with_samples}" == "yes"
  +BuildPreReq:  infozip
  +%endif
   AutoReq:      no
   AutoReqProv:  no
  -Conflicts:    j2ee
   
   %description
       J2EE technology and its component based model simplifies
  @@ -78,11 +88,9 @@
   
   %track
       prog j2ee14 = {
  -        disabled
  -        comment   = "ms: no tracking possible"
  -        version   = 1_4_01
  -        url       = http://java.sun.com/j2ee/
  -        regex     = j2eesdk-(__VER__)-solaris-sparc.bin
  +        version   = %{V_sunjava}
  +        url       = http://java.sun.com/j2ee/%{V_basever}/download.html
  +        regex     = sjsas_pe-%{V_sunjava}-
       }
   
   %prep
  @@ -98,17 +106,22 @@
           $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
           $RPM_BUILD_ROOT%{l_prefix}/libexec
   
  +    #   hack to correctly set JAVA_HOME variable
  +    JAVA_HOME=%{l_prefix}/libexec/j2se/jdk*
  +
       #   prepare state file for installation binary
  -%if "%{with_sampleserver}" == "yes"
  +%if "%{with_samples}" == "yes"
       %{l_shtool} install -c %{l_value -s -a} \
           -e 's;@rpmbldroot@;%{l_buildroot};g' \
           -e 's;@sampdomain@;TRUE;g' \
  +        -e "s;@jdkhome@;`echo $JAVA_HOME`;g" \
           %{SOURCE j2ee14.state} \
           $RPM_BUILD_ROOT
   %else
       %{l_shtool} install -c %{l_value -s -a} \
           -e 's;@rpmbldroot@;%{l_buildroot};g' \
           -e 's;@sampdomain@;FALSE;g' \
  +        -e "s;@jdkhome@;`echo $JAVA_HOME`;g" \
           %{SOURCE j2ee14.state} \
           $RPM_BUILD_ROOT
   %endif
  @@ -120,40 +133,50 @@
             i686-freebsd[45]* )
                 %{l_shtool} subst \
                     -e 
's;@platformid@;97c6adba9d2ee77580fdce6054fcd1c29a83bdc7;g' \
  -                  $RPM_BUILD_ROOT/j2ee14.state
  -              ( %{SOURCE j2eesdk-%{V_sunjava}-linux.bin} \
  -                    -javahome %{l_prefix}/libexec/j2se14/jre \
  -                    -silent $RPM_BUILD_ROOT/j2ee14.state
  +                  $RPM_BUILD_ROOT/j2ee.state
  +              ( %{SOURCE sjsas_pe-%{V_sunjava}-linux.bin} \
  +                    -javahome $JAVA_HOME \
  +                    -silent $RPM_BUILD_ROOT/j2ee.state
                   true
                 ) || exit $?
                 ;;
             i686-linux2* )
                 %{l_shtool} subst \
  -                  -e 
's;@platformid@;bf7a62b01847d6121fcb2922d452b9bf2fad4ac5;g' \
  -                  $RPM_BUILD_ROOT/j2ee14.state
  -              ( %{SOURCE j2eesdk-%{V_sunjava}-linux.bin} \
  -                    -javahome %{l_prefix}/libexec/j2se14/jre \
  -                    -silent $RPM_BUILD_ROOT/j2ee14.state
  +                  -e 
's;@platformid@;97c6adba9d2ee77580fdce6054fcd1c29a83bdc7;g' \
  +                  $RPM_BUILD_ROOT/j2ee.state
  +              ( %{SOURCE sjsas_pe-%{V_sunjava}-linux.bin} \
  +                    -javahome $JAVA_HOME \
  +                    -silent $RPM_BUILD_ROOT/j2ee.state
  +                true
  +              ) || exit $?
  +              ;;
  +          ix86-sunos5.10 )
  +              %{l_shtool} subst \
  +                  -e 
's;@platformid@;dc9c042e66c9d5463a4c8bf3cddc1c8bcad58388;g' \
  +                  $RPM_BUILD_ROOT/j2ee.state
  +              ( %{SOURCE sjsas_pe-%{V_sunjava}-solaris-i586.bin} \
  +                    -javahome $JAVA_HOME \
  +                    -silent $RPM_BUILD_ROOT/j2ee.state
                   true
                 ) || exit $?
                 ;;
             ix86-sunos5* )
                 %{l_shtool} subst \
  -                  -e 
's;@platformid@;83ef175f1d5761f34b76c6c8269c803de9f3abcf;g' \
  -                  $RPM_BUILD_ROOT/j2ee14.state
  -              ( %{SOURCE j2eesdk-%{V_sunjava}-solaris-i586.bin} \
  -                    -javahome %{l_prefix}/libexec/j2se14/jre \
  -                    -silent $RPM_BUILD_ROOT/j2ee14.state
  +                  -e 
's;@platformid@;7ea13f093e17c85d0fb7b90f78c1cb2718158ddc;g' \
  +                  $RPM_BUILD_ROOT/j2ee.state
  +              ( %{SOURCE sjsas_pe-%{V_sunjava}-solaris-i586.bin} \
  +                    -javahome $JAVA_HOME \
  +                    -silent $RPM_BUILD_ROOT/j2ee.state
                   true
                 ) || exit $?
                 ;;
             sun4u-sunos5* )
                 %{l_shtool} subst \
                     -e 
's;@platformid@;ba2d03febe84d6f4e6332aadb38428d50573b5cc;g' \
  -                  $RPM_BUILD_ROOT/j2ee14.state
  -              ( %{SOURCE j2eesdk-%{V_sunjava}-solaris-sparc.bin} \
  -                    -javahome %{l_prefix}/libexec/j2se14/jre \
  -                    -silent $RPM_BUILD_ROOT/j2ee14.state
  +                  $RPM_BUILD_ROOT/j2ee.state
  +              ( %{SOURCE sjsas_pe-%{V_sunjava}-solaris-sparc.bin} \
  +                    -javahome $JAVA_HOME \
  +                    -silent $RPM_BUILD_ROOT/j2ee.state
                   true
                 ) || exit $?
                 ;;
  @@ -161,7 +184,7 @@
             * )
                 ( echo "Sorry, either your platform '%{l_platform -t} is 
unsupported,"
                   echo "or the OpenPKG team doesn't have a proper state file 
identifier"
  -                echo "for it yet. Please contact [email protected] to 
contribute."
  +                echo "for it. Please contact [email protected] to 
contribute one."
                 ) | %{l_rpmtool} msg -b -t notice
                 exit 1
                 ;;
  @@ -173,15 +196,27 @@
   
       #   activate binaries
       ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
  -      for bin in appclient capture-schema \
  -          uninstall asadmin deploytool verifier \
  -          asant jspc wscompile asupgrade \
  -          package-appclient wsdeploy; do
  +      for bin in appclient asadmin asant asupgrade capture-schema deploytool 
\
  +          jspc package-appclient uninstall verifier wscompile wsdeploy; do
             ln -s ../libexec/j2ee/bin/$bin .
         done
       ) || exit $?
   
  -    #   install run-command script
  +    #   conditionally install apidocs
  +%if "%{with_docs}" == "yes"
  +    ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2ee
  +      unzip %{SOURCE j2eeri-%{V_sundocs}-doc-api.zip}
  +    ) || exit $?
  +%endif
  +
  +    #   conditionally install samples
  +%if "%{with_samples}" == "yes"
  +    ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2ee
  +      unzip %{SOURCE j2eesdk-%{V_sunsamp}-samples.zip}
  +    ) || exit $?
  +%endif
  +
  +    #   install runcommand script
       %{l_shtool} install -c -m 755 %{l_value -s -a} \
           %{SOURCE rc.j2ee14} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   
  @@ -192,3 +227,26 @@
   %clean
       rm -rf $RPM_BUILD_ROOT
   
  +%post
  +    if [ $1 -eq 1 ]; then
  +        # FIXME MSvB: #   display final hints on initial installation
  +        # FIXME MSvB: ( echo "Next Steps:"
  +        # FIXME MSvB:   echo "  1. Access the About Application Server PE 8 
welcome page at:"
  +        # FIXME MSvB:   echo "     
file:///home/<username>/SUNWappserver/docs/about.html"
  +        # FIXME MSvB:   echo ""
  +        # FIXME MSvB:   echo "  2. Start the Application Server by 
executing:"
  +        # FIXME MSvB:   echo "     
/home/<username>/SUNWappserver/bin/asadmin start-domain domain1"
  +        # FIXME MSvB:   echo ""
  +        # FIXME MSvB:   echo "  3. Start the Admin Console:"
  +        # FIXME MSvB:   echo "     http://localhost:4848";
  +        # FIXME MSvB: ) | %{l_rpmtool} msg -b -t notice
  +    fi
  +%if "%{with_samples}" == "yes"
  +    if [ $1 -eq 2 ]; then
  +        # FIXME MSvB: #   after upgrade, restart service
  +        # FIXME MSvB: eval `%{l_rc} j2ee status 2>/dev/null`
  +        # FIXME MSvB: [ ".$j2ee_active" = .yes ] && %{l_rc} j2ee restart
  +    fi
  +%endif
  +    exit 0
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/j2ee14/j2ee14.state
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 j2ee14.state
  --- openpkg-src/j2ee14/j2ee14.state   9 Jul 2004 09:47:20 -0000       1.1
  +++ openpkg-src/j2ee14/j2ee14.state   19 Apr 2005 16:54:07 -0000      1.2
  @@ -1,22 +1,31 @@
   #
  -# Wizard Statefile created: Thu Mar 25 17:57:32 CET 2004
  -#              Wizard path: /tmp/j2eesAAA3YaG3P/appserv.class
  +# Wizard Statefile created: Thu Mar 10 15:56:06 CET 2005
  +#              Wizard path: /tmp/sjsasAAAXTa4gY/appserv.class
   #
   
   #
  -# Install Wizard Statefile section for J2EE 1.4 SDK
  +# Install Wizard Statefile section for Sun Java System Application Server
   #
   #
  -[STATE_BEGIN J2EE 1.4 SDK @[EMAIL PROTECTED]
  +[STATE_BEGIN Sun Java System Application Server @[EMAIL PROTECTED]
   defaultInstallDirectory = /home/user/SUNWappserver
   currentInstallDirectory = @rpmbldroot@@l_prefix@/libexec/j2ee14
  +JDK_LOCATION = @jdkhome@
   INST_ASADMIN_USERNAME = admin
  -INST_ASADMIN_PASSWORD = araidcefdobofvulinhovlghabargehr2
  +INST_ASADMIN_PASSWORD = cgavudbjiddgldmgfiikjbeuqmnnffjbeq
  +INST_MASTER_PASSWORD = pfqvycktptyscxdrshenunatrvg
   INST_ASADMIN_PORT = 4848
   INST_ASWEB_PORT = 8080
  -INST_HTTPS_PORT = 1043
  +INST_HTTPS_PORT = 8181
   STORE_ADMIN_AUTH = TRUE
   ADMIN_PASSWORD_ENCRYPTED = TRUE
  +INST_JMS_PORT = 7676
  +INST_ORB_PORT = 3700
  +INST_ORB_SSL_PORT = 3820
  +INST_ORB_MUTUALAUTH_PORT = 3920
  +INST_JMX_PORT = 8686
  +INST_POINTBASE_PORT = 9092
   CREATE_SAMPLES_DOMAIN = @sampdomain@
   CREATE_DESKTOP_SHORTCUT = FALSE
  -[STATE_DONE J2EE 1.4 SDK @[EMAIL PROTECTED]
  +UPDATE_PATH = FALSE
  +[STATE_DONE Sun Java System Application Server @[EMAIL PROTECTED]
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/j2ee14/rc.j2ee14
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 rc.j2ee14
  --- openpkg-src/j2ee14/rc.j2ee14      9 Jul 2004 09:47:20 -0000       1.1
  +++ openpkg-src/j2ee14/rc.j2ee14      19 Apr 2005 16:54:07 -0000      1.2
  @@ -9,6 +9,6 @@
   
   %env
       rcService j2ee14 enable yes || exit 0
  -    J2EE_HOME="$j2ee_home"
  +    J2EE_HOME="$j2ee14_home"
       export J2EE_HOME
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to