From owner-freebsd-ports@FreeBSD.ORG Sun Jul 1 17:33:01 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 2BC4E106566B for ; Sun, 1 Jul 2012 17:33:01 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2598FC16 for ; Sun, 1 Jul 2012 17:33:00 +0000 (UTC) Received: by lbon10 with SMTP id n10so8253294lbo.13 for ; Sun, 01 Jul 2012 10:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nNZUD4VT7TjMNMkiEwEWca6Atq3C8UevhW2K9ASy9U0=; b=dvw0GSRxM7ElQE1SsbbfmwX9RZpVMGQ0P/dRxw55llDfaPYTfk1JhXIE43c1vJUH6B yMUpwzzUFfdz4Fze+7A0qe36NaX32lfR51zIXEjq6+xtVtXCjrah7QAE6l/mFBQj0zfJ yudPxoZwOv+90ne1B/wcZ3Qo2XiIAU5cDWekAi3YPfGLTgYYtbdVEbsxZTpGz1CRXSUY Z+aC4EZUzV3tM88NxYzLgVFY3+h3Fxuz2aunfbolfH58Mie0rP34O0XNvhgqJwSJbZ4M aMRpq8uL7kqsD3PNaDbqtB3HU81JCDbto4xvCCnuFc5VuxY8J394pLcJOMOBC6DXicqV Ic1w== MIME-Version: 1.0 Received: by 10.152.132.233 with SMTP id ox9mr9746491lab.25.1341163978899; Sun, 01 Jul 2012 10:32:58 -0700 (PDT) Received: by 10.152.24.131 with HTTP; Sun, 1 Jul 2012 10:32:58 -0700 (PDT) Date: Sun, 1 Jul 2012 19:32:58 +0200 Message-ID: From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [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: Sun, 01 Jul 2012 17:33:01 -0000 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= jdownloader PORTVERSION= 1.0 CATEGORIES= java ftp MASTER_SITES= http://212.117.163.148/ DISTNAME= jd.sh EXTRACT_SUFX= MAINTAINER= fernando.apesteguia@gmail.com COMMENT= Download management for one-click-hosters RUN_DEPENDS= ${LOCALBASE}/bin/java:${PORTSDIR}/java/diablo-jdk16 RUN_DEPENDS+= ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget USE_JAVA= yes JAVA_VERSION= 1.6+ NO_BUILD= yes WRKSRC= ${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 actual application that might be installed by the users in their respective home directories. Taking into account that JDownloader can be installed anyway just by downloading the source I don't suppose this 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