[azureus] 03/08: Updated azureus packing for new upstream version.
Stephen Nelson
stephenonelson-guest at moszumanska.debian.org
Sun Aug 2 20:32:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
stephenonelson-guest pushed a commit to branch vuze5.6
in repository azureus.
commit 580d7d010559f1964a1ca654a5ab1d7004b533e1
Author: Stephen Nelson <stephen at eccostudio.com>
Date: Wed Jun 18 15:16:55 2014 +0100
Updated azureus packing for new upstream version.
- New upstream release 5.3.0.0.
- Remove deprecated source version and set source and target to Java 1.6.
- Check out and build source from upstream VCS to utilise upstream build file.
- Use dh with javahelper to build package.
- Removed binaries from upstream tarball.
- Unbundle modified json simple embedded in upstream.
- Unbundle modified commons lang embedded in upstream and replaced with commons lang 3.
- Unbundle modified Bouncycastle JCE embedded in upstream.
- Refreshed patches.
---
azureus2/src/org/apache/commons/lang/Entities.java | 681 ---------------------
.../src/org/apache/commons/lang/IntHashMap.java | 362 -----------
debian/NEWS.Debian | 16 -
debian/azureus.desktop | 9 -
debian/azureus.install | 1 +
debian/azureus.manifest | 4 +
debian/{wrappers => bin}/azureus | 7 +-
debian/build.properties | 11 -
debian/build.xml | 105 ----
debian/changelog | 20 +
debian/compat | 2 +-
debian/control | 51 +-
debian/copyright | 13 +-
debian/{ => man}/azureus.1 | 4 +-
debian/manpages | 1 -
debian/menu | 4 -
debian/orig-tar.sh | 16 +
debian/patches/01_amend_build_classpath.patch | 46 ++
.../{debian/speedtest.diff => 02_speedtest.patch} | 18 +-
debian/patches/03_update_disable.patch | 73 +++
debian/patches/04_unbundle_json.patch | 66 ++
debian/patches/05_unbundle_commons_lang.patch | 136 ++++
debian/patches/06_unbundle_bouncy_castle.patch | 237 +++++++
debian/patches/07_platform.patch | 86 +++
debian/patches/08_multi_user.patch | 183 ++++++
...o-auto-update.patch => 09_no_auto_update.patch} | 44 +-
debian/patches/debian/update-disable.diff | 116 ----
debian/patches/fixes/multiuser.diff | 521 ----------------
debian/patches/fixes/platform.diff | 142 -----
debian/patches/series | 14 +-
debian/rules | 26 +-
debian/vuze.desktop | 4 +-
debian/{install => vuze.install} | 5 +-
debian/vuze.manpages | 1 +
debian/vuze.menu | 6 +
debian/watch | 3 +-
36 files changed, 971 insertions(+), 2063 deletions(-)
diff --git a/azureus2/src/org/apache/commons/lang/Entities.java b/azureus2/src/org/apache/commons/lang/Entities.java
deleted file mode 100644
index 735ab01..0000000
--- a/azureus2/src/org/apache/commons/lang/Entities.java
+++ /dev/null
@@ -1,681 +0,0 @@
-/*
- * Copyright 2002-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.lang;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * <p>Provides HTML and XML entity utilities.</p>
- *
- * @see <a href="http://hotwired.lycos.com/webmonkey/reference/special_characters/">ISO Entities</a>
- * @see </br><a href="http://www.w3.org/TR/REC-html32#latin1">HTML 3.2 Character Entities for ISO Latin-1</a>
- * @see </br><a href="http://www.w3.org/TR/REC-html40/sgml/entities.html">HTML 4.0 Character entity references</a>
- * @see </br><a href="http://www.w3.org/TR/html401/charset.html#h-5.3">HTML 4.01 Character References</a>
- * @see </br><a href="http://www.w3.org/TR/html401/charset.html#code-position">HTML 4.01 Code positions</a>
- *
- * @author <a href="mailto:alex at purpletech.com">Alexander Day Chaffee</a>
- * @author <a href="mailto:ggregory at seagullsw.com">Gary Gregory</a>
- * @since 2.0
- * @version $Id: Entities.java,v 1.1 2008-05-02 15:43:01 gudy Exp $
- */
-public class Entities {
-
- private static final String[][] BASIC_ARRAY = {
- {"quot", "34"}, // " - double-quote
- {"amp", "38"}, // & - ampersand
- {"lt", "60"}, // < - less-than
- {"gt", "62"}, // > - greater-than
- };
-
- private static final String[][] APOS_ARRAY = {
- {"apos", "39"}, // XML apostrophe
- };
-
- // package scoped for testing
- static final String[][] ISO8859_1_ARRAY = {
- {"nbsp", "160"}, // non-breaking space
- {"iexcl", "161"}, //inverted exclamation mark
- {"cent", "162"}, //cent sign
- {"pound", "163"}, //pound sign
- {"curren", "164"}, //currency sign
- {"yen", "165"}, //yen sign = yuan sign
- {"brvbar", "166"}, //broken bar = broken vertical bar
- {"sect", "167"}, //section sign
- {"uml", "168"}, //diaeresis = spacing diaeresis
- {"copy", "169"}, // - copyright sign
- {"ordf", "170"}, //feminine ordinal indicator
- {"laquo", "171"}, //left-pointing double angle quotation mark = left pointing guillemet
- {"not", "172"}, //not sign
- {"shy", "173"}, //soft hyphen = discretionary hyphen
- {"reg", "174"}, // - registered trademark sign
- {"macr", "175"}, //macron = spacing macron = overline = APL overbar
- {"deg", "176"}, //degree sign
- {"plusmn", "177"}, //plus-minus sign = plus-or-minus sign
- {"sup2", "178"}, //superscript two = superscript digit two = squared
- {"sup3", "179"}, //superscript three = superscript digit three = cubed
- {"acute", "180"}, //acute accent = spacing acute
- {"micro", "181"}, //micro sign
- {"para", "182"}, //pilcrow sign = paragraph sign
- {"middot", "183"}, //middle dot = Georgian comma = Greek middle dot
- {"cedil", "184"}, //cedilla = spacing cedilla
- {"sup1", "185"}, //superscript one = superscript digit one
- {"ordm", "186"}, //masculine ordinal indicator
- {"raquo", "187"}, //right-pointing double angle quotation mark = right pointing guillemet
- {"frac14", "188"}, //vulgar fraction one quarter = fraction one quarter
- {"frac12", "189"}, //vulgar fraction one half = fraction one half
- {"frac34", "190"}, //vulgar fraction three quarters = fraction three quarters
- {"iquest", "191"}, //inverted question mark = turned question mark
- {"Agrave", "192"}, // - uppercase A, grave accent
- {"Aacute", "193"}, // - uppercase A, acute accent
- {"Acirc", "194"}, // - uppercase A, circumflex accent
- {"Atilde", "195"}, // - uppercase A, tilde
- {"Auml", "196"}, // - uppercase A, umlaut
- {"Aring", "197"}, // - uppercase A, ring
- {"AElig", "198"}, // - uppercase AE
- {"Ccedil", "199"}, // - uppercase C, cedilla
- {"Egrave", "200"}, // - uppercase E, grave accent
- {"Eacute", "201"}, // - uppercase E, acute accent
- {"Ecirc", "202"}, // - uppercase E, circumflex accent
- {"Euml", "203"}, // - uppercase E, umlaut
- {"Igrave", "204"}, // - uppercase I, grave accent
- {"Iacute", "205"}, // - uppercase I, acute accent
- {"Icirc", "206"}, // - uppercase I, circumflex accent
- {"Iuml", "207"}, // - uppercase I, umlaut
- {"ETH", "208"}, // - uppercase Eth, Icelandic
- {"Ntilde", "209"}, // - uppercase N, tilde
- {"Ograve", "210"}, // - uppercase O, grave accent
- {"Oacute", "211"}, // - uppercase O, acute accent
- {"Ocirc", "212"}, // - uppercase O, circumflex accent
- {"Otilde", "213"}, // - uppercase O, tilde
- {"Ouml", "214"}, // - uppercase O, umlaut
- {"times", "215"}, //multiplication sign
- {"Oslash", "216"}, // - uppercase O, slash
- {"Ugrave", "217"}, // - uppercase U, grave accent
- {"Uacute", "218"}, // - uppercase U, acute accent
- {"Ucirc", "219"}, // - uppercase U, circumflex accent
- {"Uuml", "220"}, // - uppercase U, umlaut
- {"Yacute", "221"}, // - uppercase Y, acute accent
- {"THORN", "222"}, // - uppercase THORN, Icelandic
- {"szlig", "223"}, // - lowercase sharps, German
- {"agrave", "224"}, // - lowercase a, grave accent
- {"aacute", "225"}, // - lowercase a, acute accent
- {"acirc", "226"}, // - lowercase a, circumflex accent
- {"atilde", "227"}, // - lowercase a, tilde
- {"auml", "228"}, // - lowercase a, umlaut
- {"aring", "229"}, // - lowercase a, ring
- {"aelig", "230"}, // - lowercase ae
- {"ccedil", "231"}, // - lowercase c, cedilla
- {"egrave", "232"}, // - lowercase e, grave accent
- {"eacute", "233"}, // - lowercase e, acute accent
- {"ecirc", "234"}, // - lowercase e, circumflex accent
- {"euml", "235"}, // - lowercase e, umlaut
- {"igrave", "236"}, // - lowercase i, grave accent
- {"iacute", "237"}, // - lowercase i, acute accent
- {"icirc", "238"}, // - lowercase i, circumflex accent
- {"iuml", "239"}, // - lowercase i, umlaut
- {"eth", "240"}, // - lowercase eth, Icelandic
- {"ntilde", "241"}, // - lowercase n, tilde
- {"ograve", "242"}, // - lowercase o, grave accent
- {"oacute", "243"}, // - lowercase o, acute accent
- {"ocirc", "244"}, // - lowercase o, circumflex accent
- {"otilde", "245"}, // - lowercase o, tilde
- {"ouml", "246"}, // - lowercase o, umlaut
- {"divide", "247"}, // division sign
- {"oslash", "248"}, // - lowercase o, slash
- {"ugrave", "249"}, // - lowercase u, grave accent
- {"uacute", "250"}, // - lowercase u, acute accent
- {"ucirc", "251"}, // - lowercase u, circumflex accent
- {"uuml", "252"}, // - lowercase u, umlaut
- {"yacute", "253"}, // - lowercase y, acute accent
- {"thorn", "254"}, // - lowercase thorn, Icelandic
- {"yuml", "255"}, // - lowercase y, umlaut
- };
-
- // http://www.w3.org/TR/REC-html40/sgml/entities.html
- // package scoped for testing
- static final String[][] HTML40_ARRAY = {
-// <!-- Latin Extended-B -->
- {"fnof", "402"}, //latin small f with hook = function= florin, U+0192 ISOtech -->
-// <!-- Greek -->
- {"Alpha", "913"}, //greek capital letter alpha, U+0391 -->
- {"Beta", "914"}, //greek capital letter beta, U+0392 -->
- {"Gamma", "915"}, //greek capital letter gamma,U+0393 ISOgrk3 -->
- {"Delta", "916"}, //greek capital letter delta,U+0394 ISOgrk3 -->
- {"Epsilon", "917"}, //greek capital letter epsilon, U+0395 -->
- {"Zeta", "918"}, //greek capital letter zeta, U+0396 -->
- {"Eta", "919"}, //greek capital letter eta, U+0397 -->
- {"Theta", "920"}, //greek capital letter theta,U+0398 ISOgrk3 -->
- {"Iota", "921"}, //greek capital letter iota, U+0399 -->
- {"Kappa", "922"}, //greek capital letter kappa, U+039A -->
- {"Lambda", "923"}, //greek capital letter lambda,U+039B ISOgrk3 -->
- {"Mu", "924"}, //greek capital letter mu, U+039C -->
- {"Nu", "925"}, //greek capital letter nu, U+039D -->
- {"Xi", "926"}, //greek capital letter xi, U+039E ISOgrk3 -->
- {"Omicron", "927"}, //greek capital letter omicron, U+039F -->
- {"Pi", "928"}, //greek capital letter pi, U+03A0 ISOgrk3 -->
- {"Rho", "929"}, //greek capital letter rho, U+03A1 -->
-// <!-- there is no Sigmaf, and no U+03A2 character either -->
- {"Sigma", "931"}, //greek capital letter sigma,U+03A3 ISOgrk3 -->
- {"Tau", "932"}, //greek capital letter tau, U+03A4 -->
- {"Upsilon", "933"}, //greek capital letter upsilon,U+03A5 ISOgrk3 -->
- {"Phi", "934"}, //greek capital letter phi,U+03A6 ISOgrk3 -->
- {"Chi", "935"}, //greek capital letter chi, U+03A7 -->
- {"Psi", "936"}, //greek capital letter psi,U+03A8 ISOgrk3 -->
- {"Omega", "937"}, //greek capital letter omega,U+03A9 ISOgrk3 -->
- {"alpha", "945"}, //greek small letter alpha,U+03B1 ISOgrk3 -->
- {"beta", "946"}, //greek small letter beta, U+03B2 ISOgrk3 -->
- {"gamma", "947"}, //greek small letter gamma,U+03B3 ISOgrk3 -->
- {"delta", "948"}, //greek small letter delta,U+03B4 ISOgrk3 -->
- {"epsilon", "949"}, //greek small letter epsilon,U+03B5 ISOgrk3 -->
- {"zeta", "950"}, //greek small letter zeta, U+03B6 ISOgrk3 -->
- {"eta", "951"}, //greek small letter eta, U+03B7 ISOgrk3 -->
- {"theta", "952"}, //greek small letter theta,U+03B8 ISOgrk3 -->
- {"iota", "953"}, //greek small letter iota, U+03B9 ISOgrk3 -->
- {"kappa", "954"}, //greek small letter kappa,U+03BA ISOgrk3 -->
- {"lambda", "955"}, //greek small letter lambda,U+03BB ISOgrk3 -->
- {"mu", "956"}, //greek small letter mu, U+03BC ISOgrk3 -->
- {"nu", "957"}, //greek small letter nu, U+03BD ISOgrk3 -->
- {"xi", "958"}, //greek small letter xi, U+03BE ISOgrk3 -->
- {"omicron", "959"}, //greek small letter omicron, U+03BF NEW -->
- {"pi", "960"}, //greek small letter pi, U+03C0 ISOgrk3 -->
- {"rho", "961"}, //greek small letter rho, U+03C1 ISOgrk3 -->
- {"sigmaf", "962"}, //greek small letter final sigma,U+03C2 ISOgrk3 -->
- {"sigma", "963"}, //greek small letter sigma,U+03C3 ISOgrk3 -->
- {"tau", "964"}, //greek small letter tau, U+03C4 ISOgrk3 -->
- {"upsilon", "965"}, //greek small letter upsilon,U+03C5 ISOgrk3 -->
- {"phi", "966"}, //greek small letter phi, U+03C6 ISOgrk3 -->
- {"chi", "967"}, //greek small letter chi, U+03C7 ISOgrk3 -->
- {"psi", "968"}, //greek small letter psi, U+03C8 ISOgrk3 -->
- {"omega", "969"}, //greek small letter omega,U+03C9 ISOgrk3 -->
- {"thetasym", "977"}, //greek small letter theta symbol,U+03D1 NEW -->
- {"upsih", "978"}, //greek upsilon with hook symbol,U+03D2 NEW -->
- {"piv", "982"}, //greek pi symbol, U+03D6 ISOgrk3 -->
-// <!-- General Punctuation -->
- {"bull", "8226"}, //bullet = black small circle,U+2022 ISOpub -->
-// <!-- bullet is NOT the same as bullet operator, U+2219 -->
- {"hellip", "8230"}, //horizontal ellipsis = three dot leader,U+2026 ISOpub -->
- {"prime", "8242"}, //prime = minutes = feet, U+2032 ISOtech -->
- {"Prime", "8243"}, //double prime = seconds = inches,U+2033 ISOtech -->
- {"oline", "8254"}, //overline = spacing overscore,U+203E NEW -->
- {"frasl", "8260"}, //fraction slash, U+2044 NEW -->
-// <!-- Letterlike Symbols -->
- {"weierp", "8472"}, //script capital P = power set= Weierstrass p, U+2118 ISOamso -->
- {"image", "8465"}, //blackletter capital I = imaginary part,U+2111 ISOamso -->
- {"real", "8476"}, //blackletter capital R = real part symbol,U+211C ISOamso -->
- {"trade", "8482"}, //trade mark sign, U+2122 ISOnum -->
- {"alefsym", "8501"}, //alef symbol = first transfinite cardinal,U+2135 NEW -->
-// <!-- alef symbol is NOT the same as hebrew letter alef,U+05D0 although the same glyph could be used to depict both characters -->
-// <!-- Arrows -->
- {"larr", "8592"}, //leftwards arrow, U+2190 ISOnum -->
- {"uarr", "8593"}, //upwards arrow, U+2191 ISOnum-->
- {"rarr", "8594"}, //rightwards arrow, U+2192 ISOnum -->
- {"darr", "8595"}, //downwards arrow, U+2193 ISOnum -->
- {"harr", "8596"}, //left right arrow, U+2194 ISOamsa -->
- {"crarr", "8629"}, //downwards arrow with corner leftwards= carriage return, U+21B5 NEW -->
- {"lArr", "8656"}, //leftwards double arrow, U+21D0 ISOtech -->
-// <!-- ISO 10646 does not say that lArr is the same as the 'is implied by' arrowbut also does not have any other character for that function. So ? lArr canbe used for 'is implied by' as ISOtech suggests -->
- {"uArr", "8657"}, //upwards double arrow, U+21D1 ISOamsa -->
- {"rArr", "8658"}, //rightwards double arrow,U+21D2 ISOtech -->
-// <!-- ISO 10646 does not say this is the 'implies' character but does not have another character with this function so ?rArr can be used for 'implies' as ISOtech suggests -->
- {"dArr", "8659"}, //downwards double arrow, U+21D3 ISOamsa -->
- {"hArr", "8660"}, //left right double arrow,U+21D4 ISOamsa -->
-// <!-- Mathematical Operators -->
- {"forall", "8704"}, //for all, U+2200 ISOtech -->
- {"part", "8706"}, //partial differential, U+2202 ISOtech -->
- {"exist", "8707"}, //there exists, U+2203 ISOtech -->
- {"empty", "8709"}, //empty set = null set = diameter,U+2205 ISOamso -->
- {"nabla", "8711"}, //nabla = backward difference,U+2207 ISOtech -->
- {"isin", "8712"}, //element of, U+2208 ISOtech -->
- {"notin", "8713"}, //not an element of, U+2209 ISOtech -->
- {"ni", "8715"}, //contains as member, U+220B ISOtech -->
-// <!-- should there be a more memorable name than 'ni'? -->
- {"prod", "8719"}, //n-ary product = product sign,U+220F ISOamsb -->
-// <!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though the same glyph might be used for both -->
- {"sum", "8721"}, //n-ary summation, U+2211 ISOamsb -->
-// <!-- sum is NOT the same character as U+03A3 'greek capital letter sigma' though the same glyph might be used for both -->
- {"minus", "8722"}, //minus sign, U+2212 ISOtech -->
- {"lowast", "8727"}, //asterisk operator, U+2217 ISOtech -->
- {"radic", "8730"}, //square root = radical sign,U+221A ISOtech -->
- {"prop", "8733"}, //proportional to, U+221D ISOtech -->
- {"infin", "8734"}, //infinity, U+221E ISOtech -->
- {"ang", "8736"}, //angle, U+2220 ISOamso -->
- {"and", "8743"}, //logical and = wedge, U+2227 ISOtech -->
- {"or", "8744"}, //logical or = vee, U+2228 ISOtech -->
- {"cap", "8745"}, //intersection = cap, U+2229 ISOtech -->
- {"cup", "8746"}, //union = cup, U+222A ISOtech -->
- {"int", "8747"}, //integral, U+222B ISOtech -->
- {"there4", "8756"}, //therefore, U+2234 ISOtech -->
- {"sim", "8764"}, //tilde operator = varies with = similar to,U+223C ISOtech -->
-// <!-- tilde operator is NOT the same character as the tilde, U+007E,although the same glyph might be used to represent both -->
- {"cong", "8773"}, //approximately equal to, U+2245 ISOtech -->
- {"asymp", "8776"}, //almost equal to = asymptotic to,U+2248 ISOamsr -->
- {"ne", "8800"}, //not equal to, U+2260 ISOtech -->
- {"equiv", "8801"}, //identical to, U+2261 ISOtech -->
- {"le", "8804"}, //less-than or equal to, U+2264 ISOtech -->
- {"ge", "8805"}, //greater-than or equal to,U+2265 ISOtech -->
- {"sub", "8834"}, //subset of, U+2282 ISOtech -->
- {"sup", "8835"}, //superset of, U+2283 ISOtech -->
-// <!-- note that nsup, 'not a superset of, U+2283' is not covered by the Symbol font encoding and is not included. Should it be, for symmetry?It is in ISOamsn --> <!ENTITY nsub", "8836"}, //not a subset of, U+2284 ISOamsn -->
- {"sube", "8838"}, //subset of or equal to, U+2286 ISOtech -->
- {"supe", "8839"}, //superset of or equal to,U+2287 ISOtech -->
- {"oplus", "8853"}, //circled plus = direct sum,U+2295 ISOamsb -->
- {"otimes", "8855"}, //circled times = vector product,U+2297 ISOamsb -->
- {"perp", "8869"}, //up tack = orthogonal to = perpendicular,U+22A5 ISOtech -->
- {"sdot", "8901"}, //dot operator, U+22C5 ISOamsb -->
-// <!-- dot operator is NOT the same character as U+00B7 middle dot -->
-// <!-- Miscellaneous Technical -->
- {"lceil", "8968"}, //left ceiling = apl upstile,U+2308 ISOamsc -->
- {"rceil", "8969"}, //right ceiling, U+2309 ISOamsc -->
- {"lfloor", "8970"}, //left floor = apl downstile,U+230A ISOamsc -->
- {"rfloor", "8971"}, //right floor, U+230B ISOamsc -->
- {"lang", "9001"}, //left-pointing angle bracket = bra,U+2329 ISOtech -->
-// <!-- lang is NOT the same character as U+003C 'less than' or U+2039 'single left-pointing angle quotation mark' -->
- {"rang", "9002"}, //right-pointing angle bracket = ket,U+232A ISOtech -->
-// <!-- rang is NOT the same character as U+003E 'greater than' or U+203A 'single right-pointing angle quotation mark' -->
-// <!-- Geometric Shapes -->
- {"loz", "9674"}, //lozenge, U+25CA ISOpub -->
-// <!-- Miscellaneous Symbols -->
- {"spades", "9824"}, //black spade suit, U+2660 ISOpub -->
-// <!-- black here seems to mean filled as opposed to hollow -->
- {"clubs", "9827"}, //black club suit = shamrock,U+2663 ISOpub -->
- {"hearts", "9829"}, //black heart suit = valentine,U+2665 ISOpub -->
- {"diams", "9830"}, //black diamond suit, U+2666 ISOpub -->
-
-// <!-- Latin Extended-A -->
- {"OElig", "338"}, // -- latin capital ligature OE,U+0152 ISOlat2 -->
- {"oelig", "339"}, // -- latin small ligature oe, U+0153 ISOlat2 -->
-// <!-- ligature is a misnomer, this is a separate character in some languages -->
- {"Scaron", "352"}, // -- latin capital letter S with caron,U+0160 ISOlat2 -->
- {"scaron", "353"}, // -- latin small letter s with caron,U+0161 ISOlat2 -->
- {"Yuml", "376"}, // -- latin capital letter Y with diaeresis,U+0178 ISOlat2 -->
-// <!-- Spacing Modifier Letters -->
- {"circ", "710"}, // -- modifier letter circumflex accent,U+02C6 ISOpub -->
- {"tilde", "732"}, //small tilde, U+02DC ISOdia -->
-// <!-- General Punctuation -->
- {"ensp", "8194"}, //en space, U+2002 ISOpub -->
- {"emsp", "8195"}, //em space, U+2003 ISOpub -->
- {"thinsp", "8201"}, //thin space, U+2009 ISOpub -->
- {"zwnj", "8204"}, //zero width non-joiner,U+200C NEW RFC 2070 -->
- {"zwj", "8205"}, //zero width joiner, U+200D NEW RFC 2070 -->
- {"lrm", "8206"}, //left-to-right mark, U+200E NEW RFC 2070 -->
- {"rlm", "8207"}, //right-to-left mark, U+200F NEW RFC 2070 -->
- {"ndash", "8211"}, //en dash, U+2013 ISOpub -->
- {"mdash", "8212"}, //em dash, U+2014 ISOpub -->
- {"lsquo", "8216"}, //left single quotation mark,U+2018 ISOnum -->
- {"rsquo", "8217"}, //right single quotation mark,U+2019 ISOnum -->
- {"sbquo", "8218"}, //single low-9 quotation mark, U+201A NEW -->
- {"ldquo", "8220"}, //left double quotation mark,U+201C ISOnum -->
- {"rdquo", "8221"}, //right double quotation mark,U+201D ISOnum -->
- {"bdquo", "8222"}, //double low-9 quotation mark, U+201E NEW -->
- {"dagger", "8224"}, //dagger, U+2020 ISOpub -->
- {"Dagger", "8225"}, //double dagger, U+2021 ISOpub -->
- {"permil", "8240"}, //per mille sign, U+2030 ISOtech -->
- {"lsaquo", "8249"}, //single left-pointing angle quotation mark,U+2039 ISO proposed -->
-// <!-- lsaquo is proposed but not yet ISO standardized -->
- {"rsaquo", "8250"}, //single right-pointing angle quotation mark,U+203A ISO proposed -->
-// <!-- rsaquo is proposed but not yet ISO standardized -->
- {"euro", "8364"}, // -- euro sign, U+20AC NEW -->
- };
-
- /**
- * <p>The set of entities supported by standard XML.</p>
- */
- public static final Entities XML;
-
- /**
- * <p>The set of entities supported by HTML 3.2.</p>
- */
- public static final Entities HTML32;
-
- /**
- * <p>The set of entities supported by HTML 4.0.</p>
- */
- public static final Entities HTML40;
-
- static {
- XML = new Entities();
- XML.addEntities(BASIC_ARRAY);
- XML.addEntities(APOS_ARRAY);
- }
-
- static {
- HTML32 = new Entities();
- HTML32.addEntities(BASIC_ARRAY);
- HTML32.addEntities(ISO8859_1_ARRAY);
- }
-
- static {
- HTML40 = new Entities();
- fillWithHtml40Entities(HTML40);
- }
-
- static void fillWithHtml40Entities(Entities entities) {
- entities.addEntities(BASIC_ARRAY);
- entities.addEntities(ISO8859_1_ARRAY);
- entities.addEntities(HTML40_ARRAY);
- }
-
- static interface EntityMap {
- void add(String name, int value);
-
- String name(int value);
-
- int value(String name);
- }
-
- static class PrimitiveEntityMap implements EntityMap {
- private Map mapNameToValue = new HashMap();
- private IntHashMap mapValueToName = new IntHashMap();
-
- public void add(String name, int value) {
- mapNameToValue.put(name, new Integer(value));
- mapValueToName.put(value, name);
- }
-
- public String name(int value) {
- return (String) mapValueToName.get(value);
- }
-
- public int value(String name) {
- Object value = mapNameToValue.get(name);
- if (value == null) {
- return -1;
- }
- return ((Integer) value).intValue();
- }
- }
-
-
- static abstract class MapIntMap implements Entities.EntityMap {
- protected Map mapNameToValue;
- protected Map mapValueToName;
-
- public void add(String name, int value) {
- mapNameToValue.put(name, new Integer(value));
- mapValueToName.put(new Integer(value), name);
- }
-
- public String name(int value) {
- return (String) mapValueToName.get(new Integer(value));
- }
-
- public int value(String name) {
- Object value = mapNameToValue.get(name);
- if (value == null) {
- return -1;
- }
- return ((Integer) value).intValue();
- }
- }
-
- static class HashEntityMap extends MapIntMap {
- public HashEntityMap() {
- mapNameToValue = new HashMap();
- mapValueToName = new HashMap();
- }
- }
-
- static class TreeEntityMap extends MapIntMap {
- public TreeEntityMap() {
- mapNameToValue = new TreeMap();
- mapValueToName = new TreeMap();
- }
- }
-
- static class LookupEntityMap extends PrimitiveEntityMap {
- private String[] lookupTable;
- private int LOOKUP_TABLE_SIZE = 256;
-
- public String name(int value) {
- if (value < LOOKUP_TABLE_SIZE) {
- return lookupTable()[value];
- }
- return super.name(value);
- }
-
- private String[] lookupTable() {
- if (lookupTable == null) {
- createLookupTable();
- }
- return lookupTable;
- }
-
- private void createLookupTable() {
- lookupTable = new String[LOOKUP_TABLE_SIZE];
- for (int i = 0; i < LOOKUP_TABLE_SIZE; ++i) {
- lookupTable[i] = super.name(i);
- }
- }
- }
-
- static class ArrayEntityMap implements EntityMap {
- protected int growBy = 100;
- protected int size = 0;
- protected String[] names;
- protected int[] values;
-
- public ArrayEntityMap() {
- names = new String[growBy];
- values = new int[growBy];
- }
-
- public ArrayEntityMap(int growBy) {
- this.growBy = growBy;
- names = new String[growBy];
- values = new int[growBy];
- }
-
- public void add(String name, int value) {
- ensureCapacity(size + 1);
- names[size] = name;
- values[size] = value;
- size++;
- }
-
- protected void ensureCapacity(int capacity) {
- if (capacity > names.length) {
- int newSize = Math.max(capacity, size + growBy);
- String[] newNames = new String[newSize];
- System.arraycopy(names, 0, newNames, 0, size);
- names = newNames;
- int[] newValues = new int[newSize];
- System.arraycopy(values, 0, newValues, 0, size);
- values = newValues;
- }
- }
-
- public String name(int value) {
- for (int i = 0; i < size; ++i) {
- if (values[i] == value) {
- return names[i];
- }
- }
- return null;
- }
-
- public int value(String name) {
- for (int i = 0; i < size; ++i) {
- if (names[i].equals(name)) {
- return values[i];
- }
- }
- return -1;
- }
- }
-
- static class BinaryEntityMap extends ArrayEntityMap {
-
- public BinaryEntityMap() {
- }
-
- public BinaryEntityMap(int growBy) {
- super(growBy);
- }
-
- // based on code in java.util.Arrays
- private int binarySearch(int key) {
- int low = 0;
- int high = size - 1;
-
- while (low <= high) {
- int mid = (low + high) >> 1;
- int midVal = values[mid];
-
- if (midVal < key) {
- low = mid + 1;
- } else if (midVal > key) {
- high = mid - 1;
- } else {
- return mid; // key found
- }
- }
- return -(low + 1); // key not found.
- }
-
- public void add(String name, int value) {
- ensureCapacity(size + 1);
- int insertAt = binarySearch(value);
- if (insertAt > 0) {
- return; // note: this means you can't insert the same value twice
- }
- insertAt = -(insertAt + 1); // binarySearch returns it negative and off-by-one
- System.arraycopy(values, insertAt, values, insertAt + 1, size - insertAt);
- values[insertAt] = value;
- System.arraycopy(names, insertAt, names, insertAt + 1, size - insertAt);
- names[insertAt] = name;
- size++;
- }
-
- public String name(int value) {
- int index = binarySearch(value);
- if (index < 0) {
- return null;
- }
- return names[index];
- }
- }
-
- // package scoped for testing
- EntityMap map = new Entities.LookupEntityMap();
-
- public void addEntities(String[][] entityArray) {
- for (int i = 0; i < entityArray.length; ++i) {
- addEntity(entityArray[i][0], Integer.parseInt(entityArray[i][1]));
- }
- }
-
- public void addEntity(String name, int value) {
- map.add(name, value);
- }
-
- public String entityName(int value) {
- return map.name(value);
- }
-
-
- public int entityValue(String name) {
- return map.value(name);
- }
-
- /**
- * <p>Escapes the characters in a <code>String</code>.</p>
- *
- * <p>For example, if you have called addEntity("foo", 0xA1),
- * escape("\u00A1") will return "&foo;"</p>
- *
- * @param str The <code>String</code> to escape.
- * @return A new escaped <code>String</code>.
- */
- public String escape(String str) {
- //todo: rewrite to use a Writer
- StringBuffer buf = new StringBuffer(str.length() * 2);
- int i;
- for (i = 0; i < str.length(); ++i) {
- char ch = str.charAt(i);
- String entityName = this.entityName(ch);
- if (entityName == null) {
- if (ch > 0x7F) {
- int intValue = ch;
- buf.append("&#");
- buf.append(intValue);
- buf.append(';');
- } else {
- buf.append(ch);
- }
- } else {
- buf.append('&');
- buf.append(entityName);
- buf.append(';');
- }
- }
- return buf.toString();
- }
-
- /**
- * <p>Unescapes the entities in a <code>String</code>.</p>
- *
- * <p>For example, if you have called addEntity("foo", 0xA1),
- * unescape("&foo;") will return "\u00A1"</p>
- *
- * @param str The <code>String</code> to escape.
- * @return A new escaped <code>String</code>.
- */
- public String unescape(String str) {
- StringBuffer buf = new StringBuffer(str.length());
- int i;
- for (i = 0; i < str.length(); ++i) {
- char ch = str.charAt(i);
- if (ch == '&') {
- int semi = str.indexOf(';', i + 1);
- if (semi == -1) {
- buf.append(ch);
- continue;
- }
- String entityName = str.substring(i + 1, semi);
- int entityValue;
- if (entityName.charAt(0) == '#') {
- try{
- char charAt1 = entityName.charAt(1);
- if (charAt1 == 'x' || charAt1=='X') {
- entityValue = Integer.valueOf(entityName.substring(2), 16).intValue();
- } else {
- entityValue = Integer.parseInt(entityName.substring(1));
- }
- }catch( Throwable e ){
- // malformed, ignore
- entityValue = -1;
- }
- } else {
- entityValue = this.entityValue(entityName);
- }
- if (entityValue == -1) {
- buf.append('&');
- buf.append(entityName);
- buf.append(';');
- } else {
- buf.append((char) (entityValue));
- }
- i = semi;
- } else {
- buf.append(ch);
- }
- }
- return buf.toString();
- }
-
-}
diff --git a/azureus2/src/org/apache/commons/lang/IntHashMap.java b/azureus2/src/org/apache/commons/lang/IntHashMap.java
deleted file mode 100644
index 18062ec..0000000
--- a/azureus2/src/org/apache/commons/lang/IntHashMap.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Copyright 2002-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Note: originally released under the GNU LGPL v2.1,
- * but rereleased by the original author under the ASF license (above).
- */
-package org.apache.commons.lang;
-
-/**
- * <p>A hash map that uses primitive ints for the key rather than objects.</p>
- *
- * <p>Note that this class is for internal optimization purposes only, and may
- * not be supported in future releases of Jakarta Commons Lang. Utilities of
- * this sort may be included in future releases of Jakarta Commons Collections.</p>
- *
- * @author Justin Couch
- * @author Alex Chaffee (alex at apache.org)
- * @author Stephen Colebourne
- * @since 2.0
- * @version $Revision: 1.1 $
- * @see java.util.HashMap
- */
-class IntHashMap {
-
- /**
- * The hash table data.
- */
- private transient Entry table[];
-
- /**
- * The total number of entries in the hash table.
- */
- private transient int count;
-
- /**
- * The table is rehashed when its size exceeds this threshold. (The
- * value of this field is (int)(capacity * loadFactor).)
- *
- * @serial
- */
- private int threshold;
-
- /**
- * The load factor for the hashtable.
- *
- * @serial
- */
- private float loadFactor;
-
- /**
- * <p>Innerclass that acts as a datastructure to create a new entry in the
- * table.</p>
- */
- private static class Entry {
- int hash;
- int key;
- Object value;
- Entry next;
-
- /**
- * <p>Create a new entry with the given values.</p>
- *
- * @param hash The code used to hash the object with
- * @param key The key used to enter this in the table
- * @param value The value for this key
- * @param next A reference to the next entry in the table
- */
- protected Entry(int hash, int key, Object value, Entry next) {
- this.hash = hash;
- this.key = key;
- this.value = value;
- this.next = next;
- }
- }
-
- /**
- * <p>Constructs a new, empty hashtable with a default capacity and load
- * factor, which is <code>20</code> and <code>0.75</code> respectively.</p>
- */
- public IntHashMap() {
- this(20, 0.75f);
- }
-
- /**
- * <p>Constructs a new, empty hashtable with the specified initial capacity
- * and default load factor, which is <code>0.75</code>.</p>
- *
- * @param initialCapacity the initial capacity of the hashtable.
- * @throws IllegalArgumentException if the initial capacity is less
- * than zero.
- */
- public IntHashMap(int initialCapacity) {
- this(initialCapacity, 0.75f);
- }
-
- /**
- * <p>Constructs a new, empty hashtable with the specified initial
- * capacity and the specified load factor.</p>
- *
- * @param initialCapacity the initial capacity of the hashtable.
- * @param loadFactor the load factor of the hashtable.
- * @throws IllegalArgumentException if the initial capacity is less
- * than zero, or if the load factor is nonpositive.
- */
- public IntHashMap(int initialCapacity, float loadFactor) {
- super();
- if (initialCapacity < 0) {
- throw new IllegalArgumentException("Illegal Capacity: " + initialCapacity);
- }
- if (loadFactor <= 0) {
- throw new IllegalArgumentException("Illegal Load: " + loadFactor);
- }
- if (initialCapacity == 0) {
- initialCapacity = 1;
- }
-
- this.loadFactor = loadFactor;
- table = new Entry[initialCapacity];
- threshold = (int) (initialCapacity * loadFactor);
- }
-
- /**
- * <p>Returns the number of keys in this hashtable.</p>
- *
- * @return the number of keys in this hashtable.
- */
- public int size() {
- return count;
- }
-
- /**
- * <p>Tests if this hashtable maps no keys to values.</p>
- *
- * @return <code>true</code> if this hashtable maps no keys to values;
- * <code>false</code> otherwise.
- */
- public boolean isEmpty() {
- return count == 0;
- }
-
- /**
- * <p>Tests if some key maps into the specified value in this hashtable.
- * This operation is more expensive than the <code>containsKey</code>
- * method.</p>
- *
- * <p>Note that this method is identical in functionality to containsValue,
- * (which is part of the Map interface in the collections framework).</p>
- *
- * @param value a value to search for.
- * @return <code>true</code> if and only if some key maps to the
- * <code>value</code> argument in this hashtable as
- * determined by the <tt>equals</tt> method;
- * <code>false</code> otherwise.
- * @throws NullPointerException if the value is <code>null</code>.
- * @see #containsKey(int)
- * @see #containsValue(Object)
- * @see java.util.Map
- */
- public boolean contains(Object value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- Entry tab[] = table;
- for (int i = tab.length; i-- > 0;) {
- for (Entry e = tab[i]; e != null; e = e.next) {
- if (e.value.equals(value)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * <p>Returns <code>true</code> if this HashMap maps one or more keys
- * to this value.</p>
- *
- * <p>Note that this method is identical in functionality to contains
- * (which predates the Map interface).</p>
- *
- * @param value value whose presence in this HashMap is to be tested.
- * @see java.util.Map
- * @since JDK1.2
- */
- public boolean containsValue(Object value) {
- return contains(value);
- }
-
- /**
- * <p>Tests if the specified object is a key in this hashtable.</p>
- *
- * @param key possible key.
- * @return <code>true</code> if and only if the specified object is a
- * key in this hashtable, as determined by the <tt>equals</tt>
- * method; <code>false</code> otherwise.
- * @see #contains(Object)
- */
- public boolean containsKey(int key) {
- Entry tab[] = table;
- int hash = key;
- int index = (hash & 0x7FFFFFFF) % tab.length;
- for (Entry e = tab[index]; e != null; e = e.next) {
- if (e.hash == hash) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * <p>Returns the value to which the specified key is mapped in this map.</p>
- *
- * @param key a key in the hashtable.
- * @return the value to which the key is mapped in this hashtable;
- * <code>null</code> if the key is not mapped to any value in
- * this hashtable.
- * @see #put(int, Object)
- */
- public Object get(int key) {
- Entry tab[] = table;
- int hash = key;
- int index = (hash & 0x7FFFFFFF) % tab.length;
- for (Entry e = tab[index]; e != null; e = e.next) {
- if (e.hash == hash) {
- return e.value;
- }
- }
- return null;
- }
-
- /**
- * <p>Increases the capacity of and internally reorganizes this
- * hashtable, in order to accommodate and access its entries more
- * efficiently.</p>
- *
- * <p>This method is called automatically when the number of keys
- * in the hashtable exceeds this hashtable's capacity and load
- * factor.</p>
- */
- protected void rehash() {
- int oldCapacity = table.length;
- Entry oldMap[] = table;
-
- int newCapacity = oldCapacity * 2 + 1;
- Entry newMap[] = new Entry[newCapacity];
-
- threshold = (int) (newCapacity * loadFactor);
- table = newMap;
-
- for (int i = oldCapacity; i-- > 0;) {
- for (Entry old = oldMap[i]; old != null;) {
- Entry e = old;
- old = old.next;
-
- int index = (e.hash & 0x7FFFFFFF) % newCapacity;
- e.next = newMap[index];
- newMap[index] = e;
- }
- }
- }
-
- /**
- * <p>Maps the specified <code>key</code> to the specified
- * <code>value</code> in this hashtable. The key cannot be
- * <code>null</code>. </p>
- *
- * <p>The value can be retrieved by calling the <code>get</code> method
- * with a key that is equal to the original key.</p>
- *
- * @param key the hashtable key.
- * @param value the value.
- * @return the previous value of the specified key in this hashtable,
- * or <code>null</code> if it did not have one.
- * @throws NullPointerException if the key is <code>null</code>.
- * @see #get(int)
- */
- public Object put(int key, Object value) {
- // Makes sure the key is not already in the hashtable.
- Entry tab[] = table;
- int hash = key;
- int index = (hash & 0x7FFFFFFF) % tab.length;
- for (Entry e = tab[index]; e != null; e = e.next) {
- if (e.hash == hash) {
- Object old = e.value;
- e.value = value;
- return old;
- }
- }
-
- if (count >= threshold) {
- // Rehash the table if the threshold is exceeded
- rehash();
-
- tab = table;
- index = (hash & 0x7FFFFFFF) % tab.length;
- }
-
- // Creates the new entry.
- Entry e = new Entry(hash, key, value, tab[index]);
- tab[index] = e;
- count++;
- return null;
- }
-
- /**
- * <p>Removes the key (and its corresponding value) from this
- * hashtable.</p>
- *
- * <p>This method does nothing if the key is not present in the
- * hashtable.</p>
- *
- * @param key the key that needs to be removed.
- * @return the value to which the key had been mapped in this hashtable,
- * or <code>null</code> if the key did not have a mapping.
- */
- public Object remove(int key) {
- Entry tab[] = table;
- int hash = key;
- int index = (hash & 0x7FFFFFFF) % tab.length;
- for (Entry e = tab[index], prev = null; e != null; prev = e, e = e.next) {
- if (e.hash == hash) {
- if (prev != null) {
- prev.next = e.next;
- } else {
- tab[index] = e.next;
- }
- count--;
- Object oldValue = e.value;
- e.value = null;
- return oldValue;
- }
- }
- return null;
- }
-
- /**
- * <p>Clears this hashtable so that it contains no keys.</p>
- */
- public synchronized void clear() {
- Entry tab[] = table;
- for (int index = tab.length; --index >= 0;) {
- tab[index] = null;
- }
- count = 0;
- }
-
-}
diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian
deleted file mode 100644
index 46a8f64..0000000
--- a/debian/NEWS.Debian
+++ /dev/null
@@ -1,16 +0,0 @@
-azureus (4.2.0.4-1) unstable; urgency=low
-
- * New upstream release.
- * This release is the result of a major packaging rewrite as part of
- package adoption.
- * Important changes:
- - Most user-visible bugs fixed.
- - Add multiuser support: allow multiple instances running in the
- same machine.
- - Fixes "a malicious user could control another user's instance".
- - Handle file associations and magnet URL links.
- - Refer to Vuze in menus.
- - No updates that break sync with the Debian package manager.
- - Launcher automatically detects installed JVM and sets classpath.
-
- -- Adrian Perez <adrianperez.deb at gmail.com> Wed, 12 Aug 2009 11:20:03 -0400
diff --git a/debian/azureus.desktop b/debian/azureus.desktop
deleted file mode 100644
index 4f1058a..0000000
--- a/debian/azureus.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Categories=Java;Network;FileTransfer;P2P
-Comment=Download and share files using the BitTorrent P2P network
-Exec=azureus %f
-GenericName=BitTorrent client
-Icon=Azureus
-MimeType=application/x-bittorrent
-Name=Vuze
-Type=Application
diff --git a/debian/azureus.install b/debian/azureus.install
new file mode 100644
index 0000000..b998416
--- /dev/null
+++ b/debian/azureus.install
@@ -0,0 +1 @@
+dist/azureus.jar usr/share/java
diff --git a/debian/azureus.manifest b/debian/azureus.manifest
new file mode 100644
index 0000000..b67a831
--- /dev/null
+++ b/debian/azureus.manifest
@@ -0,0 +1,4 @@
+usr/share/java/azureus.jar:
+ Class-Path: /usr/share/java/commons-cli.jar /usr/share/java/log4j-1.2.jar /usr/share/java/swt-gtk-4.3.jar
+ Main-Class: org.gudy.azureus2.ui.common.Main
+ Debian-Java-Home: /usr/lib/jvm/default-java
diff --git a/debian/wrappers/azureus b/debian/bin/azureus
similarity index 54%
rename from debian/wrappers/azureus
rename to debian/bin/azureus
index 6d02ceb..6449225 100644
--- a/debian/wrappers/azureus
+++ b/debian/bin/azureus
@@ -1,4 +1,5 @@
#!/bin/sh
+set -e
# Include java-wrappers
. /usr/lib/java-wrappers/java-wrappers.sh
@@ -6,13 +7,13 @@
JAVA_CLASSPATH="/usr/lib/jni:/usr/lib/java"
VUZE_BIN="/usr/bin/vuze"
-find_java_runtime openjdk sunmin5
+require_java_runtime java7
-find_jars Azureus2 log4j-1.2 commons-cli swt
+find_jars azureus log4j-1.2 commons-cli swt-gtk-4.3 commons-lang3 json-simple bcprov
if [ ! -x $VUZE_BIN ]; then
UI=-Dforce.ui=az2
fi
-run_java -Dazureus.install.path="$HOME/.azureus" $UI \
+run_java -Dazureus.skipSWTcheck=true -Dazureus.install.path="$HOME/.azureus" $UI \
org.gudy.azureus2.ui.common.Main "$@"
diff --git a/debian/build.properties b/debian/build.properties
deleted file mode 100644
index 93b4c43..0000000
--- a/debian/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-root.dir=${basedir}
-src.dir=${root.dir}
-build.dir=${basedir}/build
-lib.dir=${src.dir}/libs
-dist.dir=${basedir}/dist
-generic.excludes=.bzr/** **/debian/** .bzr* **/.pc/**
-platform.excludes=**/macosx/** org/gudy/azureus2/ui/swt/osx/** org/gudy/azureus2/platform/macosx/* org/gudy/azureus2/ui/swt/win32/** org/gudy/azureus2/ui/swt/test/** org/gudy/azureus2/platform/macosx/**/*.java org/gudy/azureus2/platform/macosx/PlatformManagerImpl.java
-compile.excludes=${platform.excludes} ${generic.excludes} *build.xml azureus Azureus.* *.properties **/*.gif **/*.png **/Azureus2.jar
-jar.mainclass=org.gudy.azureus2.ui.common.Main
-jar.classpath=Azureus2.jar commons-cli.jar log4j-1.2.jar swt.jar /usr/lib/jni
-jar.excludes=**/*.java ${generic.excludes} ${platform.excludes} **/Azureus2.jar azureus Azureus.* *build.xml build.properties **/build/**
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 5206fbc..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- build.xml - Vuze/Azureus Project Builder
- Copyright (C) 2009 - Adrian Perez <adrianperez.deb at gmail.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
--->
-
-<!--
- ==============================================
- Build file to compile Azureus2.jar and Vuze.
- ==============================================
--->
-
-<project name="azureus" default="package" basedir="..">
- <description>
- This build file will compile the Azureus and Vuze files
- from the Vuze source distribution.
- Vuze is a Multimedia BitTorrent Client.
- </description>
-
- <property file="debian/build.properties" />
-
- <!-- The debian classpath. This is the default way of building. -->
- <!-- TODO Make generic and use condition properties. -->
-
- <path id="debian.classpath">
- <fileset dir="/usr/share/java/">
- <include name="swt.jar" />
- <include name="commons-cli.jar" />
- <include name="log4j-1.2.jar" />
- <include name="junit.jar" />
- </fileset>
- </path>
-
- <!-- The bundled classpath. This was the default way of building. -->
- <path id="bundled.classpath">
- <fileset dir="${src.dir}/${lib.dir}" includes="**/*.jar" />
- </path>
-
- <target name="init">
- <!-- Create a build timestamp -->
- <tstamp />
- <!-- Create the build directory -->
- <mkdir dir="${build.dir}" />
- </target>
-
- <target name="compile" depends="init" description="compile all files">
- <javac srcdir="${src.dir}" destdir="${build.dir}" source="1.5" target="1.5"
- includeAntRuntime="no" nowarn="yes" debug="true" excludes="${compile.excludes}">
- <classpath>
- <path refid="debian.classpath" />
- </classpath>
- </javac>
- </target>
-
- <target name="package" depends="compile,buildcopy" description="package Azureus2.jar">
- <!-- Create the "dist" directory. -->
- <mkdir dir="${dist.dir}" />
- <copy todir="${build.dir}" file="${src.dir}/ChangeLog.txt"/>
-
- <!-- Create the jar file and use exclusions -->
- <jar destfile="${dist.dir}/Azureus2.jar" basedir="${build.dir}" excludes="${jar.excludes}">
- <manifest>
- <attribute name="Main-Class" value="${jar.mainclass}" />
- <attribute name="Class-Path" value="${jar.classpath}" />
- </manifest>
- </jar>
-
- </target>
-
- <target name="clean" description="clean the build environment">
- <!-- Delete the build and dist directories -->
- <delete dir="${build.dir}" />
- <delete dir="${dist.dir}" />
- </target>
-
- <target name="run" description="run the application">
- <java jar="${dist.dir}/Azureus2.jar" fork="true" />
- </target>
-
- <target name="buildcopy" description="copy the build files">
- <!-- Copy all non-source files to the JAR. -->
- <copy todir="${build.dir}" includeEmptyDirs="false">
- <fileset dir="${src.dir}" excludes="${jar.excludes}"/>
- </copy>
- </target>
-
- <target name="echo" description="echo">
- <echo message="${compile.excludes}"/>
- </target>
-
-</project>
-
-
diff --git a/debian/changelog b/debian/changelog
index 5ec3796..5ba6cd8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+azureus (5.3.0.0-1) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Upgrade to latest upstream version. (Closes: #724867, #642189)
+ * Updated dependency on swt3 to swt4. (Closes: #588033, #638026)
+ * Adopt the azureus package. (Closes: #710908)
+ * Switch to dh with javahelper build system.
+ * Checkout source from svn to get build files.
+ * Exclude jars and non-Linux platform-specific files from upstream tarball.
+ * Unbundle json simple to use Debian dependency.
+ - Thanks to David Juran <djuran at redhat.com>
+ * Unbundle commons lang to use Debian dependency.
+ - Thanks to David Juran <djuran at redhat.com>
+ * Unbundle bouncy castle to use Debian dependency.
+ - Thanks to David Juran <djuran at redhat.com>
+ * Refreshed patches.
+ * Update policy to 3.9.5.
+
+ -- Stephen Nelson <stephen at eccostudio.com> Wed, 18 Jun 2014 22:41:15 +0100
+
azureus (4.3.0.6-6) UNRELASED; urgency=low
* Add libswt-cairo-gtk-3-jni to depends. (Closes: #684464)
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index 66f26b4..3302ff3 100644
--- a/debian/control
+++ b/debian/control
@@ -1,25 +1,37 @@
-Source: azureus
+Source: azureus
Section: net
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Adrian Perez <adrianperez.deb at gmail.com>
-Build-Depends: ant, cdbs, debhelper (>= 7.0)
-Build-Depends-Indep: default-jdk,
- libcommons-cli-java,
- liblog4j1.2-java,
- libswt-gtk-3-java,
- junit
-Standards-Version: 3.9.4
-Vcs-Git: git://git.debian.org/git/pkg-java/azureus.git
-Vcs-Browser: http://git.debian.org/?p=pkg-java/azureus.git
+Uploaders: Adrian Perez <adrianperez.deb at gmail.com>, Stephen Nelson <stephen at eccostudio.com>
+Build-Depends: ant
+ , debhelper (>= 9)
+ , default-jdk
+ , javahelper (>= 0.45)
+ , junit4
+ , libbcprov-java
+ , libjson-simple-java
+ , libswt-gtk-4-java
+ , libcommons-cli-java
+ , libcommons-lang3-java
+ , liblog4j1.2-java
+Standards-Version: 3.9.5
Homepage: http://azureus.sourceforge.net
+Vcs-Git: git://anonscm.debian.org/pkg-java/azureus.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/azureus.git
Package: azureus
Architecture: all
-Depends: openjdk-7-jre | openjdk-6-jre | sun-java5-jre | sun-java6-jre,
- libcommons-cli-java, liblog4j1.2-java, libswt-gtk-3-java,
- libswt-cairo-gtk-3-jni,
- java-wrappers, ${misc:Depends}
+Depends: default-jre | java7-runtime
+ , java-wrappers
+ , libbcprov-java
+ , libcommons-cli-java
+ , libcommons-lang3-java
+ , libjson-simple-java
+ , liblog4j1.2-java
+ , libswt-gtk-4-java
+ , libswt-cairo-gtk-4-jni
+ , ${java:Depends}
+ , ${misc:Depends}
Recommends: vuze
Description: BitTorrent client
BitTorrent is a peer-to-peer file distribution tool.
@@ -31,8 +43,11 @@ Description: BitTorrent client
Package: vuze
Architecture: all
-Depends: azureus, libswt-cairo-gtk-3-jni, libswt-gnome-gtk-3-jni,
- libswt-webkit-gtk-3-jni | libswt-mozilla-gtk-3-jni, ${misc:Depends}
+Depends: azureus
+ , libswt-cairo-gtk-4-jni
+ , libswt-gnome-gtk-4-jni
+ , libswt-webkit-gtk-4-jni | libswt-mozilla-gtk-4-jni
+ , ${misc:Depends}
Description: Multimedia BitTorrent client
BitTorrent is a peer-to-peer file distribution tool.
.
@@ -44,6 +59,6 @@ Description: Multimedia BitTorrent client
web-browser, support for multiple Content Networks, sharing .vuze files,
popularity contexts, categories and tagging, IPv6 compact tracker support,
automatic URL handling, and a plugin architecture; besides other features.
- .
+ .
This package is part of the azureus package, and provides the dependencies
necessary to run the new user interface.
diff --git a/debian/copyright b/debian/copyright
index cb74f6a..63cb8bd 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -27,18 +27,6 @@ Files: org/gudy/azureus2/core3/util/BrokenMd5Hasher.java
Copyright: 2005, jMuleGroup
License: GPL-2
-Files: org/json/simple/*
-Copyright: 2006-2009, Fang Yidong <fangyidong at yahoo.com.cn>
-License: LGPL-2.1
-
-Files: org/apache/commons/lang/*
-Copyright: 2002-2004, The Apache Software Foundation
-License: Apache-2.0
-
-Files: org/bouncycastle/*
-Copyright: 2000, The Legion Of The Bouncy Castle
-License: other
-
Files: org/pf/*
Copyright: 1999-2003, Manfred Duchrow
License: CPL-1.0
@@ -46,6 +34,7 @@ License: CPL-1.0
Files: debian/*
Copyright: 2009, Adrian Perez <adrianperez.deb at gmail.com>
2005-2009, Shaun Jackman <sjackman at debian.org>
+ 2014, Stephen Nelson <stephen at eccostudio.com>
License: GPL-2+
diff --git a/debian/azureus.1 b/debian/man/azureus.1
similarity index 91%
rename from debian/azureus.1
rename to debian/man/azureus.1
index d06daf4..10550bf 100644
--- a/debian/azureus.1
+++ b/debian/man/azureus.1
@@ -1,4 +1,4 @@
-.TH azureus "1" "2009-07-08" "azureus 4.2.0.4" "User Commands"
+.TH azureus "1" "2014-04-09" "azureus 5.3.0.0" "User Commands"
.SH NAME
azureus \- a BitTorrent client
@@ -24,7 +24,7 @@ for the Debian project (and may be used by others).
Report bugs to <azureus at gmail.com>.
.SH COPYRIGHT
-Copyright 2009 Vuze, Inc.
+Copyright 2009-2014 Vuze, Inc.
Copyright 2003-2009 Aelitis.
This is free software; see the source for copying conditions. There is
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index 2de4af8..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/azureus.1
diff --git a/debian/menu b/debian/menu
deleted file mode 100644
index 45f54e5..0000000
--- a/debian/menu
+++ /dev/null
@@ -1,4 +0,0 @@
-?package(azureus):needs="X11" section="Applications/Network/File Transfer"\
- icon="/usr/share/pixmaps/azureus.xpm"\
- title="Azureus" command="/usr/bin/azureus" \
- hints="Internet"
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
new file mode 100755
index 0000000..16ca68a
--- /dev/null
+++ b/debian/orig-tar.sh
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+VERSION=$2
+TAR=../azureus_$VERSION.orig.tar.xz
+DIR="azureus-$VERSION"
+UPSTREAM_VERSION="`echo $VERSION | sed 's/\.//g'`"
+TAG="RELEASE_$UPSTREAM_VERSION"
+echo "Version: $VERSION"
+echo "Upstream version: $UPSTREAM_VERSION"
+
+svn export http://svn.vuze.com/public/client/tags/${TAG} $DIR
+XZ_OPT=--best tar -c -J -f $TAR --exclude '*.jar' \
+ --exclude '*.class' --exclude 'Tree2.java' --exclude 'azureus2/lib/*' \
+ --exclude 'azureus2/src/org/json/*' --exclude 'azureus3/src/org/apache/*' \
+ --exclude 'azureus2/src/org/bouncycastle/*' $DIR
+rm -rf $DIR ../$TAG $3
diff --git a/debian/patches/01_amend_build_classpath.patch b/debian/patches/01_amend_build_classpath.patch
new file mode 100644
index 0000000..e0a1dec
--- /dev/null
+++ b/debian/patches/01_amend_build_classpath.patch
@@ -0,0 +1,46 @@
+# Description: Amends build script to use packaged jars.
+# Author: Stephen Nelson <stephen at eccostudio.com>
+# Forwarded: not-needed
+# Last-Update: 2014-06-23
+--- a/build.xml
++++ b/build.xml
+@@ -17,7 +17,7 @@
+ <property name="major.ver" value="0000"/>
+ <property name="minor.ver" value="00"/>
+ <property name="build.ver" value="${major.ver}-${minor.ver}"/>
+- <property name="build.name" value="Vuze_${build.ver}" />
++ <property name="build.name" value="azureus" />
+
+ <property name="azureus2.dir" value="azureus2"/>
+ <property name="azureus3.dir" value="azureus3"/>
+@@ -32,9 +32,10 @@
+ <!-- REUSABLE REFERENCES -->
+
+ <path id="build.classpath">
+- <fileset dir="${azureus2.dir}/lib" includes="*.jar" excludes="swt-carbon.jar"/>
++ <fileset dir="/usr/share/java" includes="swt-gtk-4.3.jar,commons-cli.jar,log4j-1.2.jar,junit4.jar" />
++ <!--<fileset dir="${azureus2.dir}/lib" includes="*.jar" excludes="swt-carbon.jar"/>
+ <fileset dir="${azureus3.dir}/lib" includes="*.jar" />
+- <fileset dir="${uis.dir}/lib" includes="*.jar" />
++ <fileset dir="${uis.dir}/lib" includes="*.jar" />-->
+ </path>
+
+ <patternset id="pluginapi.inc">
+@@ -87,7 +88,7 @@
+ </copy>
+
+ <!-- Compile source code -->
+- <javac encoding="8859_1" includeAntRuntime="no" debug="true" debuglevel="source,lines,vars" destdir="${build.dir}" source="1.5" target="1.5" fork="yes" memoryMaximumSize="256m" >
++ <javac encoding="8859_1" includeAntRuntime="no" debug="true" debuglevel="source,lines,vars" destdir="${build.dir}" source="1.6" target="1.6" fork="yes" memoryMaximumSize="256m" >
+ <src path="${azureus2.dir}/src"/>
+ <src path="${azureus3.dir}/src"/>
+ <src path="${uis.dir}/src"/>
+@@ -101,7 +102,7 @@
+ <jar destfile="${dist.dir}/${build.name}.jar" basedir="${build.dir}" level="9" >
+ <manifest>
+ <attribute name="Main-Class" value="org.gudy.azureus2.ui.common.Main" />
+- <attribute name="Class-Path" value="swt.jar commons-cli.jar log4j.jar junit.jar" />
++ <attribute name="Class-Path" value="swt-gtk-4.3.jar commons-cli.jar log4j.jar junit.jar" />
+ <attribute name="Built-By" value="VZCB:${ant.project.name}:build.xml"/>
+ <attribute name="Build-Version" value="${build.ver}"/>
+ </manifest>
diff --git a/debian/patches/debian/speedtest.diff b/debian/patches/02_speedtest.patch
similarity index 63%
rename from debian/patches/debian/speedtest.diff
rename to debian/patches/02_speedtest.patch
index 0c61cfc..a40ca6d 100644
--- a/debian/patches/debian/speedtest.diff
+++ b/debian/patches/02_speedtest.patch
@@ -1,18 +1,16 @@
-From: Scott Wolchok <scott at wolchok.org>
-Subject: [PATCH] debian/speedtest
-
-Disable Client-side validation for Speed Test.
-
-Signed-off-by: Adrian Perez <adrianperez.deb at gmail.com>
-
+# Description: Disable Client-side validation for Speed Test
+# Author: Scott Wolchok <scott at wolchok.org>
+# Acked-by: Adrian Perez <adrianperez.deb at gmail.com>
+# Forwarded: no
+# Last-Update: 2014-06-23
---
.../NetworkAdminSpeedTestScheduledTestImpl.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
-diff --git a/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java b/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java
+diff --git a/azureus2/src/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java b/azureus2/src/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java
index 01022eb..76e27df 100644
---- a/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java
-+++ b/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java
+--- a/azureus2/src/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java
++++ b/azureus2/src/com/aelitis/azureus/core/networkmanager/admin/impl/NetworkAdminSpeedTestScheduledTestImpl.java
@@ -461,20 +461,22 @@ NetworkAdminSpeedTestScheduledTestImpl
if( size==null || offset==null )
throw new IllegalStateException("scheduleTestWithSpeedTestService had a null parameter.");
diff --git a/debian/patches/03_update_disable.patch b/debian/patches/03_update_disable.patch
new file mode 100644
index 0000000..8584eb4
--- /dev/null
+++ b/debian/patches/03_update_disable.patch
@@ -0,0 +1,73 @@
+# Description: Prevent the automatic update of several components, specially the Core and the
+# SWT libraries; avoids sync breakage with the Debian repositories.
+# Author: Adrian Perez <adrianperez.deb at gmail.com>
+# Forwarded: no
+# Last-Update: 2014-06-23
+---
+ com/aelitis/azureus/ui/swt/Initializer.java | 8 ++++++--
+ .../azureus2/ui/swt/mainwindow/Initializer.java | 8 ++++++--
+ org/gudy/azureus2/update/CorePatchChecker.java | 6 +++++-
+ org/gudy/azureus2/update/CoreUpdateChecker.java | 5 ++++-
+ 4 files changed, 21 insertions(+), 6 deletions(-)
+
+--- a/azureus3/src/com/aelitis/azureus/ui/swt/Initializer.java
++++ b/azureus3/src/com/aelitis/azureus/ui/swt/Initializer.java
+@@ -49,9 +49,10 @@
+ import org.gudy.azureus2.ui.swt.pluginsinstaller.InstallPluginWizard;
+ import org.gudy.azureus2.ui.swt.progress.ProgressWindow;
+ import org.gudy.azureus2.ui.swt.update.UpdateMonitor;
++/* --- Adrian Perez: Don't initialize SWTUpdateChecker in Debian.
+ import org.gudy.azureus2.ui.swt.updater2.PreUpdateChecker;
+ import org.gudy.azureus2.ui.swt.updater2.SWTUpdateChecker;
+-
++*/
+ import com.aelitis.azureus.core.*;
+ import com.aelitis.azureus.core.messenger.ClientMessageContext;
+ import com.aelitis.azureus.core.messenger.PlatformMessenger;
+@@ -444,12 +445,15 @@
+ }
+
+ reportCurrentTaskByKey("splash.openViews");
+-
++/*
++ * Adrian Perez: Don't initialize SWTUpdateChecker in Debian
++ *
+ SWTUpdateChecker.initialize();
+
+ PreUpdateChecker.initialize(core,
+ COConfigurationManager.getStringParameter("ui"));
+
++*/
+ UpdateMonitor.getSingleton(core); // setup the update monitor
+
+ //Tell listeners that all is initialized :
+--- a/azureus2/src/org/gudy/azureus2/update/CorePatchChecker.java
++++ b/azureus2/src/org/gudy/azureus2/update/CorePatchChecker.java
+@@ -68,7 +68,11 @@
+ System.out.println( "CorePatchChecker: TESTING !!!!" );
+ }
+
+- plugin_interface.getUpdateManager().registerUpdatableComponent( this, false );
++ /*
++ * Adrian Perez: Don't register Core Patcher in Debian
++ *
++ * plugin_interface.getUpdateManager().registerUpdatableComponent( this, false );
++ */
+ }
+ }
+
+--- a/azureus2/src/org/gudy/azureus2/update/CoreUpdateChecker.java
++++ b/azureus2/src/org/gudy/azureus2/update/CoreUpdateChecker.java
+@@ -131,8 +131,11 @@
+ props.setProperty( "plugin.version", plugin_interface.getAzureusVersion());
+
+ rdf = plugin_interface.getUtilities().getResourceDownloaderFactory();
+-
++ /*
++ * Adrian Perez: Don't update Azureus Core in Debian.
++ *
+ plugin_interface.getUpdateManager().registerUpdatableComponent( this, true );
++ */
+ }
+
+ public String
diff --git a/debian/patches/04_unbundle_json.patch b/debian/patches/04_unbundle_json.patch
new file mode 100644
index 0000000..c670985
--- /dev/null
+++ b/debian/patches/04_unbundle_json.patch
@@ -0,0 +1,66 @@
+# Description: Removes the json simple code bundled with upstream. Patch taken from Fedora project.
+# Origin: vendor, http://pkgs.fedoraproject.org/cgit/azureus.git/commit/?id=c220c2c8d9aff45192640e3031bbac6fca379c13
+# Author: Sérgio Basto <sergio at serjux.com>, David Juran <djuran at redhat.com>
+# Forwarded: no
+# Last-Update: 2014-06-23
+--- a/azureus2/src/com/aelitis/azureus/util/JSONUtils.java
++++ b/azureus2/src/com/aelitis/azureus/util/JSONUtils.java
+@@ -74,7 +74,7 @@
+ * @since 3.0.1.5
+ */
+ public static JSONObject encodeToJSONObject(Map map) {
+- JSONObject newMap = new JSONObject((int)(map.size()*1.5));
++ JSONObject newMap = new JSONObject();
+
+ for (Map.Entry<String, Object> entry: ((Map<String,Object>)map).entrySet()){
+ String key = entry.getKey();
+@@ -105,9 +105,7 @@
+ */
+ public static String encodeToJSON(Map map) {
+ JSONObject jobj = encodeToJSONObject(map);
+- StringBuilder sb = new StringBuilder(8192);
+- jobj.toString( sb );
+- return( sb.toString());
++ return( jobj.toString());
+ }
+
+ public static String encodeToJSON(Collection list) {
+@@ -138,7 +136,7 @@
+ * @since 3.0.1.5
+ */
+ private static JSONArray encodeToJSONArray(Collection list) {
+- JSONArray newList = new JSONArray(list.size());
++ JSONArray newList = new JSONArray();
+
+ for ( Object value: list ){
+
+--- a/azureus3/src/com/aelitis/azureus/util/ImportExportUtils.java
++++ b/azureus3/src/com/aelitis/azureus/util/ImportExportUtils.java
+@@ -360,7 +360,7 @@
+
+ throws IOException
+ {
+- List l = new JSONArray(data.length);
++ List l = new JSONArray();
+
+ map.put( key, l );
+
+--- a/build.xml
++++ b/build.xml
+@@ -32,7 +32,7 @@
+ <!-- REUSABLE REFERENCES -->
+
+ <path id="build.classpath">
+- <fileset dir="/usr/share/java" includes="swt-gtk-4.3.jar,commons-cli.jar,log4j-1.2.jar,junit4.jar" />
++ <fileset dir="/usr/share/java" includes="swt-gtk-4.3.jar,commons-cli.jar,log4j-1.2.jar,junit4.jar,json-simple.jar" />
+ <!--<fileset dir="${azureus2.dir}/lib" includes="*.jar" excludes="swt-carbon.jar"/>
+ <fileset dir="${azureus3.dir}/lib" includes="*.jar" />
+ <fileset dir="${uis.dir}/lib" includes="*.jar" />-->
+@@ -102,7 +102,6 @@
+ <jar destfile="${dist.dir}/${build.name}.jar" basedir="${build.dir}" level="9" >
+ <manifest>
+ <attribute name="Main-Class" value="org.gudy.azureus2.ui.common.Main" />
+- <attribute name="Class-Path" value="swt-gtk-4.3.jar commons-cli.jar log4j.jar junit.jar" />
+ <attribute name="Built-By" value="VZCB:${ant.project.name}:build.xml"/>
+ <attribute name="Build-Version" value="${build.ver}"/>
+ </manifest>
diff --git a/debian/patches/05_unbundle_commons_lang.patch b/debian/patches/05_unbundle_commons_lang.patch
new file mode 100644
index 0000000..6150a40
--- /dev/null
+++ b/debian/patches/05_unbundle_commons_lang.patch
@@ -0,0 +1,136 @@
+# Description: Remove the modified Apache Commons Lang source that is bundled with upstream.
+# The patch from Fedora was modified to work with Commons Lang 3.
+# Origin: vendor, http://pkgs.fedoraproject.org/cgit/azureus.git/commit/?id=a2b550683ba11c222df15851b1ec88581d9669bb
+# Author: David Juran <djuran at redhat.com>
+# Forwarded: no
+# Last-Update: 2014-06-23
+--- a/azureus3/src/com/aelitis/azureus/core/metasearch/Result.java
++++ b/azureus3/src/com/aelitis/azureus/core/metasearch/Result.java
+@@ -27,7 +27,7 @@
+ import java.util.Map;
+ import java.util.Random;
+
+-import org.apache.commons.lang.Entities;
++import org.apache.commons.lang3.StringEscapeUtils;
+ import org.gudy.azureus2.core3.util.DisplayFormatters;
+ import org.json.simple.JSONObject;
+
+@@ -372,6 +372,6 @@
+ if ( input == null ){
+ return( null );
+ }
+- return( Entities.HTML40.unescape( input ));
++ return( StringEscapeUtils.unescapeHtml4( input ));
+ }
+ }
+--- a/azureus3/src/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
++++ b/azureus3/src/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
+@@ -23,7 +23,7 @@
+ import java.util.Date;
+ import java.util.StringTokenizer;
+
+-import org.apache.commons.lang.*;
++import org.apache.commons.lang3.*;
+ import org.gudy.azureus2.core3.util.Base32;
+ import org.gudy.azureus2.core3.util.ByteFormatter;
+ import org.gudy.azureus2.core3.util.Debug;
+@@ -88,14 +88,14 @@
+ public void setNameFromHTML(String name) {
+ if(name != null) {
+ name = removeHTMLTags(name);
+- this.name = Entities.HTML40.unescape(name);
++ this.name = StringEscapeUtils.unescapeHtml4(name);
+ }
+ }
+
+ public void setCommentsFromHTML(String comments) {
+ if(comments != null) {
+ comments = removeHTMLTags(comments);
+- comments = Entities.HTML40.unescape(comments);
++ comments = StringEscapeUtils.unescapeHtml4(comments);
+ comments = comments.replaceAll(",", "");
+ comments = comments.replaceAll(" ", "");
+ try{
+@@ -108,7 +108,7 @@
+ public void setCategoryFromHTML(String category) {
+ if(category != null) {
+ category = removeHTMLTags(category);
+- this.category = Entities.HTML40.unescape(category).trim();
++ this.category = StringEscapeUtils.unescapeHtml4(category).trim();
+ /*int separator = this.category.indexOf(">");
+
+ if(separator != -1) {
+@@ -133,7 +133,7 @@
+ public void setNbPeersFromHTML(String nbPeers) {
+ if(nbPeers != null) {
+ nbPeers = removeHTMLTags(nbPeers);
+- String nbPeersS = Entities.HTML40.unescape(nbPeers);
++ String nbPeersS = StringEscapeUtils.unescapeHtml4(nbPeers);
+ nbPeersS = nbPeersS.replaceAll(",", "");
+ nbPeersS = nbPeersS.replaceAll(" ", "");
+ try {
+@@ -148,7 +148,7 @@
+ public void setNbSeedsFromHTML(String nbSeeds) {
+ if(nbSeeds != null) {
+ nbSeeds = removeHTMLTags(nbSeeds);
+- String nbSeedsS = Entities.HTML40.unescape(nbSeeds);
++ String nbSeedsS = StringEscapeUtils.unescapeHtml4(nbSeeds);
+ nbSeedsS = nbSeedsS.replaceAll(",", "");
+ nbSeedsS = nbSeedsS.replaceAll(" ", "");
+ try {
+@@ -163,7 +163,7 @@
+ public void setNbSuperSeedsFromHTML(String nbSuperSeeds) {
+ if(nbSuperSeeds != null) {
+ nbSuperSeeds = removeHTMLTags(nbSuperSeeds);
+- String nbSuperSeedsS = Entities.HTML40.unescape(nbSuperSeeds);
++ String nbSuperSeedsS = StringEscapeUtils.unescapeHtml4(nbSuperSeeds);
+ nbSuperSeedsS = nbSuperSeedsS.replaceAll(",", "");
+ nbSuperSeedsS = nbSuperSeedsS.replaceAll(" ", "");
+ try {
+@@ -230,7 +230,7 @@
+ public void setPublishedDateFromHTML(String publishedDate) {
+ if(publishedDate != null) {
+ publishedDate = removeHTMLTags(publishedDate);
+- String publishedDateS = Entities.HTML40.unescape(publishedDate).replace((char)160,(char)32);
++ String publishedDateS = StringEscapeUtils.unescapeHtml4(publishedDate).replace((char)160,(char)32);
+ this.publishedDate = dateParser.parseDate(publishedDateS);
+ }
+ }
+@@ -239,7 +239,7 @@
+ public void setSizeFromHTML(String size) {
+ if(size != null) {
+ size = removeHTMLTags(size);
+- String sizeS = Entities.HTML40.unescape(size).replace((char)160,(char)32);
++ String sizeS = StringEscapeUtils.unescapeHtml4(size).replace((char)160,(char)32);
+ sizeS = sizeS.replaceAll("<[^>]+>", " ");
+ //Add a space between the digits and unit if there is none
+ sizeS = sizeS.replaceFirst("(\\d)([a-zA-Z])", "$1 $2");
+@@ -285,7 +285,7 @@
+ public void setVotesFromHTML(String votes_str) {
+ if(votes_str != null) {
+ votes_str = removeHTMLTags(votes_str);
+- votes_str = Entities.HTML40.unescape(votes_str);
++ votes_str = StringEscapeUtils.unescapeHtml4(votes_str);
+ votes_str = votes_str.replaceAll(",", "");
+ votes_str = votes_str.replaceAll(" ", "");
+ try {
+@@ -299,7 +299,7 @@
+ public void setVotesDownFromHTML(String votes_str) {
+ if(votes_str != null) {
+ votes_str = removeHTMLTags(votes_str);
+- votes_str = Entities.HTML40.unescape(votes_str);
++ votes_str = StringEscapeUtils.unescapeHtml4(votes_str);
+ votes_str = votes_str.replaceAll(",", "");
+ votes_str = votes_str.replaceAll(" ", "");
+ try {
+--- a/build.xml
++++ b/build.xml
+@@ -32,7 +32,7 @@
+ <!-- REUSABLE REFERENCES -->
+
+ <path id="build.classpath">
+- <fileset dir="/usr/share/java" includes="swt-gtk-4.3.jar,commons-cli.jar,log4j-1.2.jar,junit4.jar,json-simple.jar" />
++ <fileset dir="/usr/share/java" includes="swt-gtk-4.3.jar,commons-cli.jar,log4j-1.2.jar,junit4.jar,json-simple.jar,commons-lang3.jar" />
+ <!--<fileset dir="${azureus2.dir}/lib" includes="*.jar" excludes="swt-carbon.jar"/>
+ <fileset dir="${azureus3.dir}/lib" includes="*.jar" />
+ <fileset dir="${uis.dir}/lib" includes="*.jar" />-->
diff --git a/debian/patches/06_unbundle_bouncy_castle.patch b/debian/patches/06_unbundle_bouncy_castle.patch
new file mode 100644
index 0000000..0a9ca74
--- /dev/null
+++ b/debian/patches/06_unbundle_bouncy_castle.patch
@@ -0,0 +1,237 @@
+--- a/azureus2/src/com/aelitis/azureus/core/security/impl/CryptoSTSEngineImpl.java
++++ b/azureus2/src/com/aelitis/azureus/core/security/impl/CryptoSTSEngineImpl.java
+@@ -30,10 +30,12 @@
+ import java.security.PrivateKey;
+ import java.security.PublicKey;
+ import java.security.SecureRandom;
++import java.security.Security;
+ import java.security.Signature;
+
++import javax.crypto.KeyAgreement;
++
+ import org.bouncycastle.jce.provider.BouncyCastleProvider;
+-import org.bouncycastle.jce.provider.JCEECDHKeyAgreement;
+
+ import com.aelitis.azureus.core.security.CryptoECCUtils;
+ import com.aelitis.azureus.core.security.CryptoManagerException;
+@@ -56,9 +58,9 @@
+ private PrivateKey myPrivateKey;
+ private PublicKey remotePubKey;
+ private byte[] sharedSecret;
+-
+- private InternalDH ecDH;
+-
++
++ private KeyAgreement ecDH;
++
+ /**
+ *
+ * @param myIdent keypair representing our current identity
+@@ -76,10 +78,8 @@
+ ephemeralKeyPair = CryptoECCUtils.createKeys();
+
+ try{
+- ecDH = new InternalDH();
+-
+- //ecDH = KeyAgreement.getInstance("ECDH", BouncyCastleProvider.PROVIDER_NAME);
+-
++ Security.addProvider(new BouncyCastleProvider());
++ ecDH = KeyAgreement.getInstance("ECDH");
+ ecDH.init(ephemeralKeyPair.getPrivate());
+
+ }catch (Exception e){
+@@ -402,38 +402,5 @@
+ throw( new CryptoManagerException( "Failed to put byte[]", e ));
+ }
+ }
+-
+- class
+- InternalDH
+- extends JCEECDHKeyAgreement.DH
+- {
+- // we use this class to obtain compatability with BC
+-
+- public void
+- init(
+- Key key )
+-
+- throws InvalidKeyException, InvalidAlgorithmParameterException
+- {
+- engineInit( key, null );
+- }
+-
+- public Key
+- doPhase(
+- Key key,
+- boolean lastPhase )
+-
+- throws InvalidKeyException, IllegalStateException
+- {
+- return( engineDoPhase( key, lastPhase ));
+- }
++}
+
+- public byte[]
+- generateSecret()
+-
+- throws IllegalStateException
+- {
+- return( engineGenerateSecret());
+- }
+- }
+-}
+\ No newline at end of file
+--- a/azureus2/src/org/gudy/azureus2/core3/security/impl/SESecurityManagerBC.java
++++ b/azureus2/src/org/gudy/azureus2/core3/security/impl/SESecurityManagerBC.java
+@@ -39,6 +39,7 @@
+ import org.bouncycastle.jce.*;
+ import org.bouncycastle.jce.provider.BouncyCastleProvider;
+ import org.bouncycastle.asn1.x509.X509Name;
++import org.bouncycastle.x509.X509V3CertificateGenerator;
+ import org.gudy.azureus2.core3.util.Constants;
+ import org.gudy.azureus2.core3.util.Debug;
+ import org.gudy.azureus2.core3.util.RandomUtils;
+--- a/build.xml
++++ b/build.xml
+@@ -32,7 +32,7 @@
+ <!-- REUSABLE REFERENCES -->
+
+ <path id="build.classpath">
+- <fileset dir="/usr/share/java" includes="swt-gtk-4.3.jar,commons-cli.jar,log4j-1.2.jar,junit4.jar,json-simple.jar,commons-lang3.jar" />
++ <fileset dir="/usr/share/java" includes="swt-gtk-4.3.jar,commons-cli.jar,log4j-1.2.jar,junit4.jar,json-simple.jar,commons-lang3.jar, bcprov.jar" />
+ <!--<fileset dir="${azureus2.dir}/lib" includes="*.jar" excludes="swt-carbon.jar"/>
+ <fileset dir="${azureus3.dir}/lib" includes="*.jar" />
+ <fileset dir="${uis.dir}/lib" includes="*.jar" />-->
+--- a/azureus2/src/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java
++++ b/azureus2/src/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java
+@@ -36,7 +36,6 @@
+ import org.bouncycastle.crypto.encodings.PKCS1Encoding;
+ import org.bouncycastle.crypto.engines.RSAEngine;
+ import org.bouncycastle.crypto.params.ParametersWithRandom;
+-import org.bouncycastle.jce.provider.RSAUtil;
+ import org.gudy.azureus2.core3.util.Debug;
+ import org.gudy.azureus2.core3.util.RandomUtils;
+ import org.gudy.azureus2.plugins.utils.StaticUtilities;
+@@ -83,29 +82,11 @@
+
+ byte[] secret_bytes = session_key.getEncoded();
+
+- try{
+ Cipher rsa_cipher = Cipher.getInstance( "RSA" );
+
+ rsa_cipher.init( Cipher.ENCRYPT_MODE, public_key );
+
+ encryped_session_key = rsa_cipher.doFinal( secret_bytes );
+-
+- }catch( Throwable e ){
+-
+- // fallback to the BC implementation for jdk1.4.2 as JCE RSA not available
+-
+- RSAEngine eng = new RSAEngine();
+-
+- PKCS1Encoding padded_eng = new PKCS1Encoding( eng );
+-
+- CipherParameters param = RSAUtil.generatePublicKeyParameter(public_key);
+-
+- param = new ParametersWithRandom(param, RandomUtils.SECURE_RANDOM);
+-
+- padded_eng.init( true, param );
+-
+- encryped_session_key = padded_eng.processBlock(secret_bytes, 0, secret_bytes.length);
+- }
+
+ }catch( Throwable e ){
+
+--- a/azureus2/src/com/aelitis/azureus/core/security/impl/CryptoHandlerECC.java
++++ b/azureus2/src/com/aelitis/azureus/core/security/impl/CryptoHandlerECC.java
+@@ -29,6 +29,7 @@
+ import java.security.PrivateKey;
+ import java.security.PublicKey;
+ import java.security.SecureRandom;
++import java.security.Security;
+ import java.security.Signature;
+ import java.security.spec.AlgorithmParameterSpec;
+ import java.util.Arrays;
+@@ -37,7 +38,7 @@
+ import javax.crypto.Cipher;
+ import javax.crypto.IllegalBlockSizeException;
+
+-import org.bouncycastle.jce.provider.JCEIESCipher;
++import org.bouncycastle.jce.provider.BouncyCastleProvider;
+ import org.bouncycastle.jce.spec.IEKeySpec;
+ import org.bouncycastle.jce.spec.IESParameterSpec;
+ import org.gudy.azureus2.core3.config.COConfigurationManager;
+@@ -79,6 +80,7 @@
+ CryptoManagerImpl _manager,
+ int _instance_id )
+ {
++ Security.addProvider(new BouncyCastleProvider());
+ manager = _manager;
+
+ CONFIG_PREFIX += _instance_id + ".";
+@@ -225,11 +227,11 @@
+
+ IESParameterSpec param = new IESParameterSpec( d, e, 128);
+
+- InternalECIES cipher = new InternalECIES();
++ Cipher cipher = Cipher.getInstance("ECIES");
+
+- cipher.internalEngineInit( Cipher.ENCRYPT_MODE, key_spec, param, null );
++ cipher.init( Cipher.ENCRYPT_MODE, key_spec, param, null );
+
+- byte[] encrypted = cipher.internalEngineDoFinal(data, 0, data.length );
++ byte[] encrypted = cipher.doFinal(data, 0, data.length );
+
+ byte[] result = new byte[32+encrypted.length];
+
+@@ -267,12 +269,9 @@
+ System.arraycopy( data, 16, e, 0, 16 );
+
+ IESParameterSpec param = new IESParameterSpec( d, e, 128);
+-
+- InternalECIES cipher = new InternalECIES();
+-
+- cipher.internalEngineInit( Cipher.DECRYPT_MODE, key_spec, param, null );
+-
+- return( cipher.internalEngineDoFinal( data, 32, data.length - 32 ));
++ Cipher cipher = Cipher.getInstance("ECIES");
++ cipher.init( Cipher.DECRYPT_MODE, key_spec, param, null );
++ return( cipher.doFinal( data, 32, data.length - 32 ));
+
+ }catch( CryptoManagerException e ){
+
+@@ -859,33 +858,5 @@
+ {
+ return((int)COConfigurationManager.getIntParameter( CONFIG_PREFIX + "pwtype", CryptoManagerPasswordHandler.HANDLER_TYPE_USER ));
+ }
+-
+- class InternalECIES
+- extends JCEIESCipher.ECIES
+- {
+- // we use this class to obtain compatability with BC
+-
+- public void
+- internalEngineInit(
+- int opmode,
+- Key key,
+- AlgorithmParameterSpec params,
+- SecureRandom random )
+-
+- throws InvalidKeyException, InvalidAlgorithmParameterException
+- {
+- engineInit(opmode, key, params, random);
+- }
+-
+- protected byte[]
+- internalEngineDoFinal(
+- byte[] input,
+- int inputOffset,
+- int inputLen )
+-
+- throws IllegalBlockSizeException, BadPaddingException
+- {
+- return engineDoFinal(input, inputOffset, inputLen);
+- }
+- }
+ }
++
diff --git a/debian/patches/07_platform.patch b/debian/patches/07_platform.patch
new file mode 100644
index 0000000..4c162cc
--- /dev/null
+++ b/debian/patches/07_platform.patch
@@ -0,0 +1,86 @@
+# Description: Remove the Windows and OSX platform specific code causing a FTBFS.
+# Author: Adrian Perez <adrianperez.deb at gmail.com>
+# Forwarded: no
+# Last-Update: 2014-06-23
+--- a/azureus2/src/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java
++++ b/azureus2/src/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java
+@@ -30,8 +30,10 @@
+ import org.gudy.azureus2.platform.PlatformManager;
+ import org.gudy.azureus2.platform.PlatformManagerFactory;
+ import org.gudy.azureus2.platform.unix.ScriptAfterShutdown;
++/* --- Adrian Perez: Don't import this when building for Linux.
+ import org.gudy.azureus2.platform.win32.access.AEWin32Access;
+ import org.gudy.azureus2.platform.win32.access.AEWin32Manager;
++*/
+ import org.gudy.azureus2.plugins.PluginInterface;
+ import org.gudy.azureus2.plugins.platform.PlatformManagerException;
+ import org.gudy.azureus2.pluginsimpl.local.PluginInitializer;
+@@ -317,7 +319,8 @@
+ }
+
+ try {
+- int result;
++ int result = -123; // Adrian Perez: Evade Win32 logic, key: "nowin32"
++/*
+ AEWin32Access accessor = AEWin32Manager.getAccessor(true);
+ if (accessor == null) {
+ result = -123;
+@@ -372,6 +375,7 @@
+ SystemProperties.getApplicationPath(), AEWin32Access.SW_NORMAL);
+ }
+ }
++*/
+
+ /*
+ * Some results:
+--- a/azureus2/src/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java
++++ b/azureus2/src/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java
+@@ -24,6 +24,10 @@
+
+ import org.gudy.azureus2.platform.unix.PlatformManagerUnixPlugin;
+
++/* --- Adrian Perez: Don't use Win32 UpdateChecker in Linux.
++import org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker;
++*/
++
+ import org.gudy.azureus2.plugins.Plugin;
+ import org.gudy.azureus2.plugins.PluginException;
+ import org.gudy.azureus2.plugins.PluginInterface;
+@@ -54,16 +58,21 @@
+ PlatformManager platform = PlatformManagerFactory.getPlatformManager();
+
+ int platformType = platform.getPlatformType();
+- if ( platformType == PlatformManager.PT_WINDOWS ){
++
++ /* Adrian Perez:
++ * We're not in Windows or MacOS
++ *
++ if ( platformType == PlatformManager.PT_WINDOWS ){
+ org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker plugin = new org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker();
+ plugin.initialize(pluginInterface);
+ }else if ( platformType == PlatformManager.PT_MACOSX ){
+ org.gudy.azureus2.platform.macosx.PlatformManagerUpdateChecker plugin = new org.gudy.azureus2.platform.macosx.PlatformManagerUpdateChecker();
+ plugin.initialize(pluginInterface);
+- }else if ( platformType == PlatformManager.PT_UNIX ){
++ */
++ if ( platformType == PlatformManager.PT_UNIX ){
+ PlatformManagerUnixPlugin plugin = new PlatformManagerUnixPlugin();
+ plugin.initialize(pluginInterface);
+- }else{
++ } else {
+ Properties pluginProperties = pluginInterface.getPluginProperties();
+ pluginProperties.setProperty("plugin.name", "Platform-Specific Support");
+ pluginProperties.setProperty("plugin.version", "1.0");
+--- a/azureus2/src/org/gudy/azureus2/platform/PlatformManagerFactory.java
++++ b/azureus2/src/org/gudy/azureus2/platform/PlatformManagerFactory.java
+@@ -58,10 +58,6 @@
+ if ( getPlatformType() == PlatformManager.PT_WINDOWS ){
+
+ platform_manager = org.gudy.azureus2.platform.win32.PlatformManagerImpl.getSingleton();
+-
+- }else if( getPlatformType() == PlatformManager.PT_MACOSX ){
+-
+- platform_manager = org.gudy.azureus2.platform.macosx.PlatformManagerImpl.getSingleton();
+
+ }else if( getPlatformType() == PlatformManager.PT_UNIX ){
+
diff --git a/debian/patches/08_multi_user.patch b/debian/patches/08_multi_user.patch
new file mode 100644
index 0000000..9581a1c
--- /dev/null
+++ b/debian/patches/08_multi_user.patch
@@ -0,0 +1,183 @@
+# Description: Allow one single instance of Azureus per user, instead of one per
+# machine. Add authentication to the control interface.
+# Author: Stefano Maioli <smaioli at gmx.com>
+# Bug-Debian: http://bugs.debian.org/329018
+# Bug-Ubuntu: https://bugs.launchpad.net/222630
+# Acked-by: Onkar Shinde <onkarshinde at ubuntu.com>
+# Acked-by: Adrian Perez <adrianperez.deb at gmail.com>
+
+--- /dev/null
++++ b/azureus2/src/org/gudy/azureus2/core3/util/LocalSocketHelper.java
+@@ -0,0 +1,128 @@
++/*
++ * Created on Aug 24, 2008
++ * Created by Stefano Maioli
++ * Copyright (C) 2008 Stefano Maioli, All Rights Reserved.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ */
++
++package org.gudy.azureus2.core3.util;
++
++import java.io.*;
++import java.net.*;
++
++/**
++ *
++ * @author Stefano Maioli
++ */
++public class LocalSocketHelper {
++
++ static private LocalSocketHelper helper = null;
++
++ private int port;
++ private long key;
++ private boolean wasLocked;
++ private File lock;
++ private ServerSocket listenSocket = null;
++ private Socket outSocket = null;
++
++ private LocalSocketHelper() throws IOException {
++ String path = SystemProperties.getUserPath();
++ lock = new File(path, "localport.lock");
++ if(lock.exists()) {
++ DataInputStream inlock = new DataInputStream(new FileInputStream(lock));
++ port = inlock.readInt();
++ key = inlock.readLong();
++ inlock.close();
++ wasLocked = true;
++ } else {
++ key = new java.util.Random().nextLong();
++ do {
++ port = (int)(Math.random()*(65535-49152) + 49152);
++ try {
++ listenSocket = new AuthServerSocket(port, 50, InetAddress.getByName("127.0.0.1"));
++ } catch(BindException ex) { listenSocket.close(); }
++ } while(!listenSocket.isBound());
++
++ DataOutputStream outlock = new DataOutputStream(
++ new BufferedOutputStream(new FileOutputStream(lock)));
++ outlock.writeInt(port);
++ outlock.writeLong(key);
++ outlock.close();
++ lock.deleteOnExit();
++ wasLocked = false;
++ }
++ }
++
++ public static Socket connect() throws IOException {
++ if(helper == null) helper = new LocalSocketHelper();
++ if(helper.outSocket != null && helper.outSocket.isConnected())
++ return helper.outSocket;
++
++ if(!helper.wasLocked) throw new IOException("No previous instance to connect to.");
++
++ Socket s;
++ try {
++ s = new Socket("127.0.0.1", helper.port);
++ DataOutputStream out = new DataOutputStream(s.getOutputStream());
++ DataInputStream in = new DataInputStream(s.getInputStream());
++ out.writeLong(helper.key);
++ out.flush();
++ in.readByte();
++ } catch(IOException ex) {
++ helper.lock.delete();
++ helper = new LocalSocketHelper();
++ throw ex;
++ }
++ helper.outSocket = s;
++
++ return s;
++ }
++
++ public static ServerSocket listen() throws IOException {
++ try {
++ connect();
++ } catch(IOException ex) {}
++ if(helper.listenSocket != null)
++ return helper.listenSocket;
++ else {
++ throw new IOException("Other instance detected");
++ }
++ }
++
++ private class AuthServerSocket extends ServerSocket {
++
++ public AuthServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException {
++ super(port, backlog, bindAddr);
++ }
++
++ //@Override
++ public Socket accept() throws IOException {
++ Socket s = super.accept();
++ DataInputStream in = new DataInputStream(s.getInputStream());
++ if(in.readLong() != key) {
++ in.close();
++ throw new SocketException("Connection closed: invalid authentication");
++ }
++ DataOutputStream out = new DataOutputStream(s.getOutputStream());
++ out.writeByte(1);
++ out.flush();
++ return s;
++ }
++
++ //@Override
++ public void close() throws IOException {
++ }
++
++ }
++}
+--- a/azureus2/src/org/gudy/azureus2/core3/util/RandomUtils.java
++++ b/azureus2/src/org/gudy/azureus2/core3/util/RandomUtils.java
+@@ -80,7 +80,7 @@
+
+
+ public static final int LISTEN_PORT_MIN = 10000;
+- public static final int LISTEN_PORT_MAX = 65535;
++ public static final int LISTEN_PORT_MAX = 49151;
+
+
+ /**
+--- a/azureus2/src/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnection.java
++++ b/azureus2/src/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnection.java
+@@ -128,7 +128,7 @@
+ label.setLayoutData(gridData);
+
+ final IntParameter udp_listen = new IntParameter(cMiniArea,
+- "UDP.Listen.Port", 1, 65535);
++ "UDP.Listen.Port", 1, 49151);
+ gridData = new GridData();
+ udp_listen.setLayoutData(gridData);
+
+--- a/azureus2/src/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnectionAdvanced.java
++++ b/azureus2/src/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnectionAdvanced.java
+@@ -190,7 +190,7 @@
+ Label lpbind = new Label(gSocket, SWT.NULL);
+ Messages.setLanguageText(lpbind, CFG_PREFIX + "bind_port");
+ final IntParameter port_bind = new IntParameter(gSocket,
+- "network.bind.local.port", 0, 65535);
++ "network.bind.local.port", 0, 49151);
+ gridData = new GridData();
+ gridData.horizontalSpan = 2;
+ port_bind.setLayoutData(gridData);
+--- a/azureus2/src/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionTrackerClient.java
++++ b/azureus2/src/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionTrackerClient.java
+@@ -220,7 +220,7 @@
+ try
+ {
+ int portVal = Integer.parseInt(toValue);
+- if(portVal >= 0 && portVal <= 65535)
++ if(portVal >= 0 && portVal <= 49151)
+ return;
+ } catch (NumberFormatException e) {}
+ p.setValue("");
diff --git a/debian/patches/debian/no-auto-update.patch b/debian/patches/09_no_auto_update.patch
similarity index 51%
rename from debian/patches/debian/no-auto-update.patch
rename to debian/patches/09_no_auto_update.patch
index c4275fe..00c4eb7 100644
--- a/debian/patches/debian/no-auto-update.patch
+++ b/debian/patches/09_no_auto_update.patch
@@ -1,13 +1,13 @@
-Disable auto-updates of the azureus platform, since we want to use debian packages
-to manage updates instead.
-
-Index: azureus/org/gudy/azureus2/core3/config/impl/ConfigurationDefaults.java
-===================================================================
---- azureus.orig/org/gudy/azureus2/core3/config/impl/ConfigurationDefaults.java 2011-06-07 22:07:05.588553689 +0100
-+++ azureus/org/gudy/azureus2/core3/config/impl/ConfigurationDefaults.java 2011-06-07 22:07:57.567719664 +0100
-@@ -231,9 +231,9 @@
- File f = new File(docPath, "Azureus Downloads");
- def.put("Default save path", f.getAbsolutePath());
+# Description: Disable auto-updates of the azureus platform, since we want to use debian packages
+# to manage updates instead.
+# Author: Adrian Perez <adrianperez.deb at gmail.com>
+# Forwarded: no
+# Last-Update: 2014-06-23
+--- a/azureus2/src/org/gudy/azureus2/core3/config/impl/ConfigurationDefaults.java
++++ b/azureus2/src/org/gudy/azureus2/core3/config/impl/ConfigurationDefaults.java
+@@ -276,9 +276,9 @@
+
+ def.put("Default save path", f.getAbsolutePath());
- def.put("update.start",TRUE);
- def.put("update.periodic",TRUE);
@@ -18,20 +18,18 @@ Index: azureus/org/gudy/azureus2/core3/config/impl/ConfigurationDefaults.java
def.put("update.autodownload", FALSE);
def.put("Send Version Info", TRUE);
-@@ -430,7 +430,7 @@
+@@ -488,7 +488,7 @@
+ def.put( "locale", Locale.getDefault().toString() );
def.put( "locale.set.complete.count", ZERO);
- def.put( "Confirm Data Delete", TRUE );
def.put( "Password Confirm", null );
- def.put( "Auto Update", TRUE );
+ def.put( "Auto Update", FALSE );
def.put( "Alert on close", FALSE );
def.put( "diskmanager.friendly.hashchecking", FALSE );
def.put( "diskmanager.hashchecking.smallestfirst", TRUE );
-Index: azureus/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
-===================================================================
---- azureus.orig/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java 2011-06-07 22:15:58.037720459 +0100
-+++ azureus/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java 2011-06-07 22:23:03.417720345 +0100
-@@ -86,7 +86,7 @@
+--- a/azureus2/src/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
++++ b/azureus2/src/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
+@@ -93,7 +93,7 @@
final PluginConfig plugin_config = plugin_interface.getPluginconfig();
@@ -40,7 +38,7 @@ Index: azureus/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
model.setConfigSectionID(PLUGIN_CONFIGSECTION_ID);
model.getStatus().setText( enabled?"Running":"Optional checks disabled" );
-@@ -115,7 +115,7 @@
+@@ -122,7 +122,7 @@
BasicPluginConfigModel config = ui_manager.createBasicPluginConfigModel(ConfigSection.SECTION_PLUGINS, PLUGIN_CONFIGSECTION_ID);
@@ -49,16 +47,14 @@ Index: azureus/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
plugin_interface.addEventListener(
new PluginEventListener()
-Index: azureus/com/aelitis/azureus/ui/swt/UIConfigDefaultsSWTv3.java
-===================================================================
---- azureus.orig/com/aelitis/azureus/ui/swt/UIConfigDefaultsSWTv3.java 2011-06-07 22:19:06.657720379 +0100
-+++ azureus/com/aelitis/azureus/ui/swt/UIConfigDefaultsSWTv3.java 2011-06-07 22:19:22.817720827 +0100
-@@ -137,7 +137,7 @@
+--- a/azureus3/src/com/aelitis/azureus/ui/swt/UIConfigDefaultsSWTv3.java
++++ b/azureus3/src/com/aelitis/azureus/ui/swt/UIConfigDefaultsSWTv3.java
+@@ -142,7 +142,7 @@
defaults.addParameter("window.maximized", true);
- defaults.addParameter("update.autodownload", true);
+ defaults.addParameter("update.autodownload", false);
- defaults.addParameter("suppress_file_download_dialog", true);
+ //defaults.addParameter("suppress_file_download_dialog", true);
diff --git a/debian/patches/debian/update-disable.diff b/debian/patches/debian/update-disable.diff
deleted file mode 100644
index cd058e0..0000000
--- a/debian/patches/debian/update-disable.diff
+++ /dev/null
@@ -1,116 +0,0 @@
-From: Adrian Perez <adrianperez.deb at gmail.com>
-Subject: [PATCH] debian/update-disable
-
-Prevent the automatic update of several components, specially the Core and the
-SWT libraries; avoids sync breakage with the Debian repositories.
-
-Signed-off-by: Adrian Perez <adrianperez.deb at gmail.com>
-
----
- com/aelitis/azureus/ui/swt/Initializer.java | 8 ++++++--
- .../azureus2/ui/swt/mainwindow/Initializer.java | 8 ++++++--
- org/gudy/azureus2/update/CorePatchChecker.java | 6 +++++-
- org/gudy/azureus2/update/CoreUpdateChecker.java | 5 ++++-
- 4 files changed, 21 insertions(+), 6 deletions(-)
-
-diff --git a/com/aelitis/azureus/ui/swt/Initializer.java b/com/aelitis/azureus/ui/swt/Initializer.java
-index 8a959c4..9069f3d 100644
---- a/com/aelitis/azureus/ui/swt/Initializer.java
-+++ b/com/aelitis/azureus/ui/swt/Initializer.java
-@@ -44,9 +44,10 @@ import org.gudy.azureus2.ui.swt.networks.SWTNetworkSelection;
- import org.gudy.azureus2.ui.swt.pluginsinstaller.InstallPluginWizard;
- import org.gudy.azureus2.ui.swt.progress.ProgressWindow;
- import org.gudy.azureus2.ui.swt.update.UpdateMonitor;
-+/* --- Adrian Perez: Don't initialize SWTUpdateChecker in Debian.
- import org.gudy.azureus2.ui.swt.updater2.PreUpdateChecker;
- import org.gudy.azureus2.ui.swt.updater2.SWTUpdateChecker;
--
-+*/
- import com.aelitis.azureus.core.*;
- import com.aelitis.azureus.core.cnetwork.ContentNetwork;
- import com.aelitis.azureus.core.messenger.ClientMessageContext;
-@@ -358,12 +359,15 @@ public class Initializer
- }
-
- reportCurrentTaskByKey("splash.openViews");
--
-+/*
-+ * Adrian Perez: Don't initialize SWTUpdateChecker in Debian
-+ *
- SWTUpdateChecker.initialize();
-
- PreUpdateChecker.initialize(core,
- COConfigurationManager.getStringParameter("ui"));
-
-+*/
- UpdateMonitor.getSingleton(core); // setup the update monitor
-
- //Tell listeners that all is initialized :
-diff --git a/org/gudy/azureus2/ui/swt/mainwindow/Initializer.java b/org/gudy/azureus2/ui/swt/mainwindow/Initializer.java
-index 620829f..d9e4478 100644
---- a/org/gudy/azureus2/ui/swt/mainwindow/Initializer.java
-+++ b/org/gudy/azureus2/ui/swt/mainwindow/Initializer.java
-@@ -45,9 +45,10 @@ import org.gudy.azureus2.ui.swt.networks.SWTNetworkSelection;
- import org.gudy.azureus2.ui.swt.pluginsinstaller.InstallPluginWizard;
- import org.gudy.azureus2.ui.swt.progress.ProgressWindow;
- import org.gudy.azureus2.ui.swt.update.UpdateMonitor;
-+/* --- Adrian Perez: Don't initialize SWTUpdateChecker in Debian.
- import org.gudy.azureus2.ui.swt.updater2.PreUpdateChecker;
- import org.gudy.azureus2.ui.swt.updater2.SWTUpdateChecker;
--
-+*/
- import com.aelitis.azureus.core.*;
- import com.aelitis.azureus.core.util.CopyOnWriteList;
- import com.aelitis.azureus.launcher.Launcher;
-@@ -253,11 +254,14 @@ Initializer
-
- if (finalLogListener != null)
- Logger.removeListener(finalLogListener);
--
-+/*
-+ * Adrian Perez: Don't initialize SWTUpdateChecker in Debian.
-+ *
- SWTUpdateChecker.initialize();
-
- PreUpdateChecker.initialize( core, COConfigurationManager.getStringParameter("ui"));
-
-+*/
- UpdateMonitor.getSingleton(core); // setup the update monitor
-
- //Tell listeners that all is initialized :
-diff --git a/org/gudy/azureus2/update/CorePatchChecker.java b/org/gudy/azureus2/update/CorePatchChecker.java
-index 82fd9ae..b87f55a 100644
---- a/org/gudy/azureus2/update/CorePatchChecker.java
-+++ b/org/gudy/azureus2/update/CorePatchChecker.java
-@@ -65,7 +65,11 @@ CorePatchChecker
- System.out.println( "CorePatchChecker: TESTING !!!!" );
- }
-
-- plugin_interface.getUpdateManager().registerUpdatableComponent( this, false );
-+ /*
-+ * Adrian Perez: Don't register Core Patcher in Debian
-+ *
-+ * plugin_interface.getUpdateManager().registerUpdatableComponent( this, false );
-+ */
- }
- }
-
-diff --git a/org/gudy/azureus2/update/CoreUpdateChecker.java b/org/gudy/azureus2/update/CoreUpdateChecker.java
-index a19e928..75dd887 100644
---- a/org/gudy/azureus2/update/CoreUpdateChecker.java
-+++ b/org/gudy/azureus2/update/CoreUpdateChecker.java
-@@ -127,8 +127,11 @@ CoreUpdateChecker
- props.setProperty( "plugin.version", plugin_interface.getAzureusVersion());
-
- rdf = plugin_interface.getUtilities().getResourceDownloaderFactory();
--
-+ /*
-+ * Adrian Perez: Don't update Azureus Core in Debian.
-+ *
- plugin_interface.getUpdateManager().registerUpdatableComponent( this, true );
-+ */
- }
-
- public String
---
-tg: (3001c78..) debian/update-disable (depends on: upstream)
diff --git a/debian/patches/fixes/multiuser.diff b/debian/patches/fixes/multiuser.diff
deleted file mode 100644
index 45f86ec..0000000
--- a/debian/patches/fixes/multiuser.diff
+++ /dev/null
@@ -1,521 +0,0 @@
-From: Stefano Maioli <smaioli at gmx.com>
-Subject: [PATCH] fixes/multiuser
-
-Allow one single instance of Azureus per user, instead of one per
-machine. Add authentication to the control interface.
-
-Bug-Debian: http://bugs.debian.org/329018
-Bug-Ubuntu: https://bugs.launchpad.net/222630
-Acked-by: Onkar Shinde <onkarshinde at ubuntu.com>
-Signed-off-by: Adrian Perez <adrianperez.deb at gmail.com>
-
----
- .../core/impl/AzureusCoreSingleInstanceClient.java | 8 +-
- .../impl/tcp/IncomingSocketChannelManager.java | 2 +-
- .../networkmanager/impl/udp/UDPNetworkManager.java | 4 +-
- .../core3/config/impl/ConfigurationChecker.java | 2 +-
- .../core3/ipchecker/natchecker/NatChecker.java | 2 +-
- .../azureus2/core3/util/LocalSocketHelper.java | 128 ++++++++++++++++++++
- org/gudy/azureus2/core3/util/RandomUtils.java | 2 +-
- .../platform/unix/ScriptBeforeStartup.java | 2 +-
- org/gudy/azureus2/ui/common/Main.java | 2 +-
- org/gudy/azureus2/ui/common/StartServer.java | 6 +-
- org/gudy/azureus2/ui/swt/Main.java | 4 +-
- org/gudy/azureus2/ui/swt/StartServer.java | 6 +-
- org/gudy/azureus2/ui/swt/StartSocket.java | 4 +-
- org/gudy/azureus2/ui/swt/osx/Start.java | 2 +-
- .../azureus2/ui/swt/updater/snippets/Main.java | 2 +-
- .../azureus2/ui/swt/updater/snippets/Started.java | 4 +-
- .../configsections/ConfigSectionConnection.java | 18 ++--
- .../ConfigSectionConnectionAdvanced.java | 2 +-
- .../configsections/ConfigSectionTrackerClient.java | 2 +-
- 19 files changed, 164 insertions(+), 38 deletions(-)
-
-diff --git a/com/aelitis/azureus/core/impl/AzureusCoreSingleInstanceClient.java b/com/aelitis/azureus/core/impl/AzureusCoreSingleInstanceClient.java
-index ada3ce6..a9b92d2 100644
---- a/com/aelitis/azureus/core/impl/AzureusCoreSingleInstanceClient.java
-+++ b/com/aelitis/azureus/core/impl/AzureusCoreSingleInstanceClient.java
-@@ -29,8 +29,8 @@ import java.io.*;
- /**
- * Single instance management is a bit of a mess. For some reason the UIs have their own implementations of clients and servers.
- * We also have a more generic plugin-accessible single instance service that can be used by launchable plugins but don't give
-- * a generic mechanism for dealing with the basic mechanism used by the UIs (that run on 6880).
-- * I have introduced this class to give a programmatic way of passing arguments using the existing 6880 port. Perhaps one day
-+ * a generic mechanism for dealing with the basic mechanism used by the UIs (that run on main local port).
-+ * I have introduced this class to give a programmatic way of passing arguments using the existing local port. Perhaps one day
- * the various UI implementations will be rewritten to use this...
- * @author Parg
- */
-@@ -69,9 +69,7 @@ AzureusCoreSingleInstanceClient
- Socket sock = null;
-
- try{
-- sock = new Socket();
--
-- sock.connect( new InetSocketAddress( "127.0.0.1", 6880 ), CONNECT_TIMEOUT );
-+ sock = org.gudy.azureus2.core3.util.LocalSocketHelper.connect();
-
- sock.setSoTimeout( READ_TIMEOUT );
-
-diff --git a/com/aelitis/azureus/core/networkmanager/impl/tcp/IncomingSocketChannelManager.java b/com/aelitis/azureus/core/networkmanager/impl/tcp/IncomingSocketChannelManager.java
-index d74e5ef..4189790 100644
---- a/com/aelitis/azureus/core/networkmanager/impl/tcp/IncomingSocketChannelManager.java
-+++ b/com/aelitis/azureus/core/networkmanager/impl/tcp/IncomingSocketChannelManager.java
-@@ -370,7 +370,7 @@ public class IncomingSocketChannelManager
- {
- this_mon.enter();
-
-- if (tcp_listen_port < 0 || tcp_listen_port > 65535 || tcp_listen_port == 6880)
-+ if (tcp_listen_port < 0 || tcp_listen_port >= 49152)
- {
- String msg = "Invalid incoming TCP listen port configured, " + tcp_listen_port + ". Port reset to default. Please check your config!";
- Debug.out(msg);
-diff --git a/com/aelitis/azureus/core/networkmanager/impl/udp/UDPNetworkManager.java b/com/aelitis/azureus/core/networkmanager/impl/udp/UDPNetworkManager.java
-index daa77dd..9354448 100644
---- a/com/aelitis/azureus/core/networkmanager/impl/udp/UDPNetworkManager.java
-+++ b/com/aelitis/azureus/core/networkmanager/impl/udp/UDPNetworkManager.java
-@@ -118,7 +118,7 @@ UDPNetworkManager
- return;
- }
-
-- if ( port < 0 || port > 65535 || port == 6880 ) {
-+ if ( port < 0 || port >= 49152 ) {
-
- String msg = "Invalid incoming UDP listen port configured, " +port+ ". The port has been reset. Please check your config!";
-
-@@ -151,7 +151,7 @@ UDPNetworkManager
- return;
- }
-
-- if ( port < 0 || port > 65535 || port == 6880 ) {
-+ if ( port < 0 || port >= 49152 ) {
-
- String msg = "Invalid incoming UDP non-data listen port configured, " +port+ ". The port has been reset. Please check your config!";
-
-diff --git a/org/gudy/azureus2/core3/config/impl/ConfigurationChecker.java b/org/gudy/azureus2/core3/config/impl/ConfigurationChecker.java
-index 15a1912..d3d70cf 100644
---- a/org/gudy/azureus2/core3/config/impl/ConfigurationChecker.java
-+++ b/org/gudy/azureus2/core3/config/impl/ConfigurationChecker.java
-@@ -454,7 +454,7 @@ ConfigurationChecker
-
- // reset invalid ports - single-instance socket port and (small) magnet uri listener port range
-
-- if ( tcp_port == 6880 || ( tcp_port >= 45100 && tcp_port <= 45103 )){
-+ if ( tcp_port >= 49152 || ( tcp_port >= 45100 && tcp_port <= 45103 )){
-
- int new_tcp_port = RandomUtils.generateRandomNetworkListenPort();
-
-diff --git a/org/gudy/azureus2/core3/ipchecker/natchecker/NatChecker.java b/org/gudy/azureus2/core3/ipchecker/natchecker/NatChecker.java
-index c8aec8d..18138a6 100644
---- a/org/gudy/azureus2/core3/ipchecker/natchecker/NatChecker.java
-+++ b/org/gudy/azureus2/core3/ipchecker/natchecker/NatChecker.java
-@@ -70,7 +70,7 @@ public class NatChecker {
- {
- String check = "azureus_rand_" + String.valueOf( (int)(Math.random() * 100000) );
-
-- if ( port < 0 || port > 65535 || port == 6880 ){
-+ if ( port < 0 || port >= 49152 ){
-
- result = NAT_UNABLE;
-
-diff --git a/org/gudy/azureus2/core3/util/LocalSocketHelper.java b/org/gudy/azureus2/core3/util/LocalSocketHelper.java
-new file mode 100644
-index 0000000..568efaa
---- /dev/null
-+++ b/org/gudy/azureus2/core3/util/LocalSocketHelper.java
-@@ -0,0 +1,128 @@
-+/*
-+ * Created on Aug 24, 2008
-+ * Created by Stefano Maioli
-+ * Copyright (C) 2008 Stefano Maioli, All Rights Reserved.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version 2
-+ * of the License, or (at your option) any later version.
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ */
-+
-+package org.gudy.azureus2.core3.util;
-+
-+import java.io.*;
-+import java.net.*;
-+
-+/**
-+ *
-+ * @author Stefano Maioli
-+ */
-+public class LocalSocketHelper {
-+
-+ static private LocalSocketHelper helper = null;
-+
-+ private int port;
-+ private long key;
-+ private boolean wasLocked;
-+ private File lock;
-+ private ServerSocket listenSocket = null;
-+ private Socket outSocket = null;
-+
-+ private LocalSocketHelper() throws IOException {
-+ String path = SystemProperties.getUserPath();
-+ lock = new File(path, "localport.lock");
-+ if(lock.exists()) {
-+ DataInputStream inlock = new DataInputStream(new FileInputStream(lock));
-+ port = inlock.readInt();
-+ key = inlock.readLong();
-+ inlock.close();
-+ wasLocked = true;
-+ } else {
-+ key = new java.util.Random().nextLong();
-+ do {
-+ port = (int)(Math.random()*(65535-49152) + 49152);
-+ try {
-+ listenSocket = new AuthServerSocket(port, 50, InetAddress.getByName("127.0.0.1"));
-+ } catch(BindException ex) { listenSocket.close(); }
-+ } while(!listenSocket.isBound());
-+
-+ DataOutputStream outlock = new DataOutputStream(
-+ new BufferedOutputStream(new FileOutputStream(lock)));
-+ outlock.writeInt(port);
-+ outlock.writeLong(key);
-+ outlock.close();
-+ lock.deleteOnExit();
-+ wasLocked = false;
-+ }
-+ }
-+
-+ public static Socket connect() throws IOException {
-+ if(helper == null) helper = new LocalSocketHelper();
-+ if(helper.outSocket != null && helper.outSocket.isConnected())
-+ return helper.outSocket;
-+
-+ if(!helper.wasLocked) throw new IOException("No previous instance to connect to.");
-+
-+ Socket s;
-+ try {
-+ s = new Socket("127.0.0.1", helper.port);
-+ DataOutputStream out = new DataOutputStream(s.getOutputStream());
-+ DataInputStream in = new DataInputStream(s.getInputStream());
-+ out.writeLong(helper.key);
-+ out.flush();
-+ in.readByte();
-+ } catch(IOException ex) {
-+ helper.lock.delete();
-+ helper = new LocalSocketHelper();
-+ throw ex;
-+ }
-+ helper.outSocket = s;
-+
-+ return s;
-+ }
-+
-+ public static ServerSocket listen() throws IOException {
-+ try {
-+ connect();
-+ } catch(IOException ex) {}
-+ if(helper.listenSocket != null)
-+ return helper.listenSocket;
-+ else {
-+ throw new IOException("Other instance detected");
-+ }
-+ }
-+
-+ private class AuthServerSocket extends ServerSocket {
-+
-+ public AuthServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException {
-+ super(port, backlog, bindAddr);
-+ }
-+
-+ //@Override
-+ public Socket accept() throws IOException {
-+ Socket s = super.accept();
-+ DataInputStream in = new DataInputStream(s.getInputStream());
-+ if(in.readLong() != key) {
-+ in.close();
-+ throw new SocketException("Connection closed: invalid authentication");
-+ }
-+ DataOutputStream out = new DataOutputStream(s.getOutputStream());
-+ out.writeByte(1);
-+ out.flush();
-+ return s;
-+ }
-+
-+ //@Override
-+ public void close() throws IOException {
-+ }
-+
-+ }
-+}
-diff --git a/org/gudy/azureus2/core3/util/RandomUtils.java b/org/gudy/azureus2/core3/util/RandomUtils.java
-index 210f6ec..12bd5a2 100644
---- a/org/gudy/azureus2/core3/util/RandomUtils.java
-+++ b/org/gudy/azureus2/core3/util/RandomUtils.java
-@@ -70,7 +70,7 @@ RandomUtils
-
-
- public static final int LISTEN_PORT_MIN = 10000;
-- public static final int LISTEN_PORT_MAX = 65535;
-+ public static final int LISTEN_PORT_MAX = 49151;
-
-
- /**
-diff --git a/org/gudy/azureus2/platform/unix/ScriptBeforeStartup.java b/org/gudy/azureus2/platform/unix/ScriptBeforeStartup.java
-index af273a6..e377dd1 100644
---- a/org/gudy/azureus2/platform/unix/ScriptBeforeStartup.java
-+++ b/org/gudy/azureus2/platform/unix/ScriptBeforeStartup.java
-@@ -42,7 +42,7 @@ public class ScriptBeforeStartup
- boolean argsSent = new AzureusCoreSingleInstanceClient().sendArgs(args, 500);
- if (argsSent) {
- // azureus was open..
-- String msg = "Passing startup args to already-running " + Constants.APP_NAME + " java process listening on [127.0.0.1: 6880]";
-+ String msg = "Passing startup args to already-running " + Constants.APP_NAME + " java process";
- log(msg);
- sysout.println("exit");
-
-diff --git a/org/gudy/azureus2/ui/common/Main.java b/org/gudy/azureus2/ui/common/Main.java
-index 40cf3d7..6686913 100644
---- a/org/gudy/azureus2/ui/common/Main.java
-+++ b/org/gudy/azureus2/ui/common/Main.java
-@@ -358,7 +358,7 @@ public class Main {
-
- // NOTE - this formatting is also used by AzureusCoreSingleInstanceClient and other org.gudy.azureus2.ui.swt.StartSocket
-
-- sck = new Socket("127.0.0.1",6880);
-+ sck = org.gudy.azureus2.core3.util.LocalSocketHelper.connect();
- pw = new PrintWriter(new OutputStreamWriter(sck.getOutputStream()));
- StringBuffer buffer = new StringBuffer(AzureusCoreSingleInstanceClient.ACCESS_STRING+";args;");
- for(int i = 0 ; i < args.length ; i++) {
-diff --git a/org/gudy/azureus2/ui/common/StartServer.java b/org/gudy/azureus2/ui/common/StartServer.java
-index c5f5603..3b46395 100644
---- a/org/gudy/azureus2/ui/common/StartServer.java
-+++ b/org/gudy/azureus2/ui/common/StartServer.java
-@@ -35,16 +35,16 @@ public class StartServer extends Thread {
- public StartServer() {
- super("Start Server");
- try {
-- socket = new ServerSocket(6880, 50, InetAddress.getByName("127.0.0.1")); //NOLAR: only bind to localhost
-+ socket = org.gudy.azureus2.core3.util.LocalSocketHelper.listen(); //NOLAR: only bind to localhost
- state = STATE_LISTENING;
-- Logger.getLogger("azureus2").info("StartServer: listening on 127.0.0.1:6880 for passed torrent info");
-+ Logger.getLogger("azureus2").info("StartServer: listening on 127.0.0.1:" + socket.getLocalPort() + " for passed torrent info");
- } catch (Exception e) {
- state = STATE_FAULTY;
-
- // DON'T USE LOGGER here as we DON't want to initialise all the logger stuff
- // and in particular AEDiagnostics config dirty stuff!!!!
-
-- System.out.println( "StartServer ERROR: unable to bind to 127.0.0.1:6880 for passed torrent info");
-+ System.out.println( "StartServer ERROR: unable to bind to a local port for passed torrent info");
- }
- }
-
-diff --git a/org/gudy/azureus2/ui/swt/Main.java b/org/gudy/azureus2/ui/swt/Main.java
-index d9e8463..ccc2588 100644
---- a/org/gudy/azureus2/ui/swt/Main.java
-+++ b/org/gudy/azureus2/ui/swt/Main.java
-@@ -215,13 +215,13 @@ Main
- }
-
-
-- if( another_instance ) { //looks like there's already a process listening on 127.0.0.1:6880
-+ if( another_instance ) { //looks like there's already a process listening
- //attempt to pass args to existing instance
- StartSocket ss = new StartSocket(args);
-
- if( !ss.sendArgs() ) { //arg passing attempt failed, so start core anyway
- another_instance = false;
-- String msg = "There appears to be another program process already listening on socket [127.0.0.1: 6880].\nLoading of torrents via command line parameter will fail until this is fixed.";
-+ String msg = "Impossible to bind to a local socket.\nLoading of torrents via command line parameter will fail until this is fixed.";
- System.out.println( msg );
- Logger.log(new LogAlert(LogAlert.REPEATABLE, LogAlert.AT_WARNING, msg));
- }
-diff --git a/org/gudy/azureus2/ui/swt/StartServer.java b/org/gudy/azureus2/ui/swt/StartServer.java
-index 88f520e..e354014 100644
---- a/org/gudy/azureus2/ui/swt/StartServer.java
-+++ b/org/gudy/azureus2/ui/swt/StartServer.java
-@@ -68,13 +68,13 @@ StartServer
- // DON'T USE LOGGER HERE DUE TO COMMENTS BELOW - IF AZ ALREADY RUNNING THEN THE SERVERSOCKET
- // CALL WILL THROW AN EXCEPTION
-
-- socket = new ServerSocket(6880, 50, InetAddress.getByName("127.0.0.1")); //NOLAR: only bind to localhost
-+ socket = org.gudy.azureus2.core3.util.LocalSocketHelper.listen(); //NOLAR: only bind to localhost
-
- state = STATE_LISTENING;
-
- if (Logger.isEnabled())
- Logger.log(new LogEvent(LOGID, "StartServer: listening on "
-- + "127.0.0.1:6880 for passed torrent info"));
-+ + "127.0.0.1:" + socket.getLocalPort() + " for passed torrent info"));
-
- }catch (Throwable t) {
-
-@@ -84,7 +84,7 @@ StartServer
- state = STATE_FAULTY;
- String reason = t.getMessage() == null ? "<>" : t.getMessage();
-
-- System.out.println( "StartServer ERROR: unable" + " to bind to 127.0.0.1:6880 listening"
-+ System.out.println( "StartServer ERROR: unable" + " to bind to a local port listening"
- + " for passed torrent info: " + reason);
- }
- }
-diff --git a/org/gudy/azureus2/ui/swt/StartSocket.java b/org/gudy/azureus2/ui/swt/StartSocket.java
-index 2071c96..d6d73de 100644
---- a/org/gudy/azureus2/ui/swt/StartSocket.java
-+++ b/org/gudy/azureus2/ui/swt/StartSocket.java
-@@ -49,14 +49,14 @@ public class StartSocket {
- Socket sck = null;
- PrintWriter pw = null;
- try {
-- String msg = "StartSocket: passing startup args to already-running Azureus java process listening on [127.0.0.1: 6880]";
-+ String msg = "StartSocket: passing startup args to already-running Azureus java process";
-
- // DON'T USE LOGGER here as we DON't want to initialise all the logger stuff
- // and in particular AEDiagnostics config dirty stuff!!!!
-
- System.out.println( msg );
-
-- sck = new Socket("127.0.0.1", 6880);
-+ sck = org.gudy.azureus2.core3.util.LocalSocketHelper.connect();
-
- // NOTE - this formatting is also used by AzureusCoreSingleInstanceClient and other org.gudy.azureus2.ui.common.Main.StartSocket
-
-diff --git a/org/gudy/azureus2/ui/swt/osx/Start.java b/org/gudy/azureus2/ui/swt/osx/Start.java
-index 5f20cd3..c70a78e 100644
---- a/org/gudy/azureus2/ui/swt/osx/Start.java
-+++ b/org/gudy/azureus2/ui/swt/osx/Start.java
-@@ -38,7 +38,7 @@ public class Start {
- try {
- System.out.println("StartSocket: passing startup args to already-running Azureus java process.");
-
-- sck = new Socket("127.0.0.1", 6880);
-+ sck = org.gudy.azureus2.core3.util.LocalSocketHelper.connect();
-
- pw = new PrintWriter(new OutputStreamWriter(sck.getOutputStream(),"UTF8"));
-
-diff --git a/org/gudy/azureus2/ui/swt/updater/snippets/Main.java b/org/gudy/azureus2/ui/swt/updater/snippets/Main.java
-index fe96aab..99ffec1 100644
---- a/org/gudy/azureus2/ui/swt/updater/snippets/Main.java
-+++ b/org/gudy/azureus2/ui/swt/updater/snippets/Main.java
-@@ -36,7 +36,7 @@ public class Main {
-
- public static void main(String args[]) {
- try {
-- ServerSocket server = new ServerSocket(6880, 50, InetAddress.getByName("127.0.0.1"));
-+ ServerSocket server = org.gudy.azureus2.core3.util.LocalSocketHelper.listen();
- spawnStarted();
- server.close();
- } catch(Exception e) {
-diff --git a/org/gudy/azureus2/ui/swt/updater/snippets/Started.java b/org/gudy/azureus2/ui/swt/updater/snippets/Started.java
-index 023a557..7619e99 100644
---- a/org/gudy/azureus2/ui/swt/updater/snippets/Started.java
-+++ b/org/gudy/azureus2/ui/swt/updater/snippets/Started.java
-@@ -36,11 +36,11 @@ public class Started {
- try {
- while(!ok) {
- try{
-- ServerSocket server = new ServerSocket(6880, 50, InetAddress.getByName("127.0.0.1"));
-+ ServerSocket server = org.gudy.azureus2.core3.util.LocalSocketHelper.listen();
- ok = true;
- server.close();
- } catch(Exception e) {
-- Logger.log("Exception while trying to bind on port 6880 : " + e);
-+ Logger.log("Exception while trying to bind to local port : " + e);
- Thread.sleep(1000);
- }
- }
-diff --git a/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnection.java b/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnection.java
-index 00171c7..b321361 100644
---- a/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnection.java
-+++ b/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnection.java
-@@ -102,14 +102,14 @@ public class ConfigSectionConnection implements UISWTConfigSection {
- label.setLayoutData(gridData);
-
- final IntParameter tcplisten = new IntParameter(cMiniArea,
-- "TCP.Listen.Port", 1, 65535);
-+ "TCP.Listen.Port", 1, 49151);
- gridData = new GridData();
- tcplisten.setLayoutData(gridData);
-
- tcplisten.addChangeListener(new ParameterChangeAdapter() {
- public void intParameterChanging(Parameter p, int toValue) {
-- if (toValue == 6880) {
-- toValue = 6881;
-+ if (toValue > 49151) {
-+ toValue = 49151;
- tcplisten.setValue(toValue);
- }
-
-@@ -129,7 +129,7 @@ public class ConfigSectionConnection implements UISWTConfigSection {
- label.setLayoutData(gridData);
-
- final IntParameter udp_listen = new IntParameter(cMiniArea,
-- "UDP.Listen.Port", 1, 65535);
-+ "UDP.Listen.Port", 1, 49151);
- gridData = new GridData();
- udp_listen.setLayoutData(gridData);
-
-@@ -137,8 +137,8 @@ public class ConfigSectionConnection implements UISWTConfigSection {
-
- udp_listen.addChangeListener(new ParameterChangeAdapter() {
- public void intParameterChanging(Parameter p, int toValue) {
-- if (toValue == 6880) {
-- toValue = 6881;
-+ if (toValue > 49151) {
-+ toValue = 49151;
- udp_listen.setValue(toValue);
- }
-
-@@ -173,8 +173,8 @@ public class ConfigSectionConnection implements UISWTConfigSection {
- new ParameterChangeAdapter()
- {
- public void intParameterChanging(Parameter p, int toValue) {
-- if (toValue == 6880) {
-- toValue = 6881;
-+ if (toValue > 49151) {
-+ toValue = 49151;
- non_data_udp_listen.setValue(toValue);
- }
- }
-@@ -189,7 +189,7 @@ public class ConfigSectionConnection implements UISWTConfigSection {
-
- int udp_listen_port = udp_listen.getValue();
-
-- if ( udp_listen_port != 6880 ){
-+ if ( udp_listen_port < 49152 ){
-
- COConfigurationManager.setParameter( "UDP.NonData.Listen.Port", udp_listen_port );
-
-diff --git a/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnectionAdvanced.java b/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnectionAdvanced.java
-index 0b1ad25..bb5ce14 100644
---- a/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnectionAdvanced.java
-+++ b/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionConnectionAdvanced.java
-@@ -168,7 +168,7 @@ public class ConfigSectionConnectionAdvanced implements UISWTConfigSection {
- Label lpbind = new Label(gSocket, SWT.NULL);
- Messages.setLanguageText(lpbind, CFG_PREFIX + "bind_port");
- final IntParameter port_bind = new IntParameter(gSocket,
-- "network.bind.local.port", 0, 65535);
-+ "network.bind.local.port", 0, 49151);
- gridData = new GridData();
- port_bind.setLayoutData(gridData);
-
-diff --git a/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionTrackerClient.java b/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionTrackerClient.java
-index fce3910..fabed84 100644
---- a/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionTrackerClient.java
-+++ b/org/gudy/azureus2/ui/swt/views/configsections/ConfigSectionTrackerClient.java
-@@ -176,7 +176,7 @@ ConfigSectionTrackerClient
- try
- {
- int portVal = Integer.parseInt(toValue);
-- if(portVal >= 0 && portVal <= 65535)
-+ if(portVal >= 0 && portVal <= 49151)
- return;
- } catch (NumberFormatException e) {}
- p.setValue("");
---
-tg: (49ad0c1..) fixes/multiuser (depends on: fixes/sunsecurity)
diff --git a/debian/patches/fixes/platform.diff b/debian/patches/fixes/platform.diff
deleted file mode 100644
index 32fafbd..0000000
--- a/debian/patches/fixes/platform.diff
+++ /dev/null
@@ -1,142 +0,0 @@
-From: Adrian Perez <adrianperez.deb at gmail.com>
-Subject: [PATCH] fixes/platform
-
-Fixes the FTBFS caused by the use of Win32 and MacOS-X
-platforms imports and logic.
-
-Signed-off-by: Adrian Perez <adrianperez.deb at gmail.com>
-
----
- .../core/update/impl/AzureusRestarterImpl.java | 6 +++++-
- .../ui/swt/views/skin/TorrentListViewsUtils.java | 8 +++++++-
- .../azureus2/platform/PlatformManagerFactory.java | 4 ++--
- .../platform/PlatformManagerPluginDelegate.java | 15 ++++++++++++---
- 4 files changed, 26 insertions(+), 7 deletions(-)
-
-diff --git a/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java b/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java
-index b4438fb..d238dc6 100644
---- a/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java
-+++ b/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java
-@@ -30,8 +30,10 @@ import org.gudy.azureus2.core3.util.*;
- import org.gudy.azureus2.platform.PlatformManager;
- import org.gudy.azureus2.platform.PlatformManagerFactory;
- import org.gudy.azureus2.platform.unix.ScriptAfterShutdown;
-+/* --- Adrian Perez: Don't import this when building for Linux.
- import org.gudy.azureus2.platform.win32.access.AEWin32Access;
- import org.gudy.azureus2.platform.win32.access.AEWin32Manager;
-+*/
- import org.gudy.azureus2.plugins.PluginInterface;
- import org.gudy.azureus2.plugins.platform.PlatformManagerException;
- import org.gudy.azureus2.pluginsimpl.local.PluginInitializer;
-@@ -306,7 +308,8 @@ AzureusRestarterImpl
- }
-
- try {
-- int result;
-+ int result = -123; // Adrian Perez: Evade Win32 logic, key: "nowin32"
-+/*
- AEWin32Access accessor = AEWin32Manager.getAccessor(true);
- if (accessor == null) {
- result = -123;
-@@ -345,6 +348,7 @@ AzureusRestarterImpl
- SystemProperties.getApplicationPath(), AEWin32Access.SW_NORMAL);
- }
- }
-+*/
-
- /*
- * Some results:
-diff --git a/com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java b/com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java
-index 190af45..cb104fe 100644
---- a/com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java
-+++ b/com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java
-@@ -76,8 +76,10 @@ import com.aelitis.azureus.util.ContentNetworkUtils;
- import com.aelitis.azureus.util.DLReferals;
- import com.aelitis.azureus.util.DataSourceUtils;
- import com.aelitis.azureus.util.PlayUtils;
--import com.aelitis.azureus.util.win32.Win32Utils;
-
-+/* --- Adrian Perez: Don't import this when building for Linux.
-+import com.aelitis.azureus.util.win32.Win32Utils;
-+*/
- /**
- * @author TuxPaper
- * @created Oct 12, 2006
-@@ -615,6 +617,9 @@ public class TorrentListViewsUtils
- */
- private static boolean runInMediaPlayer(String mediaFile) {
-
-+ // debugDCAD("enter - runInMediaPlayer");
-+
-+/* --- Adrian Perez: Don't use Win32 media player. Always return false.
- if (Constants.isWindows) {
- String wmpEXE = Win32Utils.getWMP();
- if (new File(wmpEXE).exists()) {
-@@ -626,6 +631,7 @@ public class TorrentListViewsUtils
- }
- }
- }
-+*/
- return false;
- }
-
-diff --git a/org/gudy/azureus2/platform/PlatformManagerFactory.java b/org/gudy/azureus2/platform/PlatformManagerFactory.java
-index 82fcb69..6eec2eb 100644
---- a/org/gudy/azureus2/platform/PlatformManagerFactory.java
-+++ b/org/gudy/azureus2/platform/PlatformManagerFactory.java
-@@ -51,11 +51,11 @@ PlatformManagerFactory
- if ( getPlatformType() == PlatformManager.PT_WINDOWS ){
-
- platform_manager = org.gudy.azureus2.platform.win32.PlatformManagerImpl.getSingleton();
--
-+/* --- Adrian Perez: Don't use MacOS-X's PlatformManagerImpl
- }else if( getPlatformType() == PlatformManager.PT_MACOSX ){
-
- platform_manager = org.gudy.azureus2.platform.macosx.PlatformManagerImpl.getSingleton();
--
-+*/
- }else if( getPlatformType() == PlatformManager.PT_UNIX ){
-
- platform_manager = org.gudy.azureus2.platform.unix.PlatformManagerImpl.getSingleton();
-diff --git a/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java b/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java
-index 3beeb39..b98a0bf 100644
---- a/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java
-+++ b/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java
-@@ -24,6 +24,10 @@ import java.util.Properties;
-
- import org.gudy.azureus2.platform.unix.PlatformManagerUnixPlugin;
-
-+/* --- Adrian Perez: Don't use Win32 UpdateChecker in Linux.
-+import org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker;
-+*/
-+
- import org.gudy.azureus2.plugins.Plugin;
- import org.gudy.azureus2.plugins.PluginException;
- import org.gudy.azureus2.plugins.PluginInterface;
-@@ -44,16 +48,21 @@ public class PlatformManagerPluginDelegate
- PlatformManager platform = PlatformManagerFactory.getPlatformManager();
-
- int platformType = platform.getPlatformType();
-- if ( platformType == PlatformManager.PT_WINDOWS ){
-+
-+ /* Adrian Perez:
-+ * We're not in Windows or MacOS
-+ *
-+ if ( platformType == PlatformManager.PT_WINDOWS ){
- org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker plugin = new org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker();
- plugin.initialize(pluginInterface);
- }else if ( platformType == PlatformManager.PT_MACOSX ){
- org.gudy.azureus2.platform.macosx.PlatformManagerUpdateChecker plugin = new org.gudy.azureus2.platform.macosx.PlatformManagerUpdateChecker();
- plugin.initialize(pluginInterface);
-- }else if ( platformType == PlatformManager.PT_UNIX ){
-+ */
-+ if ( platformType == PlatformManager.PT_UNIX ){
- PlatformManagerUnixPlugin plugin = new PlatformManagerUnixPlugin();
- plugin.initialize(pluginInterface);
-- }else{
-+ } else {
- Properties pluginProperties = pluginInterface.getPluginProperties();
- pluginProperties.setProperty("plugin.name", "Platform-Specific Support");
- pluginProperties.setProperty("plugin.version", "1.0");
---
-tg: (7f589b9..) fixes/platform (depends on: upstream)
diff --git a/debian/patches/series b/debian/patches/series
index e187fa2..8b6fd96 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,9 @@
-debian/speedtest.diff -p1
-debian/update-disable.diff -p1
-fixes/multiuser.diff -p1
-fixes/platform.diff -p1
-debian/no-auto-update.patch
+01_amend_build_classpath.patch
+02_speedtest.patch -p1
+03_update_disable.patch -p1
+04_unbundle_json.patch
+05_unbundle_commons_lang.patch
+06_unbundle_bouncy_castle.patch
+07_platform.patch
+08_multi_user.patch
+09_no_auto_update.patch
diff --git a/debian/rules b/debian/rules
index b62b755..e27f106 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,23 +1,19 @@
#!/usr/bin/make -f
-# -*- makefile -*-
+#export DH_VERBOSE=1
+export JAVA_HOME=/usr/lib/jvm/default-java
+export ANT_OPTS=-Xmx512m
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
--include /usr/share/topgit/tg2quilt.mk
+%:
+ dh $@ --with javahelper
-JAVA_HOME := /usr/lib/jvm/default-java
-DEB_ANT_BUILDFILE := debian/build.xml
-DEB_ANT_BUILD_TARGET := package
-DEB_JARS := log4j commons-cli swt junit
-ANT_OPTS := -Xmx512m
-QUILT_PATCH_DIR := debian/patches/
-
-build/azureus::
+override_dh_auto_build:
+ dh_auto_build
perl -ne 'print(unpack "u", $$_)' debian/Azureus.png.uu > \
debian/Azureus.png
perl -ne 'print(unpack "u", $$_)' debian/Azureus.torrent.png.uu > \
debian/Azureus.torrent.png
-clean::
- -rm -f debian/Azureus.png
- -rm -f debian/Azureus.torrent.png
+override_dh_clean:
+ dh_clean
+ rm -f debian/Azureus.png
+ rm -f debian/Azureus.torrent.png
diff --git a/debian/vuze.desktop b/debian/vuze.desktop
index c13ba14..1765ba7 100644
--- a/debian/vuze.desktop
+++ b/debian/vuze.desktop
@@ -1,4 +1,6 @@
[Desktop Entry]
+Version=1.0
+Name=Vuze
Encoding=UTF-8
Categories=Java;Network;FileTransfer;P2P
Comment=Powerful BitTorrent client and open content platform
@@ -6,5 +8,5 @@ Exec=vuze %f
GenericName=Multimedia BitTorrent client
Icon=/usr/share/pixmaps/Azureus.png
MimeType=application/x-bittorrent
-Name=Vuze
+Terminal=false
Type=Application
diff --git a/debian/install b/debian/vuze.install
similarity index 59%
rename from debian/install
rename to debian/vuze.install
index a4c93d7..1785355 100644
--- a/debian/install
+++ b/debian/vuze.install
@@ -1,7 +1,6 @@
+debian/bin/azureus usr/bin
debian/Azureus.png usr/share/pixmaps
debian/Azureus.torrent.png usr/share/pixmaps
-dist/Azureus2.jar usr/share/java
-debian/wrappers/azureus usr/bin
-debian/azureus.desktop usr/share/applications
+debian/vuze.desktop usr/share/applications
debian/azureus.xpm usr/share/pixmaps
debian/azureus.schemas usr/share/gconf/schemas
diff --git a/debian/vuze.manpages b/debian/vuze.manpages
new file mode 100644
index 0000000..727919f
--- /dev/null
+++ b/debian/vuze.manpages
@@ -0,0 +1 @@
+debian/man/azureus.1
diff --git a/debian/vuze.menu b/debian/vuze.menu
new file mode 100644
index 0000000..d943a81
--- /dev/null
+++ b/debian/vuze.menu
@@ -0,0 +1,6 @@
+?package(vuze):needs="X11" \
+section="Applications/Network/File Transfer" \
+icon="/usr/share/pixmaps/azureus.xpm" \
+title="Azureus" \
+command="/usr/bin/azureus" \
+hints="Internet"
diff --git a/debian/watch b/debian/watch
index fcc779c..75f680b 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,3 @@
version=3
-http://sf.net/azureus/Vuze_(.+)_source\.zip
+opts="uversionmangle=s/(\d)(?=\d)/$1\./g" \
+ http://sf.net/azureus/Vuze_(.+)_source\.zip debian debian/orig-tar.sh
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/azureus.git
More information about the pkg-java-commits
mailing list