Skip to content

Commit

Permalink
* fix debian package
Browse files Browse the repository at this point in the history
* add Class containing buildvariables


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6171 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
f1ori committed Jul 3, 2009
1 parent 8544cfd commit 0f3246e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
17 changes: 12 additions & 5 deletions build.xml
Expand Up @@ -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">
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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" />
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion debian/rules
Expand Up @@ -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/


Expand Down
24 changes: 24 additions & 0 deletions 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");
}
}

0 comments on commit 0f3246e

Please sign in to comment.