run pw_mkdb and cap_mkdb at post-installation for cross installation the version

from the host would be run but the generated files will be on the target
respecing the endianness of the target
This commit is contained in:
Baptiste Daroussin 2015-03-18 16:06:04 +00:00
parent 9f4256d525
commit 8cf263c843
2 changed files with 9 additions and 1 deletions

View File

@ -1218,13 +1218,17 @@ create-world-packages:
test -f ${SRCDIR}/release/packages/$${plist%.plist}.ucl || \
( echo "Unkown package FreeBSD-$${plist%.plist}" ; false ) ; \
done
@for plist in ${DESTDIR}/*.plist; do \
@cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
for plist in ${DESTDIR}/*.plist; do \
plist=$${plist##*/} ; \
pkgname=$${plist%.plist} ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/$${pkgname}/" \
-e "s/%COMMENT%/Generic comment for $${pkgname}/" \
-e "s/%DESC%/Generic description for $${pkgname}/" \
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
-e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \
${SRCDIR}/release/packages/$${pkgname}.ucl \
> ${DESTDIR}/$${pkgname}.ucl ; \
awk -F\" '/name/ { printf("===> Creating %s-", $$2) } /version/ {print $$2 }' \

View File

@ -11,3 +11,7 @@ licenses = [ BSD2CLAUSE ]
desc = <<EOD
%DESC%
EOD
post-install = <<EOD
cap_mkdb %CAP_MKDB_ENDIAN% ${ROOTDIR}/etc/login.conf
pwd_mkdb %PWD_MKDB_ENDIAN% -i -p -d ${ROOTDIR}/etc ${ROOTDIR}/etc/master.passwd
EOD