From f3c679e6152d27a8a0c5f4b45556becdda5e865d Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Thu, 31 Mar 2016 21:14:46 +0000
Subject: [PATCH] Debian: Update debian-alt files based on 0.9.25 released
 packages. Delete files in debian-alt if the current package version is now
 the same as what's in debian/ debian-alt/precise/ contains fixes for precise
 builds.

---
 debian-alt/jessie/changelog   |  10 +--
 debian-alt/jessie/control     | 102 ---------------------------
 debian-alt/jessie/rules       | 127 ----------------------------------
 debian-alt/precise/changelog  |  10 ++-
 debian-alt/precise/control    |  16 +++--
 debian-alt/precise/rules      |  11 ++-
 debian-alt/unstable/changelog |   6 ++
 debian-alt/unstable/control   | 101 ---------------------------
 8 files changed, 33 insertions(+), 350 deletions(-)
 delete mode 100644 debian-alt/jessie/control
 delete mode 100755 debian-alt/jessie/rules
 delete mode 100644 debian-alt/unstable/control

diff --git a/debian-alt/jessie/changelog b/debian-alt/jessie/changelog
index ffc8f4354d..c515372c84 100644
--- a/debian-alt/jessie/changelog
+++ b/debian-alt/jessie/changelog
@@ -1,8 +1,8 @@
-i2p (0.9.24-1~deb8u+1) stable; urgency=medium
+i2p (0.9.25-1~deb8u+1) stable; urgency=medium
 
   * Backport to Jessie
 
- -- Kill Your TV <killyourtv@i2pmail.org>  Sat, 30 Jan 2016 13:36:20 +0000
+ -- zzz on i2p <zzz@i2pmail.org>  Tue, 29 Mar 2016 18:12:12 +0000
 
 i2p (0.9.24-1) unstable; urgency=medium
 
@@ -52,12 +52,6 @@ i2p (0.9.23-1) unstable; urgency=medium
 
  -- Kill Your TV <killyourtv@i2pmail.org>  Thu, 19 Nov 2015 12:41:36 +0000
 
-i2p (0.9.22-1~deb8u+1) stable; urgency=medium
-
-  * Backport to Jessie
-
- -- Kill Your TV <killyourtv@i2pmail.org>  Sun, 13 Sep 2015 11:58:19 +0000
-
 i2p (0.9.22-1) unstable; urgency=medium
 
   * New Upstream Version
