From owner-freebsd-questions@FreeBSD.ORG Fri Dec 8 21:19:01 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 E37D416A403 for ; Fri, 8 Dec 2006 21:19:01 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id A15D543CA2 for ; Fri, 8 Dec 2006 21:18:01 +0000 (GMT) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id kB8LIw2R027889; Fri, 8 Dec 2006 13:18:58 -0800 (PST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-questions@freebsd.org Date: Fri, 8 Dec 2006 16:17:16 -0500 User-Agent: KMail/1.9.4 References: <4579C3D8.4050307@g-noc.net> <200612081445.33618.lane@joeandlane.com> <4579D1A1.7020806@g-noc.net> In-Reply-To: <4579D1A1.7020806@g-noc.net> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200612081617.16270.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Alexis Dorais-Joncas 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:19:02 -0000 On Friday 08 December 2006 15:57, Alexis Dorais-Joncas wrote: > Lane a =E9crit : > > 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=3D/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 : > >> =3D=3D=3D> Checking if databases/phpmyadmin already installed > >> =3D=3D=3D> 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. > >> > > > > 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. > > 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 ? What I have done in the past is create "slave" ports. Say the port you want= to=20 install twice is in ports/category/foo. Make a new directory=20 ports/category/bar. Inside that directory, create a Makefile similar to thi= s: PORTNAME=3D foo PKGNAMESUFFIX=3D _bar-duplicate COMMENT=3D This is the foo port but it installs as foo_bar-duplicate PREFIX=3D /path/to/alternate/prefix # ...you may want other options here ... MASTERDIR=3D ${.CURDIR}/../foo =2Einclude "${MASTERDIR}/Makefile" Install once from category/foo and once from your new port's directory and= =20 away you go. Again, the porter's handbook has lots of useful information=20 about everything above. JN