Replace lib/java -> share/java

This commit is contained in:
Eelco Dolstra 2014-01-09 13:01:38 +01:00
parent 4775dee8b9
commit 16e626a80d
13 changed files with 76 additions and 77 deletions

View file

@ -26,8 +26,8 @@ in
mkdir -p "dist"
cat > build.properties <<EOF
dist.lisp.dir = dist/share/emacs/site-lisp
dist.java.lib.dir = dist/lib/java
dist.jar.jde.file = dist/lib/java/jde.jar
dist.java.lib.dir = dist/share/java
dist.jar.jde.file = dist/share/java/jde.jar
dist.java.src.dir = dist/src/${name}/java
dist.doc.dir dist/doc/${name}
prefix.dir = $out
@ -40,7 +40,7 @@ in
for i in "lisp/"*.el
do
sed -i "$i" -e "s|@out@|$out|g ;
s|@javadir@|$out/lib/java|g ;
s|@javadir@|$out/share/java|g ;
s|@datadir@|$out/share/${name}|g"
done
'';
@ -55,7 +55,7 @@ in
# Move everything that's not a JAR to $datadir. This includes
# `sun_checks.xml', license files, etc.
cd "$out/lib/java"
cd "$out/share/java"
for i in *
do
if echo $i | grep -qv '\.jar''$'

View file

