From owner-freebsd-questions Wed Aug 28 23:14:13 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A23F637B401 for ; Wed, 28 Aug 2002 23:14:08 -0700 (PDT) Received: from nelly.internal.irrelevant.org (81-86-164-179.dsl.pipex.com [81.86.164.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFDEC43E42 for ; Wed, 28 Aug 2002 23:14:07 -0700 (PDT) (envelope-from simond@irrelevant.org) Received: from simond by nelly.internal.irrelevant.org with local (Exim 3.36 #1) id 17kIZ4-0000Re-00; Thu, 29 Aug 2002 07:13:58 +0100 Date: Thu, 29 Aug 2002 07:13:58 +0100 From: Simon Dick To: Doug Poland Cc: questions@freebsd.org Subject: Re: Modifying a port for local use Message-ID: <20020829061358.GA797@irrelevant.org> References: <20020828163410.A1930@polands.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020828163410.A1930@polands.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Aug 28, 2002 at 04:34:10PM -0500, Doug Poland wrote: > Hello, > > I want to modify a port ( squirrelmail-1.2.7 ) for use on my system. The > issue is where the port is installed. The Makefile lets the ports system > install into /usr/local. However, I want it installed into /data/www. > > After looking at /usr/ports/Mk/bsd.ports.mk it looked as simple as > redefining PREFIX= in the Makefile. I also want the the directory created > to reflect the PORTVERSION. So I hack the Makefile by adding/modifying: > > PREFIX=/data/www > > do-install: > ${MKDIR} ${PREFIX}/squirrelmail-${PORTVERSION} > ${CP} -R ${WRKSRC}/* ${PREFIX}/squirrelmail-${PORTVERSION} > ${CHOWN} -R www:www ${PREFIX}/squirrelmail-${PORTVERSION}/data > > After I do a make install, the port is installed in the appropriate > locatation, but in ${PREFIX} are a bunch of new directories {bin,etc, > include,info,lib,libdata,libexec,man,sbin,share,}. > > When I attempt a pkg_delete or make deinstall, I get a bunch of messages > about files that don't exists. Examination reveals that the delete process > is not honoring my squirrelmail-${PORTVERSION} hack. > > So, how am I supposed to change a port so it installs and deinstalls outside > the /usr/local directory structure? The normal way to do it doesn't even require altering the makefile, just try this: cd /usr/ports/mail/squirrelmail make PREFIX=/data/www make PREFIX=/data/www install and that should be recorded into the pkg db once it's installed. (it works, I create ports using that method so ask more if you still have problems :) -- Simon Dick simond@irrelevant.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message