From owner-freebsd-ports@FreeBSD.ORG Mon Jul 2 07:51:12 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7D79106566B for ; Mon, 2 Jul 2012 07:51:12 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2D13E8FC20 for ; Mon, 2 Jul 2012 07:51:12 +0000 (UTC) Received: by werp13 with SMTP id p13so464284wer.13 for ; Mon, 02 Jul 2012 00:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bluelife.at; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AiQ5oAchalSoDlUbDM3myQ06EkN6vc2oGNdBis9xriU=; b=CApYdCL2b1GaD7pEeAaZnwBQ0VlCItGpw7cyYIG6U7XkjuY/+cFgmXQfgkpqIaCl1I jGMSYbU/Srv8mbrsKhsHHKV03sEIIK6tDBOQFqnwXNITmi5D5i41vA7YswRjPE+p7m35 1Rl2a/vFSm50lVB89KuS1mO/DRoW1fZKJ4cBU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=AiQ5oAchalSoDlUbDM3myQ06EkN6vc2oGNdBis9xriU=; b=ihJyre8ilGDh23IGpqDSFoBSYgACYRnGAo6PBqt0TUxI6vp7NT1+/5OKjHhu9+A6dY qHibvfgMxaRwoFzzUQ+qGllo8l9XRy99HUa78jkXpL5PQ9Ci8hNCSgN+9u7y+KbdHKK5 EaBPLT3PyFLUOk4sBCCh5NHRWrOW7LxreywjnrbQzmZDIZS9z9nwbqw0z9IP0gWUFH4H nMplotjiFJCW384gGa4NS98kUBUIBVlRMF2mjbaPXIIuK/chwcf1o20yqI5Y8znZAbPf +pjxRoP0dLwqkK07H+QGELlMFmqtn0XBscglT3bZSydBkSBpBzLyUH9ugcWo2z/2ha2D YZDQ== MIME-Version: 1.0 Received: by 10.216.226.136 with SMTP id b8mr1231147weq.152.1341215471077; Mon, 02 Jul 2012 00:51:11 -0700 (PDT) Received: by 10.180.106.71 with HTTP; Mon, 2 Jul 2012 00:51:11 -0700 (PDT) X-Originating-IP: [83.64.253.201] In-Reply-To: References: <1341164678.10569.2.camel@Nokia-N900-42-11> <1341168064.10742.2.camel@Nokia-N900-42-11> Date: Mon, 2 Jul 2012 09:51:11 +0200 Message-ID: From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= To: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQncMyzZp/zaUO495t4M8GhSVEBBg+tIH7kc53kGF24wCsuSgun2dqbxuCOfObZWFy0y4u+s Cc: freebsd-ports@freebsd.org Subject: Re: [new-port] JDownloader X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:51:12 -0000 On Sun, Jul 1, 2012 at 11:49 PM, Fernando Apestegu=EDa wrote: > > El 01/07/2012 20:45, "Bernhard Fr=F6hlich" escribi=F3= : >> >> On So., 1. Jul. 2012 20:09:09 CEST, Fernando Apestegu=EDa >> wrote: >> >> > On Sun, Jul 1, 2012 at 7:44 PM, Bernhard Fr=F6hlich >> > wrote: >> > > On So., 1. Jul. 2012 19:32:58 CEST, Fernando Apestegu=EDa >> > > wrote: >> > > >> > > > Hi all, >> > > > >> > > > I have a preliminary version of a port for JDownloader[1] since it >> > > > seems to be a wanted port[2] >> > > > >> > > > Here is the Makefile: >> > > > >> > > > >> > > > ------------------------------------------------------------------= ----- >> > > > # New ports collection makefile for: jdownloader >> > > > # Date created: >> > > > Sun Jul 1 2012 >> > > > # Whom: Fernando Apesteguia >> > > > # >> > > > # $FreeBSD$ >> > > > >> > > > PORTNAME=3D jdownloader >> > > > PORTVERSION=3D 1.0 >> > > > CATEGORIES=3D java ftp >> > > > MASTER_SITES=3D http://212.117.163.148/ >> > > > DISTNAME=3D jd.sh >> > > > EXTRACT_SUFX=3D >> > > > >> > > > MAINTAINER=3D fernando.apesteguia@gmail.com >> > > > COMMENT=3D Download management for one-click-hosters >> > > > >> > > > RUN_DEPENDS=3D >> > > > ${LOCALBASE}/bin/java:${PORTSDIR}/java/diablo-jdk16 >> > > > RUN_DEPENDS+=3D ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget >> > > > >> > > > USE_JAVA=3D yes >> > > > JAVA_VERSION=3D 1.6+ >> > > > NO_BUILD=3D yes >> > > > >> > > > WRKSRC=3D ${WRKDIR} >> > > > >> > > > do-extract: >> > > > @${MKDIR} ${WRKDIR} >> > > > @${CP} ${DISTDIR}/jd.sh ${WRKSRC} >> > > > >> > > > do-install: >> > > > @${MKDIR} ${PREFIX}/${PORTNAME} >> > > > @${INSTALL_SCRIPT} ${WRKSRC}/jd.sh ${PREFIX}/bin >> > > > >> > > > post-install: >> > > > @${ECHO_MSG} "" >> > > > @${ECHO_MSG} >> > > > >> > > > "*****************************************************************= ********" >> > > > @${ECHO_MSG} JDownloader will update itself to the latest version >> > > > when it runs for the @${ECHO_MSG} first time. Please run >> > > > ${LOCALBASE}/bin/jd.sh @${ECHO_MSG} to complete the >> > > > installation >> > > > @${ECHO_MSG} >> > > > >> > > > "*****************************************************************= ********" >> > > > @${ECHO_MSG} "" @${CAT} ${PKGMESSAGE} >> > > > >> > > > .include >> > > > >> > > > ------------------------------------------------------------------= ----- >> > > > >> > > > The port just needs a simple patch file (patch-jd.sh): >> > > > >> > > > >> > > > ------------------------------------------------------------------= ----- >> > > > --- jd.sh.orig 2012-07-01 14:23:07.000000000 +0200 >> > > > +++ jd.sh 2012-07-01 14:24:15.000000000 +0200 >> > > > @@ -1,4 +1,4 @@ >> > > > -#!/bin/bash >> > > > +#!/bin/sh >> > > > #JD Installer/Starter Version 0.2 >> > > > #by Jiaz(JD-Team), jiaz@jdownloader.org >> > > > #You need at least: >> > > > >> > > > ------------------------------------------------------------------= ----- >> > > > >> > > > The jd.sh runs fine with sh(1) so there is no need for a new run >> > > > dependency for bash(1). >> > > > >> > > > The port installs one single file (jd.sh). This script when >> > > > executed, >> > > > checks for the presence of the JDownloader jar files under the ~/.= jd >> > > > directory. If they don't exist it starts the uploader application >> > > > and >> > > > downloads the latest files. If the files were already present, it >> > > > launches the installation and if the installation is already >> > > > present, >> > > > it launches the program. >> > > > Uninstalling the port uninstalls the jd.sh file but _not_ the actu= al >> > > > application that might be installed by the users in their respecti= ve >> > > > home directories. Taking into account that JDownloader can be >> > > > installed anyway just by downloading the source I don't suppose th= is >> > > > is a concern. Since the program can act as a server (it installs a >> > > > plugin for remote controlling the application similarly to what >> > > > transmission torrent does), it shows a message after the >> > > > installation. >> > > > >> > > > I haven't submitted a PR yet, so any suggestions are welcomed. >> > > > >> > > > Thanks in advance. >> > > > >> > > > [1] http://jdownloader.org/ >> > > > [2] http://wiki.freebsd.org/WantedPorts >> > > >> > > Is there a reason why you explicitly add diablo-jdk16 as runtime >> > > dependency? The use_java stuff should be sufficient. >> > >> > You're right, doesn't seem to be necessary. >> > >> > > >> > > Why have you decided to download and install the jar files on first >> > > run of the shellscript? That doesn't sound like a good idea to me >> > > because it breaks proper updates, deinstall and creates useless bina= ry >> > > packages. >> > >> > I haven't. jd.sh is provided by the upstream project. The alternative >> > is another "nicer" installation program. >> >> FreeBSD portstree is exactly that nicer installer that you are talking >> about. >> >> > Since this is just a wrapper to do several things and the actual >> > software is installed in the user's home directory, I agree we could >> > have two different users with two different versions of JDownloader. >> > By the way, the jd.sh script tries to update _just the first time_ but >> > after that, the user can always look for new versions from inside >> > JDownloader (in fact, it checks for new versions from the java code >> > every time it runs). >> >> Yeah many projects implement their own update mechanism mostly because >> windows has no package management. For a FreeBSD user and administrator = it >> should be an seamless integration so that he doesn't need to search for >> update dialogs or buttons within installed programms. Even fully automat= ed >> updating is a problem in case of regressions and for major changes in >> functionality. >> >> So what we need is a port that properly installs the few jar files into >> system paths and a shellscript that launches a jvm with that jar files. >> Additionally we should disable the automatic updating stuff. Have a look= at >> other java based ports on how to do that. > > Do you know of any ports doing something similar? finance/jgnash and www/helma would be examples --=20 Bernhard Fr=F6hlich http://www.bluelife.at/