@ -14,7 +14,7 @@ Tell the elisp code about the right Java directory.
- (oset this bsh-cmd-dir (expand-file-name "bsh-commands" jde-java-directory))
- (oset this checkstyle-jar (expand-file-name "lib/checkstyle-all.jar" jde-java-directory))
- (oset this regexp-jar (expand-file-name "lib/jakarta-regexp.jar" jde-java-directory))
+ (let ((jde-java-directory "@out@/lib/java"))
+ (let ((jde-java-directory "@out@/share/java"))
+
+ (oset this bsh-cmd-dir "@datadir@/bsh-commands")
+ (oset this checkstyle-jar (expand-file-name "checkstyle-all.jar" jde-java-directory))
@ -38,7 +38,7 @@ Tell the elisp code about the right Java directory.
- (concat
- (jde-find-jde-data-directory)
- "java/"))
+ (jde-java-directory "@out@/lib/java")
+ (jde-java-directory "@out@/share/java")
(args (append
(unless jde-checkstyle-expanded-properties-file
(jde-checkstyle-get-property-args this))
@ -67,7 +67,7 @@ Tell the elisp code about the right Java directory.
- (jde-java-directory
- (expand-file-name "java"
- (jde-find-jde-data-directory)))
+ (jde-java-directory "@out@/lib/java")
+ (jde-java-directory "@out@/share/java")
(vm-args
(let (args)
(setq args

View file

@ -10,14 +10,14 @@ stdenv.mkDerivation rec {
buildInputs = [jre unzip];
buildPhase = "";
installPhase = ''
mkdir -p "$out"/{bin,lib/java/zvtm/plugins,share/doc/zvtm}
mkdir -p "$out"/{bin,share/java/zvtm/plugins,share/doc/zvtm}
cp overview.html *.license.* "$out/share/doc/zvtm"
cp -r target/* "$out/lib/java/zvtm/"
cp -r target/* "$out/share/java/zvtm/"
echo '#!/bin/sh' > "$out/bin/zgrviewer"
echo "java -jar '$out/lib/java/zvtm/zgrviewer-${version}.jar'" >> "$out/bin/zgrviewer"
echo "java -jar '$out/share/java/zvtm/zgrviewer-${version}.jar'" >> "$out/bin/zgrviewer"
chmod a+x "$out/bin/zgrviewer"
'';
meta = {

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation (
antSetupPhase = with stdenv.lib; ''
if test "$hydraAntLogger" != "" ; then
export ANT_ARGS="-logger org.hydra.ant.HydraLogger -lib `ls $hydraAntLogger/lib/java/*.jar | head -1`"
export ANT_ARGS="-logger org.hydra.ant.HydraLogger -lib `ls $hydraAntLogger/share/java/*.jar | head -1`"
fi
for abi in ${concatStringsSep " " (map (f: "`find ${f} -name '*.jar'`") antBuildInputs)}; do
export ANT_ARGS="$ANT_ARGS -lib $abi"
@ -39,20 +39,20 @@ stdenv.mkDerivation (
'';
installPhase = ''
mkdir -p $out/lib/java
mkdir -p $out/share/java
${ if jars == [] then ''
find . -name "*.jar" | xargs -I{} cp -v {} $out/lib/java
find . -name "*.jar" | xargs -I{} cp -v {} $out/share/java
'' else stdenv.lib.concatMapStrings (j: ''
cp -v ${j} $out/lib/java
cp -v ${j} $out/share/java
'') jars }
for j in $out/lib/java/*.jar ; do
for j in $out/share/java/*.jar ; do
echo file jar $j >> $out/nix-support/hydra-build-products
done
'';
generateWrappersPhase =
let
cp = w: "-cp '${lib.optionalString (w ? classPath) w.classPath}${lib.optionalString (w ? mainClass) ":$out/lib/java/*"}'";
cp = w: "-cp '${lib.optionalString (w ? classPath) w.classPath}${lib.optionalString (w ? mainClass) ":$out/share/java/*"}'";
in
''
header "Generating jar wrappers"

View file

@ -14,11 +14,11 @@ stdenv.mkDerivation rec {
buildInputs = [ gnutar ];
installPhase = ''
mkdir -p $out/lib/java $out/bin
mkdir -p $out/share/java $out/bin
tar -xzf $src
cp -r compiler.jar $out/lib/java/
cp -r compiler.jar $out/share/java/
echo "#!${bash}/bin/bash" > $out/bin/closure-compiler
echo "${jre}/bin/java -jar $out/lib/java/compiler.jar \"\$@\"" >> $out/bin/closure-compiler
echo "${jre}/bin/java -jar $out/share/java/compiler.jar \"\$@\"" >> $out/bin/closure-compiler
chmod +x $out/bin/closure-compiler
'';

View file

@ -15,9 +15,9 @@ stdenv.mkDerivation {
phases = "installPhase";
installPhase = ''
mkdir -p $out/lib/java
ln -s $jar $out/lib/java/clooj.jar
makeWrapper ${jre}/bin/java $out/bin/clooj --add-flags "-jar $out/lib/java/clooj.jar"
mkdir -p $out/share/java
ln -s $jar $out/share/java/clooj.jar
makeWrapper ${jre}/bin/java $out/bin/clooj --add-flags "-jar $out/share/java/clooj.jar"
'';
meta = {

View file

@ -15,9 +15,9 @@ stdenv.mkDerivation {
buildPhase = "ant jar";
installPhase = ''
mkdir -p $out/lib/java $out/bin/java
install -t $out/lib/java clojure.jar
makeWrapper ${jdk.jre}/bin/java $out/bin/clojure --add-flags "-cp $out/lib/java/clojure.jar clojure.main"
mkdir -p $out/share/java $out/bin/java
install -t $out/share/java clojure.jar
makeWrapper ${jdk.jre}/bin/java $out/bin/clojure --add-flags "-cp $out/share/java/clojure.jar clojure.main"
'';
meta = {

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildPhase = "mkdir lib; ant";
installPhase = ''
mkdir -p $out/lib/java
cp -v *.jar $out/lib/java
mkdir -p $out/share/java
cp -v *.jar $out/share/java
'';
}

View file

@ -9,48 +9,49 @@ let
sha256 = "1pb08d9j81d0wz5wj31idz198iwhqb7mch872n08jh1354rjlqwk";
};
in
stdenv.mkDerivation {
name = "rhino-${version}";
src = fetchurl {
url = "ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip";
sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7";
};
stdenv.mkDerivation {
name = "rhino-${version}";
patches = [ ./gcj-type-mismatch.patch ];
src = fetchurl {
url = "ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip";
sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7";
};
preConfigure =
'' find -name \*.jar -or -name \*.class -exec rm -v {} \;
patches = [ ./gcj-type-mismatch.patch ];
# The build process tries to download it by itself.
mkdir -p "build/tmp-xbean"
ln -sv "${xbeans}" "build/tmp-xbean/xbean.zip"
preConfigure =
''
find -name \*.jar -or -name \*.class -exec rm -v {} \;
# The build process tries to download it by itself.
mkdir -p "build/tmp-xbean"
ln -sv "${xbeans}" "build/tmp-xbean/xbean.zip"
'';
buildInputs = [ unzip ant javac jvm ];
buildPhase = "ant ${options} jar";
doCheck = false;
# FIXME: Install javadoc as well.
installPhase =
''
mkdir -p "$out/share/java"
cp -v *.jar "$out/share/java"
'';
meta = {
description = "Mozilla Rhino: JavaScript for Java";
longDescription =
'' Rhino is an open-source implementation of JavaScript written
entirely in Java. It is typically embedded into Java applications
to provide scripting to end users.
'';
buildInputs = [ unzip ant javac jvm ];
homepage = http://www.mozilla.org/rhino/;
buildPhase = "ant ${options} jar";
doCheck = false;
# FIXME: Install javadoc as well.
installPhase =
'' mkdir -p "$out/lib/java"
cp -v *.jar "$out/lib/java"
'';
meta = {
description = "Mozilla Rhino: JavaScript for Java";
longDescription =
'' Rhino is an open-source implementation of JavaScript written
entirely in Java. It is typically embedded into Java applications
to provide scripting to end users.
'';
homepage = http://www.mozilla.org/rhino/;
licenses = [ "MPLv1.1" /* or */ "GPLv2+" ];
maintainers = [ ];
};
}
licenses = [ "MPLv1.1" /* or */ "GPLv2+" ];
};
}

View file

@ -1,16 +1,14 @@
#!/bin/bash
set -e
source $stdenv/setup
mkdir -pv $out/bin $out/lib
mkdir -pv $out/bin $out/share/java
out_bin=$out/bin/lein
cp -v $src $out_bin
cp -v $jarsrc $out/lib
cp -v $clojure/lib/java/* $out/lib
cp -v $jarsrc $out/share/java
cp -v $clojure/share/java/* $out/share/java/
for p in $patches;
do

View file

@ -1,4 +1,4 @@
46c47
< LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar
---
> LEIN_JAR=$(find $(dirname $0)/../lib -name *-standalone.jar | head -n 1)
> LEIN_JAR=$(find $(dirname $0)/../share/java -name *-standalone.jar | head -n 1)

View file

@ -4,12 +4,12 @@ unzip $src
jar=$(ls */*.jar)
mkdir -p $out/lib/java
mv $jar $out/lib/java
mkdir -p $out/share/java
mv $jar $out/share/java
mkdir -p $out/bin
cat > $out/bin/jdiskreport <<EOF
#! $SHELL -e
exec $jre/bin/java -jar $out/lib/java/$(basename $jar)
exec $jre/bin/java -jar $out/share/java/$(basename $jar)
EOF
chmod +x $out/bin/jdiskreport

View file

@ -14,16 +14,16 @@ stdenv.mkDerivation rec {
mkdir -p "$out/share/smc"
mkdir -p "$out/share/smc/lib"
mkdir -p "$out/share/icons"
mkdir -p "$out/lib/java"
mkdir -p "$out/share/java"
cp bin/Smc.jar "$out/lib/java/"
cp bin/Smc.jar "$out/share/java/"
cp -r examples/ docs/ tools/ README.txt LICENSE.txt "$out/share/smc/"
cp -r lib/* "$out/share/smc/lib/"
cp misc/smc.ico "$out/share/icons/"
cat > "$out/bin/smc" << EOF
#!${stdenv.shell}
${jre}/bin/java -jar "$out/lib/java/Smc.jar" "\$@"
${jre}/bin/java -jar "$out/share/java/Smc.jar" "\$@"
EOF
chmod a+x "$out/bin/smc"
'';