Subject: pkgsrc strange homemade pkg behavior
To: None <tech-pkg@netbsd.org>
From: Eric Auge <eau@phear.org>
List: tech-pkg
Date: 09/13/2005 16:42:17
This is a multi-part message in MIME format.
--------------070809020500030003020504
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
First pkgsrc is great and it is an impressive piece of work,
takes a bit of time to understand the basics though, but it's fun :).
I'm currently building some custom pkgsrc's packages.
And I was unable to solve this last issue.
Using my project pkgsrc, everything build and
install fine and with no problem at all (create all the dirs correctly,
etc..)
* make install == OK
then i wanted to install that package on some other box,
so i build a binary package using make package and again
it build without any problems (create all the dirs correctly etc...)
* make package == OK
When I install the package with pkg_add, it is unable to create the
PKG_SYSCONFDIR (which I setup using PKG_SYSCONFSUBDIR=engine so
PKG_SYSCONFDIR must be /usr/pkg/etc/engine),
which explain why it is unable to copy CONF_FILES from examples dir
(/usr/pkg/share/examples/*.default) to conf dir (/usr/pkg/etc/engine)
since the conf dir is never created, but the package installs correctly,
just the conf file that are needed are NOT installed.
---- pkg_add yell ----
Installing files needed by insttmp.21727a:
/usr/pkg/etc/engine/Abnormal_Activity.xdsl
[/usr/pkg/share/examples/enine/Abnormal_activity.xdsl.default]
cp: /usr/pkg/etc/engine/Abnormal_activity.xdsl: No such file or directory
chmod: /usr/pkg/etc/engine/Abnormal_activity.xdsl: No such file or directory
(same for the 2 other files)
----------------------
why make install correctly create that dir, and
pkg_add doesn't for the same package ?! what did i missed ?
(probably something obvious, at least i hope).
I've tried using INSTALLATION_DIRS, OWN_DIRS also to
force creation of the missing dir by pkg_add, but seems to ignore it.
pkglint does yell on my Makefile so I guess the
basics are right.
Best Regards,
Eric.
NB: attached the "faulty?" Makefile
--------------070809020500030003020504
Content-Type: text/plain;
name="Makefile.send"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Makefile.send"
# $NetBSD$
# the package
#
DISTNAME=engine-1.4.2
PKGNAME=engine-1.4.2
PKGREVISION=
CATEGORIES= bleh
MASTER_SITES= http://people.intra.bleh.org/~eau/dist/engine/
MAINTAINER= eau@bleh.org
HOMEPAGE= http://people.intra.bleh.org/~eau/engine/
COMMENT= core engine
ONLY_FOR_PLATFORM=NetBSD-*-*
USE_TOOLS+= gmake
WRKSRC= ${WRKDIR}/${PKGNAME}/build
USE_PKGINSTALL= YES
# quick hack to avoid pkgsrc build wrapper to hide everything
BUILDLINK_PASSTHRU_DIRS+=/usr/pkg/include
BUILDLINK_PASSTHRU_DIRS+=/usr/pkg/lib
BUILDLINK_PASSTHRU_DIRS+=/usr/local/lib
BUILDLINK_PASSTHRU_DIRS+=/usr/local/include
PKG_SYSCONFSUBDIR= engine
EGDIR= ${PREFIX}/share/examples/engine
CONF_FILES= ${EGDIR}/private.ini.default ${PKG_SYSCONFDIR}/private.ini
CONF_FILES+= ${EGDIR}/public.ini.default ${PKG_SYSCONFDIR}/public.ini
CONF_FILES+= ${EGDIR}/Abnormal_activity.xdsl.default ${PKG_SYSCONFDIR}/Abnormal_activity.xdsl
# lets use that for building so it dont affect the pkg_add stuff
#BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf
#INSTALLATION_DIRS= share/examples/engine \
# etc/engine
#OWN_DIRS= ${PKG_SYSCONFDIR}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/Platform ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_DATA} ${WRKDIR}/${PKGNAME}/config/private.ini ${EGDIR}/private.ini.default
${INSTALL_DATA} ${WRKDIR}/${PKGNAME}/config/public.ini ${EGDIR}/public.ini.default
${INSTALL_DATA} ${WRKDIR}/${PKGNAME}/config/Abnormal_activity.xdsl ${EGDIR}/Abnormal_activity.xdsl.default
#.include "../../databases/openldap/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
--------------070809020500030003020504--