From owner-freebsd-questions@FreeBSD.ORG Fri Dec 8 21:16:08 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABE7216A504 for ; Fri, 8 Dec 2006 21:16:08 +0000 (UTC) (envelope-from micahjon@ywave.com) Received: from relay2.av-mx.com (relay2.av-mx.com [137.118.16.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ABC943DB2 for ; Fri, 8 Dec 2006 21:13:35 +0000 (GMT) (envelope-from micahjon@ywave.com) X-Virus-Scan-Time: 1 Received: from [137.118.16.62] (HELO mx1.av-mx.com) by relay2.av-mx.com (CommuniGate Pro SMTP 4.2.10) with SMTP id 510781174 for freebsd-questions@freebsd.org; Fri, 08 Dec 2006 16:12:56 -0500 Received: (qmail 16998 invoked from network); 8 Dec 2006 21:12:56 -0000 Received: from dsl13043.ywave.com (HELO ?192.168.1.66?) (micahjon@ywave.com@66.243.212.43) by 0 with SMTP; 8 Dec 2006 21:12:56 -0000 X-CLIENT-IP: 66.243.212.43 X-CLIENT-HOST: dsl13043.ywave.com Message-ID: <4579D557.3050307@ywave.com> Date: Fri, 08 Dec 2006 13:12:55 -0800 From: Micah User-Agent: Thunderbird 1.5.0.8 (X11/20061205) MIME-Version: 1.0 To: Alexis Dorais-Joncas References: <4579C3D8.4050307@g-noc.net> <200612081445.33618.lane@joeandlane.com> <4579D1A1.7020806@g-noc.net> In-Reply-To: <4579D1A1.7020806@g-noc.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: How to install the same port twice but at different locations? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2006 21:16:08 -0000 Alexis Dorais-Joncas wrote: > Lane a écrit : >> On Friday 08 December 2006 13:58, Alexis Dorais-Joncas wrote: >> >>> Hi all, >>> >>> Subject says it all. I would like to install the package phpMyAdmin on >>> two different locations on my server. Is this doable? If so, how? >>> >>> I'm using FreeBSD g-noc.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu >>> Nov 3 09:36:13 UTC 2005 >>> root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 with ports >>> updated daily with cvsup. >>> >>> Right now, after I do : >>> cd /usr/ports/databases/phpmyadmin >>> sudo make PREFIX=/xxx/yyy install >>> >>> I get : >>> pkg_info|grep Admin >>> phpMyAdmin-2.9.1.1 A set of PHP-scripts to manage MySQL over the web >>> >>> And when I try to install it again but using a different PREFIX, I get >>> this : >>> ===> Checking if databases/phpmyadmin already installed >>> ===> phpMyAdmin-2.9.1.1 is already installed >>> You may wish to ``make deinstall'' and install this port again >>> >>> Using FORCE_PKG_REGISTER unregisters the first installation, so its no >>> good for this I guess. >>> >>> Thanks in advance, >>> Alexis >>> _______________________________________________ >>> >> Alexis, >> >> Read through the porters' handbook, >> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/. >> >> You are interested primarily in PREFIX and DESTDIR, but all of the >> text up to that point is enlightening. >> >> lane >> > Hi Lane, > I think you misunderstood my problem. I know how to install a port to a > specific location using PREFIX. What I want to achieve is to have one > port installed twice. For example, I want one whole instance of > phpMyAdmin to be in /var/www/ and a whole other one in /home/someuser/. > And I want both instances to be manageable with the package tools (such > as portupgrade) in order to keep both updated easily. > > Or have I totally missed the point with PREFIX/DESTDIR ? > > Thanx! > Alexis Well, a kludge, and maybe Lane was alluding to this, is to duplicate the phpMyAdmin port so you have two copies in your ports. You could then change the copy's Makefile so it has a different PORTNAME and a new install prefix. Of course you'd have to update your copy every time the original gets updated, but a script could probably handle that. Also portsnap will overwrite your copy, so maybe the script could recopy each time. I hope there's an easier way though. - Micah