milis/talimatname/genel/o/openjdk8/talimat

151 lines
5.3 KiB
Plaintext
Raw Normal View History

2017-10-27 20:46:27 +02:00
# Tanım: Java Development Kit (JDK) adı verilen bir dizi program.
2017-09-09 08:28:55 +02:00
# URL: http://openjdk.java.net/
2017-10-27 20:46:27 +02:00
# Paketçi: milisarge@gmail.com
# Gerekler: openjdk alsa-lib cups xorg-fontconfig freetype giflib gtk2 krb5 lcms2 libjpeg-turbo libpng libxslt nss unzip xorg-libxt xorg-libxtst xorg-libxinerama zip
2017-09-09 08:28:55 +02:00
2017-10-28 14:10:23 +02:00
isim=openjdk8
openjdk_devir=8
2017-09-09 08:28:55 +02:00
openjdk_update=u144
openjdk_build=b01
2017-10-28 14:10:23 +02:00
openjdk_surum=$openjdk_release$openjdk_update$openjdk_build
surum=8u144-b01
icedtea_surum=3.5.1
2017-09-09 08:28:55 +02:00
certdata_rev=e5e2984f44c5
2017-10-28 14:10:23 +02:00
devir=1
kaynak=(http://icedtea.wildebeest.org/download/source/icedtea-$icedtea_version.tar.xz
http://stygian.me/crux/distfiles/$isim/corba-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim/hotspot-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim/jaxp-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim/jaxws-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim/jdk-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim/langtools-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim/nashorn-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim/openjdk-$openjdk_version.tar.xz
http://stygian.me/crux/distfiles/$isim-boot.pkg.tar.xz
2017-09-09 08:28:55 +02:00
http://ftp.netbsd.org/pub/pkgsrc/pkgsrc-2017Q2/pkgsrc/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
http://hg.mozilla.org/releases/mozilla-release/raw-file/$certdata_rev/security/nss/lib/ckfw/builtins/certdata.txt)
unpack_source() {
for file in ${source[@]}; do
case ${file##*/} in
icedtea-$icedtea_version.tar.xz|\
2017-10-28 14:10:23 +02:00
$isim-boot.pkg.tar.xz)
2017-09-09 08:28:55 +02:00
bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
*)
cp $(get_filename $file) $SRC ;;
esac
done
}
2017-10-27 23:59:41 +02:00
derle() {
2017-09-09 08:28:55 +02:00
JAVA_DIR=/opt/OpenJDK-8u60-bin
mkdir $SRC/build
cd $SRC/build
LC_ALL=C \
CFLAGS="$CFLAGS -fno-delete-null-pointer-checks -fno-omit-frame-pointer -fno-lifetime-dse" \
CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks -fno-omit-frame-pointer -fno-lifetime-dse" \
JAVA_HOME=$JAVA_DIR \
PATH=$JAVA_DIR/bin:$PATH \
CONFIG_SHELL=/bin/bash \
../icedtea-$icedtea_version/configure \
2017-10-28 14:10:23 +02:00
--prefix=/usr/lib/java/$isim \
2017-09-09 08:28:55 +02:00
--disable-docs \
--disable-downloading \
--disable-precompiled-headers \
--disable-tests \
--disable-system-pcsc \
--disable-system-sctp \
--enable-system-cups \
--enable-system-fontconfig \
--enable-system-gconf \
--enable-system-gio \
--enable-system-gtk \
--enable-system-jpeg \
--enable-system-kerberos \
--enable-system-lcms \
--enable-system-png \
--enable-system-zlib \
--enable-nss \
--enable-sunec \
--enable-non-nss-curves \
--enable-improved-font-rendering \
--with-openjdk-src-zip=$SRC/openjdk-$openjdk_version.tar.xz \
--with-hotspot-src-zip=$SRC/hotspot-$openjdk_version.tar.xz \
--with-corba-src-zip=$SRC/corba-$openjdk_version.tar.xz \
--with-jaxp-src-zip=$SRC/jaxp-$openjdk_version.tar.xz \
--with-jaxws-src-zip=$SRC/jaxws-$openjdk_version.tar.xz \
--with-jdk-src-zip=$SRC/jdk-$openjdk_version.tar.xz \
--with-langtools-src-zip=$SRC/langtools-$openjdk_version.tar.xz \
--with-nashorn-src-zip=$SRC/nashorn-$openjdk_version.tar.xz \
2017-10-28 14:10:23 +02:00
--with-pkgsurum=MILIS \
2017-09-09 08:28:55 +02:00
--with-jdk-home=$JAVA_DIR
LC_ALL=C \
CFLAGS="$CFLAGS -fno-delete-null-pointer-checks -fno-omit-frame-pointer -fno-lifetime-dse" \
CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks -fno-omit-frame-pointer -fno-lifetime-dse" \
JAVA_HOME=$JAVA_DIR \
PATH=$JAVA_DIR/bin:$PATH \
make
2017-10-28 14:10:23 +02:00
mkdir -p $PKG/usr/lib/java/$isim
cp -r openjdk.build/images/j2sdk-image/* $PKG/usr/lib/java/$isim
2017-09-09 08:28:55 +02:00
# remove unneeded files
2017-10-28 14:10:23 +02:00
rm -f $PKG/usr/lib/java/$isim/src.zip
rm -rf $PKG/usr/lib/java/$isim/{demo,sample}
rm -f $PKG/usr/lib/java/$isim/man/ja
rm -rf $PKG/usr/lib/java/$isim/man/ja_JP.UTF-8
find $PKG/usr/lib/java/$isim -name '*.ja' -delete
2017-09-09 08:28:55 +02:00
# deduplicate
2017-10-28 14:10:23 +02:00
rm $PKG/usr/lib/java/$isim/jre/lib/amd64/libjawt.so
2017-09-09 08:28:55 +02:00
ln -s ../../../../lib/amd64/libjawt.so \
2017-10-28 14:10:23 +02:00
$PKG/usr/lib/java/$isim/jre/lib/amd64/libjawt.so
rm $PKG/usr/lib/java/$isim/jre/lib/amd64/jli/libjli.so
2017-09-09 08:28:55 +02:00
ln -s ../../../../lib/amd64/jli/libjli.so \
2017-10-28 14:10:23 +02:00
$PKG/usr/lib/java/$isim/jre/lib/amd64/jli/libjli.so
for f in $PKG/usr/lib/java/$isim/jre/bin/* ; do
if [ -f $PKG/usr/lib/java/$isim/bin/${f##*/} ]; then
2017-09-09 08:28:55 +02:00
rm $f
ln -s ../../bin/${f##*/} $f
fi
done
2017-10-28 14:10:23 +02:00
sed -e "/# cd \/etc\/openssl\/certs/s//# cd \/usr\/share\/$isim\/certs/" \
2017-09-09 08:28:55 +02:00
-e '/@AWK@/s//\/usr\/bin\/awk/' \
-e '/@ECHO@/s//\/bin\/echo/' \
-e '/@EXPR@/s//\/usr\/bin\/expr/' \
-e '/@LN@/s//\/bin\/ln/' \
-e '/@LS@/s//\/bin\/ls/' \
-e '/@MKDIR@/s//\/bin\/mkdir/' \
2017-09-09 08:48:30 +02:00
-e '/@OPENSSL@/s//\/bin\/openssl/' \
2017-10-28 14:10:23 +02:00
-e "/@SSLDIR@/s//\/usr\/share\/$isim/" \
2017-09-09 08:28:55 +02:00
-e '/@PREFIX@/s//\/usr/' \
-e '/@RM@/s//\/bin\/rm/' \
-e '/@LOCALBASE@/s//\/usr/' \
2017-10-28 14:10:23 +02:00
-e "/@DATADIR@/s//\/usr\/share\/$isim/" \
2017-09-09 08:28:55 +02:00
-e 's/self extract/self -f $certfile extract/' \
-e 's/self rehash/self -f $certfile rehash/' \
$SRC/mozilla-rootcerts.sh > $SRC/mozilla-rootcerts
# generate java's cacerts
# big thanks to pkgsrc's mozilla-rootcerts and openjdk pkg's for this part
2017-10-28 14:10:23 +02:00
rm -f $PKG/usr/lib/java/$isim/jre/lib/security/cacerts
2017-09-09 08:28:55 +02:00
mkdir $SRC/cacerts
cd $SRC/cacerts
sh $SRC/mozilla-rootcerts -f $SRC/certdata.txt extract
for cert in *.pem; do
2017-10-28 14:10:23 +02:00
JAVA_HOME=$PKG/usr/lib/java/$isim \
2017-09-09 08:28:55 +02:00
PATH=$JAVA_HOME/bin:$PATH \
keytool \
-noprompt \
-importcert \
2017-10-28 14:10:23 +02:00
-keystore $PKG/usr/lib/java/$isim/jre/lib/security/cacerts \
2017-09-09 08:28:55 +02:00
-alias $(echo $cert | sed 's,.*/\([^/]*\)\.pem,\1,') \
-file $cert \
-storepass changeit
done
}