Ticket #1334: remove_java.patch

File remove_java.patch, 4.0 KB (added by Jesse Becker, 8 years ago)
  • gridengine.

    old new  
    3333# admin user maybe to create
    3434%define username sgeadmin
    3535
     36# Set this to "0" to create RPMs that do not include
     37# anything Java-related.
     38%define use_java  1
     39
    3640Name:    gridengine
    3741Version: 8.0.0a
    38 Release: 1%{?dist}
     42Release: 2%{?dist}
    3943Summary: Grid Engine - Distributed Resource Manager
    4044
    4145Group:   Applications/System
     
    4951
    5052BuildRequires: /bin/csh, openssl-devel, db4-devel, ncurses-devel, pam-devel
    5153BuildRequires: libXmu-devel, libXpm-devel
     54BuildRequires: elfutils-libelf-devel, net-tools, man, gzip
     55Requires: binutils, ncurses, shadow-utils
     56
     57
     58%if 0%{?use_java}
     59BuildRequires: java-devel >= 1.6.0, javacc, ant-junit, ant-nodeps
     60#BuildRequires: hadoop-0.20
     61%endif
     62
    5263# This used to test %{?rhel}, but that's not defined on RHEL 5, and
    5364# I don't know whether _host_vendor distinguishes Fedora and RHEL.
    5465%if 0%{?fedora}
    5566BuildRequires: lesstif-devel
     67BuildRequires: fedora-usermgmt-devel
    5668%else
    5769BuildRequires: openmotif-devel
    5870%endif
    59 BuildRequires: java-devel >= 1.6.0, javacc, ant-junit, ant-nodeps
    60 BuildRequires: elfutils-libelf-devel, net-tools, man, gzip
    61 #BuildRequires: hadoop-0.20
    62 %if 0%{?fedora}
    63 BuildRequires: fedora-usermgmt-devel
    64 %endif
    65 Requires: binutils, ncurses, shadow-utils
     71
    6672
    6773%description
    6874Grid Engine (often known as SGE) is a distributed resource manager,
     
    122128%description qmaster
    123129Programs needed to run a Grid Engine master host.
    124130
     131%if 0%{?use_java}
     132%package java
     133Summary: Gridengine Java programs
     134Group: Development/Libraries
     135License: BSD and LGPLv2+ and MIT and SISSL
     136Requires: java >= 1.6.0
     137Requires: %{name} = %{version}-%{release}
     138
     139%description
     140Programs that depend on Java.
     141
     142%endif
     143
    125144%prep
    126145
    127146%setup -q -n sge-8.0.0a
     
    144163# -O2/-O3 gives warnings about type puns.  It's not clear whether
    145164# they're serious, but -fno-strict-aliasing just in case.
    146165export SGE_INPUT_CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
    147 [ -n "$RPM_BUILD_NCPUS" ] && parallel_flags="-parallel $RPM_BUILD_NCPUS"
    148 csh ./aimk -only-depend
     166RPM_BUILD_NCPUS=`/usr/bin/getconf _NPROCESSORS_ONLN`
     167#echo "Number CPUS = [$RPM_BUILD_NCPUS]"
     168
     169if [[ -n "$RPM_BUILD_NCPUS" ]] && [[ "$RPM_BUILD_NCPUS" -gt 1 ]]; then
     170    parallel_flags="-parallel $RPM_BUILD_NCPUS"
     171fi
     172#echo "parallel_flags=[$parallel_flags]"
     173
     174if [[ "%{use_java}" > 0 ]]; then
     175    JAVA_BUILD_OPTIONS=""
     176else
     177    JAVA_BUILD_OPTIONS="-no-java -no-jni"
     178fi
     179
     180
     181csh ./aimk -only-depend ${JAVA_BUILD_OPTIONS}
     182
    149183scripts/zerodepend
    150 ./aimk depend
    151 ./aimk -DLIBSSL_VER='\"'$ssl_ver'\"' -no-gui-inst -system-libs -pam -no-herd $parallel_flags
     184./aimk ${JAVA_BUILD_OPTIONS} depend
     185
     186./aimk -DLIBSSL_VER='\"'$ssl_ver'\"' -no-gui-inst -system-libs -pam -no-herd $parallel_flags ${JAVA_BUILD_OPTIONS}
     187
    152188./aimk -man
     189
     190# HTML man pages throw lots of grotty errors?
     191#./aimk -htmlman
     192
    153193# "-no-gui-inst -no-herd -javadoc" still produces all the javadocs
     194%if 0%{?use_java}
    154195ant drmaa.javadoc juti.javadoc jgdi.javadoc jjsv.javadoc
     196%endif
    155197
    156198%install
    157199rm -rf $RPM_BUILD_ROOT
     
    197239%exclude %{sge_bin}/*/qacct
    198240%exclude %{sge_bin}/*/qmon
    199241%exclude %{sge_bin}/*/sge_*
     242%if 0%{use_java}
    200243%exclude %{sge_docdir}/javadocs
     244%endif
    201245%exclude %{sge_home}/examples/drmaa
    202246%exclude %{sge_mandir}/man1/qmon.1.gz
    203247%exclude %{sge_mandir}/man8/sge_qmaster.8.gz
     
    228272%{sge_include}
    229273%{sge_home}/pvm/src
    230274%{sge_mandir}/man3/*.3.gz
    231 %doc %{sge_docdir}/javadocs
    232275%{sge_home}/examples/drmaa
    233276
    234277%files qmon
     
    258301%{sge_mandir}/man8/sge_qmaster.8.gz
    259302%{sge_mandir}/man8/sge_shadowd.8.gz
    260303
     304%if 0%{?use_java}
     305%files java
     306%defattr(-,root,root,-)
     307%doc %{sge_docdir}/javadocs
     308%endif
     309
     310
    261311%changelog
     312* Fri Jun 17 2011 Jesse Becker <hawson@gmail.com> - 8.0.0a-2
     313- Make Java optional
     314
    262315* Thu May 25 2011 Dave Love <d.love@liverpool.ac.uk> - 8.0.0a-1
    263316- Heavily re-written from Orion Poplawski's Fedora original for shared
    264317  installation under /opt and not doing any configuration.  Different