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 15:09, norc1212 wrote:
...
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.

I missed a paragraph on cmake configuration in the Guide
previously. Now I see there are CONFIGURE_ENV and CMAKE_ARGS.
for cmake. However no success.

To start from a clean point, I copied a simple regular
cmake-base package and tried to make it to install in its
own subdirectory:

(My sources are in /usr/src2/pkgsrc and $PREFIX is /usr/cpkg
 but that should not matter.)

# cp -r devel/cppcheck local
# cd local/cppcheck
# vi Makefile # my changes follow

##################
@@ -2,6 +2,7 @@
 #

 DISTNAME=      cppcheck-1.48
+PKGNAME=       cppcheck148-1.48
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=cppcheck/}
 EXTRACT_SUFX=  .tar.bz2
@@ -14,7 +15,7 @@
 BUILD_DEPENDS+=        libxslt-[0-9]*:../../textproc/libxslt
 BUILD_DEPENDS+=        docbook-xsl-[0-9]*:../../textproc/docbook-xsl

-INSTALLATION_DIRS+=    bin ${PKGMANDIR}/man1
+INSTALLATION_DIRS+=    cppcheck148/bin cppcheck148/man1
 PKG_DESTDIR_SUPPORT=   user-destdir
 USE_LANGUAGES=         c c++
 USE_CMAKE=             yes
@@ -22,6 +23,9 @@

 BUILDLINK_TRANSFORM+=  rm:-Wlogical-op

+CONFIGURE_ENV+=        CMAKE_INSTALL_PREFIX=${PREFIX}/cppcheck148
+CMAKE_ARGS+=   -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}/cppcheck148
+
 .include "options.mk"

 .PHONY: man-build
##################

# bmake install
=> Unwrapping files-to-be-installed.
===> Installing for cppcheck148-1.48
=> Creating installation directories
/usr/bin/install -c -s -o root -g root -m 755 /usr/src2/pkgsrc/local/cppcheck/work/cppcheck-1.48/cli/cppcheck /usr/src2/pkgsrc/local/cppcheck/work/.destdir/usr/cpkg/bin/ /usr/bin/install: target `/usr/src2/pkgsrc/local/cppcheck/work/.destdir/usr/cpkg/bin/' is not a directory: No such file or directory
*** Error code 1

Stop.
bmake: stopped in /usr/src2/pkgsrc/local/cppcheck
*** Error code 1

Stop.
bmake: stopped in /usr/src2/pkgsrc/local/cppcheck


It seems my CMAKE_INSTALL_PREFIX settings in Makefile
have no effect and it stays equal ${PREFIX}:

# grep CMAKE_INSTALL_PREFIX ./work/cppcheck-1.48/CMakeCache.txt
CMAKE_INSTALL_PREFIX:PATH=/usr/cpkg


What am I missing? Any comment, tip, advise would be
welcome.

TIA
norc


Home | Main Index | Thread Index | Old Index