| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- ##
- ## j2se14.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
- ##
- ## 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 versions
- %define V_sunjava 1_4_1_01
- %define V_filesys 1.4.1_01
- %define V_openpkg 1.4.1.01
- # package information
- Name: j2se14
- Summary: Java 2 Platform, Standard Edition (J2SE) 1.4
- URL: http://java.sun.com/j2se/
- Vendor: Sun Microsystems, Inc.
- Packager: The OpenPKG Project
- Distribution: OpenPKG [PRIV]
- Group: Language
- License: Commercial
- Version: %{V_openpkg}
- Release: 20021110
- # list of sources
- Source0: j2sdk-%{V_sunjava}-linux-i586.bin
- Source1: j2sdk-%{V_sunjava}-solaris-sparc.sh
- Source2: j2sdk-%{V_sunjava}-solaris-sparcv9.sh
- Source3: rc.j2se14
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20020714
- PreReq: OpenPKG, openpkg >= 20020714
- AutoReq: no
- AutoReqProv: no
- Provides: JDK, JRE
- %description
- The premier solution for rapidly developing and deploying
- mission-critical, enterprise applications, J2SE provides the
- essential compiler, tools, runtimes, and APIs for writing,
- deploying, and running applets and applications in the Java
- programming language.
- %prep
- %setup -q -c j2se14 -T
- %build
- %install
- rm -rf $RPM_BUILD_ROOT
- # select vendor source
- pkgfile=""
- suppfile=""
- pkgdir=%{V_filesys}
- case "%{l_target}" in
- ix86-linux2.[2-5]* | ix86-freebsd4* )
- pkgfile="j2sdk-%{V_sunjava}-linux-i586.bin"
- pkgdir="j2sdk%{V_filesys}"
- ;;
- sparc64-solaris2.[6-9]*)
- pkgfile="j2sdk-%{V_sunjava}-solaris-sparc.sh"
- suppfile="j2sdk-%{V_sunjava}-solaris-sparcv9.sh"
- pkgdir="j2sdk%{V_filesys}"
- ;;
- esac
- if [ ".$pkgfile" = . ]; then
- echo "Sorry, unsupported architecture '%{l_target}'" 1>&2
- exit 1
- fi
- # create installation tree
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
- $RPM_BUILD_ROOT%{l_prefix}/libexec \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
- $RPM_BUILD_ROOT%{l_prefix}/share/j2se14/doc
- # unpack vendor distribution
- ( umask 022
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec
- case "%{l_target}" in
- ix86-linux2.[2-5]* | ix86-freebsd4* )
- echo "yes" | sh $RPM_SOURCE_DIR/$pkgfile \
- >$RPM_BUILD_ROOT%{l_prefix}/share/j2se14/doc/COPYING.32
- ;;
- sparc64-solaris2.[6-9]*)
- echo "yes" | sh $RPM_SOURCE_DIR/$pkgfile \
- >$RPM_BUILD_ROOT%{l_prefix}/share/j2se14/doc/COPYING.32
- echo "yes" | sh $RPM_SOURCE_DIR/$suppfile \
- >$RPM_BUILD_ROOT%{l_prefix}/share/j2se14/doc/COPYING.64
- ;;
- esac
- mv $pkgdir j2se14
- )
- # fix vendor distribution
- ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/bin
- find . -type f -print | xargs chmod u+w
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/jre/bin
- find . -type f -print | xargs chmod u+w
- case "%{l_target}" in
- sparc64-solaris2.[6-9]*)
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/bin/sparcv9
- find . -type f -print | xargs chmod u+w
- cd $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/jre/bin/sparcv9
- find . -type f -print | xargs chmod u+w
- ;;
- esac
- )
- # optionally brand ELF binaries (FreeBSD only)
- case "%{l_target}" in
- ix86-freebsd4* )
- brandelf -t Linux \
- `find $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/bin/ -type f -print` \
- >/dev/null 2>&1 || true
- brandelf -t Linux \
- `find $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/jre/bin/ -type f -print` \
- >/dev/null 2>&1 || true
- ;;
- esac
- # clean out installation area
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/demo 2>/dev/null || true
- # reduce man pages to essential ones and move them to final location
- if [ -d $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/man/man1 ]; then
- cp $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/man/man1/* \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1
- elif [ -d $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/man/sman1 ]; then
- cp $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/man/sman1/* \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1
- fi
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/j2se14/man 2>/dev/null || true
- # link developer binaries
- ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
- for bin in appletviewer extcheck idlj jar jarsigner java \
- java-rmi.cgi javac javadoc javah javap jdb keytool native2ascii \
- orbd policytool rmic rmid rmiregistry serialver servertool \
- tnameserv; do
- ln -s ../libexec/j2se14/bin/$bin .
- done
- )
- # install run-command script
- %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE rc.j2se14} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|