Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

* fix debian package * add Class containing buildvariables

f1ori0f3246e90a80
diff --git a/build.xml b/build.xml
index 8fcd0ea07..236902f87 100644
--- a/build.xml
+++ b/build.xml
@@ -55,7 +55,9 @@
<property name="release_windows" location="${release}/WINDOWS"/>
<property name="svnEntriesFile" location=".svn/entries"/>
<property name="defaults" location="defaults"/>
+ <!-- variables for installonlinux target-->
<property name="DESTDIR" value="DESTDIR"/>
+ <property name="pkgmanager" value="false"/>
<!-- determining if the .svn directory exists -->
<condition property="svnEntriesFileExists">
@@ -144,10 +146,13 @@
<!-- YaCy root directory -->
<filter token="REPL_YACY_ROOT_DIR" value="${yacyroot}"/>
+ <filter token="REPL_PKGMANAGER" value="${pkgmanager}"/>
<!-- deleting old file -->
<delete file="${build}/yacy.java" failonerror="false"/>
<copy file="${src}/yacy.java" tofile="${build}/yacy.java" overwrite="true" filtering="true" />
+ <delete file="${build}/de/anomic/yacy/yacyBuildProperties.java" failonerror="false"/>
+ <copy file="${src}/de/anomic/yacy/yacyBuildProperties.java" tofile="${build}/de/anomic/yacy/yacyBuildProperties.java" overwrite="true" filtering="true" />
</target>
@@ -193,14 +198,16 @@
</path>
<!-- compiling yacy.java -->
- <!--<javac srcdir="${build}" destdir="${build}" sourcepath="${src}"
- includes="yacy.java"
- classpathref="project.class.path"
- debug="true" debuglevel="lines,vars,source"
- source="${javacSource}" target="${javacTarget}" />-->
+ <javac srcdir="${build}" destdir="${build}" sourcepath="${src}"
+ includes="yacy.java,de/anomic/yacy/yacyBuildProperties.java"
+ source="${javacSource}" target="${javacTarget}">
+ <classpath refid="project.class.path" />
+ </javac>
+ <delete file="${build}/BuildProperties.java" />
<!-- compiling the main sources -->
<javac srcdir="${src}/" destdir="${build}"
+ excludes="de/anomic/yacy/yacyBuildProperties.java"
debug="true" debuglevel="lines,vars,source"
source="${javacSource}" target="${javacTarget}">
<classpath refid="project.class.path" />
diff --git a/debian/control b/debian/control
index 3258db581..d78a9aea2 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: yacy
Section: network
Priority: extra
Maintainer: root <root@debian>
-Build-Depends: ant, sun-java5-jdk, debhelper (>= 5), m4
+Build-Depends: ant, sun-java5-jdk | openjdk-6-jdk, debhelper (>= 5), m4
Standards-Version: 3.7.2
Package: yacy
diff --git a/debian/rules b/debian/rules
index ac23ab944..cb2cfa196 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,7 +32,6 @@ install:
ant installonlinux -DDESTDIR=$(CURDIR)/debian/yacy
mkdir -p $(CURDIR)/debian/yacy/usr/share/java/yacy/
cp lib/*.jar $(CURDIR)/debian/yacy/usr/share/java/yacy/
- cp libx/*.jar $(CURDIR)/debian/yacy/usr/share/java/yacy/
#cp -r classes $(CURDIR)/debian/yacy/usr/share/java/yacy/
diff --git a/source/de/anomic/yacy/yacyBuildProperties.java b/source/de/anomic/yacy/yacyBuildProperties.java
new file mode 100644
index 000000000..4bd0339e4
--- /dev/null
+++ b/source/de/anomic/yacy/yacyBuildProperties.java
@@ -0,0 +1,24 @@
+package de.anomic.yacy;
+/**
+ * Properties set when compiling this release/version
+ */
+public class yacyBuildProperties {
+ private yacyBuildProperties() {
+ }
+
+ public static String getSVNVersion() {
+ return "@REPL_REVISION_NR@";
+ }
+
+ public static String getVersion() {
+ return "@VERSION@";
+ }
+
+ /**
+ * determines, if this release was compiled and installed
+ * by a package manager
+ */
+ public static boolean isPkgManager() {
+ return "@REPL_PKGMANAGER@".equals("true");
+ }
+}