diff --git a/debian-alt/jessie/control b/debian-alt/jessie/control
deleted file mode 100644
index 821592b2fc..0000000000
--- a/debian-alt/jessie/control
+++ /dev/null
@@ -1,102 +0,0 @@
-Source: i2p
-Maintainer: Kill Your TV <killyourtv@i2pmail.org>
-Section: net
-Standards-Version: 3.9.6
-Priority: optional
-Bugs: mailto:killyourtv@i2pmail.org
-Homepage: https://geti2p.net
-Build-Depends: debhelper (>= 7.0.50~)
- ,ant (>= 1.8)
- ,ant-optional
- ,debconf
- ,default-jdk | openjdk-7-jdk | openjdk-6-jdk
- ,gettext
- ,dh-apparmor
- ,hardening-wrapper
- ,libgmp3-dev
- ,libservice-wrapper-java
- ,libcommons-logging-java
- ,po-debconf
- ,dh-systemd
-
-Package: i2p
-Architecture: all
-Section: net
-Priority: optional
-Depends: ${java:Depends}, ${shlibs:Depends},
- adduser,
- debconf,
- i2p-router (>= 0.8.6-5),
- libjbigi-jni,
- lsb-base,
- service-wrapper
-Description: Load-balanced unspoofable packet switching network
- I2P is an anonymizing network, offering a simple layer that identity-sensitive
- applications can use to securely communicate. All data is wrapped with several
- layers of encryption, and the network is both distributed and dynamic, with no
- trusted parties.
- .
- This package depends on the router, jbigi, the java service wrapper, and
- includes support to run I2P as a daemon.
-
-Package: libjbigi-jni
-Architecture: any
-Section: java
-Priority: optional
-Depends: ${shlibs:Depends}, i2p-router
-Homepage: http://www.i2p2.de/jbigi
-Description: Java Big Integer library
- This Package contains the libjbigi JNI library (and on x86 platforms, jcpuid).
- .
- libjbigi is a math library that is part of the I2P installation.  Use of this
- library greatly enhances the efficiency of cryptographic algorithms, such as
- the ones used by I2P. You can expect to see a 5-7x speed improvement on certain
- tasks, such as elGamal encryption/decryption.
-
-Package: i2p-doc
-Architecture: all
-Section: doc
-Depends: ${misc:Depends}
-Suggests: i2p, default-jdk-doc
-Description: Documentation for I2P
- I2P is an anonymizing network, offering a simple layer that identity-sensitive
- applications can use to securely communicate. All data is wrapped with several
- layers of encryption, and the network is both distributed and dynamic, with no
- trusted parties.
- .
- This package contains the Javadoc files.
-
-Package: i2p-router
-Architecture: all
-Section: net
-Priority: optional
-Depends: ${misc:Depends}, ${java:Depends}, ${shlibs:Depends},
- openjdk-8-jre-headless | openjdk-7-jre-headless | openjdk-6-jre-headless | default-jre-headless | java8-runtime-headless | java7-runtime-headless | java6-runtime-headless, libecj-java
-Replaces: i2p ( << 0.8.6-5)
-Breaks: i2p (<< 0.8.6-5)
-Recommends: libjbigi-jni, ttf-dejavu
-Suggests: tor
- ,apparmor
- ,i2p-messenger
- ,i2phex
- ,i2p-tahoe-lafs
- ,imule
- ,irc-client
- ,itoopie
- ,mail-client
- ,mail-reader
- ,news-reader
- ,polipo
- ,privoxy
- ,robert
- ,syndie
- ,www-browser
- ,xul-ext-torbutton
-Description: Load-balanced unspoofable packet switching network
- I2P is an anonymizing network, offering a simple layer that identity-sensitive
- applications can use to securely communicate. All data is wrapped with several
- layers of encryption, and the network is both distributed and dynamic, with no
- trusted parties.
- .
- TrueType fonts (such as those provided in the package ttf-dejavu) are required
- in order to generate graphs.
diff --git a/debian-alt/jessie/rules b/debian-alt/jessie/rules
deleted file mode 100755
index 286a1f6be9..0000000000
--- a/debian-alt/jessie/rules
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/make -f
-
-# Quoting Policy version 3.9.2.0, 2011-04-07 section 4.9:
-
-# /start quote
-# For some packages, notably ones where the same source tree is compiled in
-# different ways to produce two binary packages, the build target does not make
-# much sense. For these packages it is good enough to provide two (or more)
-# targets (build-a and build-b or whatever) for each of the ways of building the
-# package, and a build target that does nothing. The binary target will have to
-# build the package in each of the possible ways and make the binary package out
-# of each.
-# ...
-# When a package has a configuration and build routine which takes a long time,
-# or when the makefiles are poorly designed, or when build needs to run clean
-# first, it is a good idea to touch build when the build process is complete.
-# This will ensure that if debian/rules build is run again it will not rebuild
-# the whole program.
-# /end quote
-
-# Since that fits building I2P very well, we override the build target.
-#
-
-build:
-	@echo 'The build target is disabled. Use the appropriate binary target.'
-
-JAVA_HOME=/usr/lib/jvm/default-java
-I2P=$(CURDIR)/pkg-temp
-ROUTERVERSION=$(CURDIR)/router/java/src/net/i2p/router/RouterVersion.java
-export DEB_BUILD_HARDENING=1
-
-# 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/.*-\([.0-9A-Za-z~+]\{1,\}\)$$/\1/')
-#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-
-%:
-	dh $@ --with systemd
-
-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
-	find $(CURDIR)/core \( -name '*\.so' -o -name '*\.o' \) -exec rm -f {} \;
-	rm -rf $(CURDIR)/core/c/jcpuid/lib/
-	rm -f $(CURDIR)/installer/lib/wrapper/all/wrapper.jar
-	rm -f $(CURDIR)/installer/lib/launch4j/lib/commons-logging.jar
-	rm -rf $(CURDIR)/debian/python-i2p
-	debconf-updatepo
-
-override_dh_auto_build:
-
-override_dh_systemd_enable:
-	# We purposely do not set I2P to start at boot.
-	# This matches the behavior of the initscript
-	# and the setting RUN_DAEMON=false in /etc/default/i2p
-
-binary-indep: build-indep
-build-indep:
-	dh_prep
-	mkdir -p $(CURDIR)/installer/lib/wrapper/all
-	mkdir -p $(CURDIR)/installer/lib/launch4j/lib/
-	ln -sf /usr/share/java/commons-logging.jar $(CURDIR)/installer/lib/launch4j/lib/commons-logging.jar
-	ln -sf /usr/share/java/wrapper.jar $(CURDIR)/installer/lib/wrapper/all/wrapper.jar
-	if [ ! -e $(CURDIR)/debian/routerversion.java.bak ]; then \
-		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
-	fi
-ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
-	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
-else
-	@echo "Already found deb in version, not doing anything"
-endif
-	TZ=UTC JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 ant preppkg-unix javadoc
-	echo router.updateDisabled=true > $(I2P)/router.config
-	mv $(I2P)/runplain.sh $(I2P)/i2prouter-nowrapper
-
-binary-arch: build-arch
-build-arch:
-	# build jbigi
-	cd $(CURDIR)/core/c/jbigi && ./build_jbigi.sh dynamic
-	# build jcpuid
-	cd $(CURDIR)/core/c/jcpuid && ./build.sh
-
-binary: binary-arch binary-indep
-
-createcopyright:
-	@echo " *** Creating debian/copyright*** "
-	@rm -f $(CURDIR)/debian/copyright
-	@/bin/echo -e "This package was Debianized by kytv <killyourtv@i2pmail.org>" >> $(CURDIR)/debian/copyright
-	@/bin/echo -e "Sun, 23 Jan 2011 20:26:51 +0000" >> $(CURDIR)/debian/copyright
-	@/bin/echo -e "\nIt was downloaded from https://geti2p.net" >> $(CURDIR)/debian/copyright
-	@/bin/echo -e "\nI2P is tracked upstream using the Monotone VCS" >> $(CURDIR)/debian/copyright
-	@/bin/echo -e "Complete information on fetching the source with monotone can be found" >> $(CURDIR)/debian/copyright
-	@/bin/echo -e "at https://geti2p.net/newdevelopers#getting-the-i2p-code\n\n\n" >> $(CURDIR)/debian/copyright
-	@/bin/cat $(CURDIR)/LICENSE.txt >> $(CURDIR)/debian/copyright
-	@/bin/echo -e "\n\n The debian packaging has been released into the public domain." >> $(CURDIR)/debian/copyright
-
-override_dh_compress:
-	dh_compress -X.xsl -X.xml
-
-override_dh_install:
-	dh_install --list-missing
-	dh_apparmor --profile-name=system_i2p -pi2p
-	dh_apparmor --profile-name=usr.bin.i2prouter -pi2p
-
-override_dh_installchangelogs:
-	dh_installchangelogs history.txt
-
-override_dh_installdocs:
-	dh_installdocs -pi2p -plibjbigi-jni --link-doc=i2p-router
-	dh_installdocs --remaining-packages
-
-override_dh_dhlibdeps:
-	dh_shlibdeps -llibjbigi-jni debian/libjbigi-jni/usr/lib/jni/*.so
-
-#override_dh_installinit:
-#	dh_installinit -r
-
-override_dh_builddeb:
-	dh_builddeb -- -Zxz
-
-get-orig-source:
-	uscan --verbose --rename --destdir $(CURDIR)/.. --watchfile debian/watch --force-download
diff --git a/debian-alt/precise/changelog b/debian-alt/precise/changelog
index 3d397c9bbf..61ca84a734 100644
--- a/debian-alt/precise/changelog
+++ b/debian-alt/precise/changelog
@@ -1,8 +1,14 @@
-i2p (0.9.23-2~precise+1) precise; urgency=medium
+i2p (0.9.25-1~precise+1) precise; urgency=medium
 
   * Backport to Precise
 
- -- Kill Your TV <killyourtv@i2pmail.org>  Sun, 06 Dec 2015 17:26:47 +0000
+ -- zzz on i2p <zzz@i2pmail.org>  Thu, 31 Mar 2016 18:12:12 +0000
+
+i2p (0.9.24-1) unstable; urgency=medium
+
+  * New upstream version 0.9.24
+
+ -- Kill Your TV <killyourtv@i2pmail.org>  Sat, 30 Jan 2016 12:08:27 +0000
 
 i2p (0.9.23-2) unstable; urgency=medium
 
diff --git a/debian-alt/precise/control b/debian-alt/precise/control
index c6ab2463aa..c3f2e70090 100644
--- a/debian-alt/precise/control
+++ b/debian-alt/precise/control
@@ -1,22 +1,24 @@
 Source: i2p
-Maintainer: Kill Your TV <killyourtv@i2pmail.org>
+Maintainer: zzz <zzz@i2pmail.org>
 Section: net
 Standards-Version: 3.9.6
 Priority: optional
-Bugs: mailto:killyourtv@i2pmail.org
+Bugs: mailto:zzz@i2pmail.org
 Homepage: https://geti2p.net
 Build-Depends: debhelper (>= 7.0.50~)
  ,ant (>= 1.8)
  ,ant-optional
  ,debconf
- ,default-jdk | openjdk-7-jdk | openjdk-6-jdk
- ,gettext
+ ,openjdk-7-jdk
+# Ant requires java 6 tools.jar:
+# Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar
+ ,openjdk-6-jdk
  ,dh-apparmor
+ ,gettext
  ,libgmp3-dev
  ,libservice-wrapper-java
- ,libcommons-logging-java
+ ,hardening-wrapper
  ,po-debconf
-# ,dh-systemd
 
 Package: i2p
 Architecture: all
@@ -70,7 +72,7 @@ Architecture: all
 Section: net
 Priority: optional
 Depends: ${misc:Depends}, ${java:Depends}, ${shlibs:Depends},
- openjdk-8-jre-headless | openjdk-7-jre-headless | openjdk-6-jre-headless | default-jre-headless | java8-runtime-headless | java7-runtime-headless | java6-runtime-headless, libecj-java
+ openjdk-8-jre-headless | openjdk-7-jre-headless | java8-runtime-headless | java7-runtime-headless, libecj-java
 Replaces: i2p ( << 0.8.6-5)
 Breaks: i2p (<< 0.8.6-5)
 Recommends: libjbigi-jni, ttf-dejavu
diff --git a/debian-alt/precise/rules b/debian-alt/precise/rules
index 2faf425a37..a527fc1bf6 100755
--- a/debian-alt/precise/rules
+++ b/debian-alt/precise/rules
@@ -24,7 +24,8 @@
 build:
 	@echo 'The build target is disabled. Use the appropriate binary target.'
 
-JAVA_HOME=/usr/lib/jvm/default-java
+export X_DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+JAVA_HOME=/usr/lib/jvm/java-7-openjdk-$(X_DEB_HOST_ARCH)
 I2P=$(CURDIR)/pkg-temp
 ROUTERVERSION=$(CURDIR)/router/java/src/net/i2p/router/RouterVersion.java
 export DEB_BUILD_HARDENING=1
@@ -33,7 +34,6 @@ export DEB_BUILD_HARDENING=1
 #export EXTRAPREFIX := deb
 export JAVA_HOME I2P
 export DEBIANVERSION := $(shell dpkg-parsechangelog |awk -F' ' '/^Version:/{print $$2}' |sed 's/.*-\([.0-9A-Za-z~+]\{1,\}\)$$/\1/')
-#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 
 %:
 	dh $@
@@ -47,8 +47,8 @@ override_dh_auto_clean:
 	find $(CURDIR)/core \( -name '*\.so' -o -name '*\.o' \) -exec rm -f {} \;
 	rm -rf $(CURDIR)/core/c/jcpuid/lib/
 	rm -f $(CURDIR)/installer/lib/wrapper/all/wrapper.jar
-	rm -f $(CURDIR)/installer/lib/launch4j/lib/commons-logging.jar
 	rm -rf $(CURDIR)/debian/python-i2p
+	rm -f $(CURDIR)/override.properties
 	debconf-updatepo
 
 override_dh_auto_build:
@@ -74,6 +74,11 @@ ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
 else
 	@echo "Already found deb in version, not doing anything"
 endif
+	# build options
+	@/bin/echo -e "javac.version=1.7" > $(CURDIR)/override.properties
+	@/bin/echo -e "javac.compilerargs=-bootclasspath $(JAVA_HOME)/jre/lib/rt.jar:$(JAVA_HOME)/jre/lib/jce.jar" >> $(CURDIR)/override.properties
+	@/bin/echo -e "javac.compilerargs7=-bootclasspath $(JAVA_HOME)/jre/lib/rt.jar:$(JAVA_HOME)/jre/lib/jce.jar" >> $(CURDIR)/override.properties
+	@/bin/echo -e "build.built-by=debian" >> $(CURDIR)/override.properties
 	TZ=UTC JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 ant preppkg-unix javadoc
 	echo router.updateDisabled=true > $(I2P)/router.config
 	mv $(I2P)/runplain.sh $(I2P)/i2prouter-nowrapper
diff --git a/debian-alt/unstable/changelog b/debian-alt/unstable/changelog
index 3036a16571..c5921551b0 100644
--- a/debian-alt/unstable/changelog
+++ b/debian-alt/unstable/changelog
@@ -1,3 +1,9 @@
+i2p (0.9.25-1) unstable; urgency=medium
+
+  * New upstream version 0.9.25
+
+ -- zzz on i2p <zzz@i2pmail.org>  Tue, 29 Mar 2016 18:12:12 +0000
+
 i2p (0.9.24-1) unstable; urgency=medium
 
   * New upstream version 0.9.24
diff --git a/debian-alt/unstable/control b/debian-alt/unstable/control
deleted file mode 100644
index 47363907dd..0000000000
--- a/debian-alt/unstable/control
+++ /dev/null
@@ -1,101 +0,0 @@
-Source: i2p
-Maintainer: Kill Your TV <killyourtv@i2pmail.org>
-Section: net
-Standards-Version: 3.9.6
-Priority: optional
-Bugs: mailto:killyourtv@i2pmail.org
-Homepage: https://geti2p.net
-Build-Depends: debhelper (>= 7.0.50~)
- ,ant (>= 1.8)
- ,ant-optional
- ,debconf
- ,default-jdk | openjdk-7-jdk | openjdk-6-jdk
- ,gettext
- ,dh-apparmor
- ,libgmp3-dev
- ,libservice-wrapper-java
- ,libcommons-logging-java
- ,po-debconf
- ,dh-systemd
-
-Package: i2p
-Architecture: all
-Section: net
-Priority: optional
-Depends: ${java:Depends}, ${shlibs:Depends},
- adduser,
- debconf,
- i2p-router (>= 0.8.6-5),
- libjbigi-jni,
- lsb-base,
- service-wrapper
-Description: Load-balanced unspoofable packet switching network
- I2P is an anonymizing network, offering a simple layer that identity-sensitive
- applications can use to securely communicate. All data is wrapped with several
- layers of encryption, and the network is both distributed and dynamic, with no
- trusted parties.
- .
- This package depends on the router, jbigi, the java service wrapper, and
- includes support to run I2P as a daemon.
-
-Package: libjbigi-jni
-Architecture: any
-Section: java
-Priority: optional
-Depends: ${shlibs:Depends}, i2p-router
-Homepage: http://www.i2p2.de/jbigi
-Description: Java Big Integer library
- This Package contains the libjbigi JNI library (and on x86 platforms, jcpuid).
- .
- libjbigi is a math library that is part of the I2P installation.  Use of this
- library greatly enhances the efficiency of cryptographic algorithms, such as
- the ones used by I2P. You can expect to see a 5-7x speed improvement on certain
- tasks, such as elGamal encryption/decryption.
-
-Package: i2p-doc
-Architecture: all
-Section: doc
-Depends: ${misc:Depends}
-Suggests: i2p, default-jdk-doc
-Description: Documentation for I2P
- I2P is an anonymizing network, offering a simple layer that identity-sensitive
- applications can use to securely communicate. All data is wrapped with several
- layers of encryption, and the network is both distributed and dynamic, with no
- trusted parties.
- .
- This package contains the Javadoc files.
-
-Package: i2p-router
-Architecture: all
-Section: net
-Priority: optional
-Depends: ${misc:Depends}, ${java:Depends}, ${shlibs:Depends},
- openjdk-8-jre-headless | openjdk-7-jre-headless | openjdk-6-jre-headless | default-jre-headless | java8-runtime-headless | java7-runtime-headless | java6-runtime-headless, libecj-java
-Replaces: i2p ( << 0.8.6-5)
-Breaks: i2p (<< 0.8.6-5)
-Recommends: libjbigi-jni, ttf-dejavu
-Suggests: tor
- ,apparmor
- ,i2p-messenger
- ,i2phex
- ,i2p-tahoe-lafs
- ,imule
- ,irc-client
- ,itoopie
- ,mail-client
- ,mail-reader
- ,news-reader
- ,polipo
- ,privoxy
- ,robert
- ,syndie
- ,www-browser
- ,xul-ext-torbutton
-Description: Load-balanced unspoofable packet switching network
- I2P is an anonymizing network, offering a simple layer that identity-sensitive
- applications can use to securely communicate. All data is wrapped with several
- layers of encryption, and the network is both distributed and dynamic, with no
- trusted parties.
- .
- TrueType fonts (such as those provided in the package ttf-dejavu) are required
- in order to generate graphs.
-- 
GitLab