I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 3a2286f8 authored by kytv's avatar kytv
Browse files

Debian: EXTRA is now assigned dymanically

Before there was a patch to add the -deb1 to the RouterVersion.java file, but
it needed me to update the deb#. With my newly budding regex skills, I'm now manipulating
it using sed and determining the number according to the debian version number.
parent ab0e8d94
No related branches found
No related tags found
No related merge requests found
Add debian package vesion to the EXTRA version field
--- a/router/java/src/net/i2p/router/RouterVersion.java
+++ b/router/java/src/net/i2p/router/RouterVersion.java
@@ -21,7 +21,7 @@
public final static long BUILD = 0;
/** for example "-test" */
- public final static String EXTRA = "";
+ public final static String EXTRA = "deb1";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);
0001-path-substitution.patch
0002-jbigi-soname.patch
0003-renaming-jcpuid.patch
debian-version.patch
......@@ -26,7 +26,12 @@ build:
JAVA_HOME=/usr/lib/jvm/default-java
I2P=$(CURDIR)/pkg-temp
ROUTERVERSION=$(CURDIR)/router/java/src/net/i2p/router/RouterVersion.java
# I2P's version will be displayed in the router console as "$I2PVERSION-$EXTRAPREFIX$DEBIANVERSION", eg. 0.8.12-0-deb1
export EXTRAPREFIX := deb
export JAVA_HOME I2P
export DEBIANVERSION := $(shell dpkg-parsechangelog |awk -F' ' '/Version/{print $$2}' |sed 's/.*-\([[:digit:]]\{1,\}\).*$$/\1/')
#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
%:
......@@ -35,6 +40,7 @@ export JAVA_HOME I2P
clean: createcopyright
override_dh_auto_clean:
-[ -r $(CURDIR)/debian/routerversion.java.bak ] && mv -f $(CURDIR)/debian/routerversion.java.bak $(ROUTERVERSION)
dh_auto_clean
ant distclean
# The next line is used by KYTV when building from source packages
......@@ -48,6 +54,9 @@ override_dh_auto_build:
binary-indep: build-indep
build-indep:
dh_prep
cp -f $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak
sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
# The next line is used by KYTV when building from source packages
#[ -r jetty/jetty-5.1.15.tgz ] && ln -sf $(CURDIR)/jetty/jetty-5.1.15.tgz $(CURDIR)/apps/jetty/jetty-5.1.15.tgz
ant preppkg-unix javadoc
......@@ -76,7 +85,6 @@ createcopyright:
@/bin/echo -e "at http://www.i2p2.de/newdevelopers#getting-the-i2p-code\n\n\n" >> $(CURDIR)/debian/copyright
@/bin/cat $(CURDIR)/LICENSE.txt >> $(CURDIR)/debian/copyright
override_dh_compress:
dh_compress -X.xsl -X.xml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment