Date: Thu, 30 Jan 2003 15:43:12 -0800 (PST) From: david taylor <dtayl@rocketmail.com> To: FREEBSD-PORTS@FreeBSD.org Cc: nbm@mithrandr.moria.org, smoberly@karamazov.org Subject: Re: Creating package in private area Message-ID: <20030130234312.59539.qmail@web41301.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
I believe my problem has been solved by changes that were motivated by responses to my original post. To enable install to and packaging from $DESTDIR, these lines were added to the port Makefile: MAKE_ARGS+= DESTDIR=${DESTDIR} post-install: echo "@srcdir ${DESTDIR}${PREFIX}" | cat - ${TMPPLIST} > ${TMPPLIST}.new mv ${TMPPLIST}.new ${TMPPLIST} To allow compression of man pages in DESTDIR, these lines were added after ".include <bsd.port.mk>": .for sect in 1 2 3 4 5 6 7 8 9 .if defined(MAN${sect}) _MANPAGES= ${MAN${sect}:S%^%${DESTDIR}${MAN${sect}PREFIX}/man/${lang}/man${sect}/%} .endif .endfor The bsd.port.mk makefile still requires the install to be run as root. Using 'sudo" helps, but then some files are owned by root and some are not. If the build area is not on a local disk, root will not be permitted to remove files it does not own. To allow non-root install and packaging, I skip the mtree install and package registration, by adding these lines to the port Makefile: NO_MTREE= true NO_PKG_REGISTER=true install-mtree: @${DO_NADA} Frankly, I don't know if the mtree install and package registration matters or if it compromises the package in some way. It all seems to work fine for my packages, but this is definitely not a general solution. I would appreciate any comments/warnings on this approach. Thanks for the helpful responses. --- david taylor <dtayl@rocketmail.com> wrote: > Using release 4.5, is there a way to create a package in > a > private area that installs in /usr/local by default? > > When I do "make PREFIX=mydir install; make package" it > fails, since there seems to be no way to specify "Look in > mydir for the files to add to the package". > > When I do "make PREFIX=mydir install package" the package > > is created. But when I pkg_add that package, it installs > in "mydir" (unless I specify "-p /usr/local"). > > I really would like to create packages in a safe, > private > area (as can be done with Solaris, e.g.). > > thanks, > dtayl > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030130234312.59539.qmail>