pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: how to create a package installing into a separate directory?



On 2011/10/27 11:47, OBATA Akio wrote:
Hi,

On Thu, 27 Oct 2011 18:21:38 +0900, norc1212 <norc1212%gmail.com@localhost> 
wrote:

My current trouble is to make a new package to install
in its own subdirectory under $LOCALBASE. Using the
pkgsrc developer's guide I created a new package (it went
smooth, thanks!). It installs its files in $LOCALBASE/bin,
$LOCALBASE/lib etc. However I need the program in various
versions in parallel - the same way lang/gcc?? do:
$LOCALBASE/mypkgAB/{bin,lib,...}
$LOCALBASE/mypkgCD/{bin,lib,...}
Unfortunately gcc Makefiles are too advanced to me to
learn the trick.

Can you give me some advice?

It depend on how to configure/compile/install the package.
For example, if it is GNU configure based package (GNU_CONFIGURE=yes),

GNU_CONFIGURE_PREFIX= ${PREFIX}/mypkgAB


Thanks for the tip. The program uses GNU configure and
cmake. I tried

USE_CMAKE=            yes
GNU_CONFIGURE=        yes
GNU_CONFIGURE_PREFIX= ${PREFIX}/mypkgAB

and this did tune the configure phase to my needs. According
to config.log: Invocation command line was

$ ./configure --with-libiconv-prefix=/usr/pkg --prefix=/usr/pkg/mypkgAB --build=x86_64-unknown-linux --host=x86_64-unknown-linux --mandir=/usr/pkg/mypkgAB/man

However the install phase still goes directly to /usr/pkg.
It seems to me I need define CMAKE_INSTALL_PREFIX somehow.
I tried to fiddle with

CMAKE_INSTALL_PREFIX= ${PREFIX}/mypkgAB
or
CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}/mypkgAB

but no luck yet.

BR
norc


Home | Main Index | Thread Index | Old Index