From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGTty-0007Ma-1x for guix-patches@gnu.org; Sun, 19 Nov 2017 13:01:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGTtv-0003gK-9y for guix-patches@gnu.org; Sun, 19 Nov 2017 13:01:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:39188) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eGTtv-0003gG-64 for guix-patches@gnu.org; Sun, 19 Nov 2017 13:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eGTtu-0006Ny-SM for guix-patches@gnu.org; Sun, 19 Nov 2017 13:01:02 -0500 Subject: [bug#29359] [PATCH 02/31] gnu: Add java-jsoup. Resent-Message-ID: From: Julien Lepiller Date: Sun, 19 Nov 2017 18:57:36 +0100 Message-Id: <20171119175805.902-2-julien@lepiller.eu> In-Reply-To: <20171119175805.902-1-julien@lepiller.eu> References: <20171119175805.902-1-julien@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29359@debbugs.gnu.org * gnu/packages/java.scm (java-jsoup): New variable. --- gnu/packages/java.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 3ddfba08f..d8f9a7456 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7504,3 +7504,42 @@ Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.") (license license:asl2.0))) + +(define-public java-jsoup + (package + (name "java-jsoup") + (version "1.10.3") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/jhy/jsoup/archive/jsoup-" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0xbzw7rjv7s4nz1xk9b2cnin6zkpaldmc3svk71waa7hhjgp0a20")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jsoup.jar" + #:source-dir "src/main/java" + #:phases + (modify-phases %standard-phases + (add-before 'build 'copy-resources + (lambda _ + (let ((classes-dir (string-append (getcwd) "/build/classes"))) + (with-directory-excursion "src/main/java" + (for-each (lambda (file) + (let ((dist (string-append classes-dir "/" file))) + (mkdir-p (dirname dist)) + (copy-file file dist))) + (find-files "." ".*.properties")))) + #t))))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core) + ("java-gson" ,java-gson))) + (home-page "https://jsoup.org") + (synopsis "HTML Parser") + (description "Jsoup is a Java library for working with real-world HTML. It +provides a very convenient API for extracting and manipulating data, using the +best of DOM, CSS, and jquery-like methods.") + (license license:expat))) -- 2.15.0