Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37564579
en ru br
ALT Linux repos
5.0: 0.3.3-alt16
4.1: 0.3.3-alt11
4.0: 0.3.3-alt9
3.0: 0.3.3-alt4

Group :: Development/Java
RPM: jdkgcj

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: jdkgcj
Version: 0.3.3
Release: alt9

Summary: A free Java SDK
License: GPL
Group: Development/Java
Url: http://www.arklinux.org/projects/jdkgcj
Packager: Mikhail Zabaluev <mhz at altlinux.ru>

%define jdkgcj_home /usr/lib/%name
%define java_home   %jdkgcj_home
%define priority 120

Requires: gcc%__gcc_version_base-java = %__gcc_version
Requires: gcc-java-common >= 1.4.1-alt2
Requires: java-common >= 1.1
PreReq: alternatives >= 0:0.2.0-alt0.12

Source: %name-%version.tar
Source1: %name-notimpl.sh
Source2: %name-refentry.xml

%set_compress_method gzip

BuildRequires: gcc%__gcc_version_base-java xmlto

%description
jdkgcj provides an interface to gcj that is compatible with the Sun and IBM
Java Development Kits (JDKs).
jdkgcj provides the javac, java and javah tools as well as jni.h, allowing
you to compile java extensions using JNI.

%prep
%setup -q -n %name

%build
%configure \
--prefix=%jdkgcj_home \
--bindir=%jdkgcj_home/bin \
--includedir=%jdkgcj_home/include
xmlto -o man man %SOURCE2

%install
rln()
{
local target=$1 && shift
local source=$1 && shift
target=`relative "$target" "$source"`
ln -snf "$target" "%buildroot$source"
}
%make_install install DESTDIR=%buildroot
rln %_bindir/gcc %jdkgcj_home/bin/javah
rln %_bindir/gcc %jdkgcj_home/bin/jar
rln %_bindir/gcc %jdkgcj_home/bin/rmic
install -p -m755 %SOURCE1 %buildroot%jdkgcj_home/bin/notimpl
install -d -m755 %buildroot%jdkgcj_home/man
install -d -m755 %buildroot%jdkgcj_home/man/man1
install -p -m644 man/* %buildroot%jdkgcj_home/man/man1/

gcj_target_libdir=`gcj -print-search-dirs |sed -ne 's|^install: \(/.*\)/$|\1|p'`
for f in java javax jvmpi.h; do
rln "$gcj_target_libdir/include/$f" %jdkgcj_home/include/
done

mkdir -p %buildroot%_altdir
# javac alternative, library dir and manual
cat <<EOF>%buildroot%_altdir/%name-javac
%_bindir/javac %java_home/bin/javac %priority
%_libdir/jdk %java_home %java_home/bin/javac
%_man1dir/javac.1.gz %java_home/man/man1/javac.1.gz %java_home/bin/javac
EOF
# binaries and manuals
for i in appletviewer extcheck idlj jar jarsigner javadoc javah javap jdb native2ascii rmic serialver; do
cat <<EOF>>%buildroot%_altdir/%name-javac
%_bindir/$i %java_home/bin/$i %java_home/bin/javac
%_man1dir/$i.1.gz %java_home/man/man1/$i.1.gz %java_home/bin/javac
EOF
done
# profiles
for i in j2se.sh j2se.csh; do
cat <<EOF>>%buildroot%_altdir/%name-javac
%_sysconfdir/profile.d/$i %java_home/$i %java_home/bin/javac
EOF
done

for i in appletviewer extcheck idlj jarsigner javadoc javap jdb native2ascii serialver; do
ln -sf notimpl %buildroot%jdkgcj_home/bin/$i
done

%post
%register_alternatives %name-javac

%preun
%unregister_alternatives %name-javac

%files
%_altdir/%name-javac
%jdkgcj_home

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin