Now that pkg create can directly accept both a file and a plist in command line,

directly use it
This commit is contained in:
Baptiste Daroussin 2015-03-18 09:39:31 +00:00
parent 579e668d73
commit d3cd95cf88
13 changed files with 21 additions and 7 deletions

View File

@ -1214,24 +1214,22 @@ create-world-packages:
${DESTDIR}/METALOG
@for plist in ${DESTDIR}/*.plist; do \
plist=$${plist##*/} ; \
test -d ${SRCDIR}/release/packages/$${plist%.plist} || \
test -f ${SRCDIR}/release/packages/$${plist%.plist}.ucl || \
( echo "Unkown package FreeBSD-$${plist%.plist}" ; false ) ; \
done
@for plist in ${DESTDIR}/*.plist; do \
plist=$${plist##*/} ; \
pkgname=$${plist%.plist} ; \
rm -rf ${DESTDIR}/$${pkgname}-manifestdir ; \
cp -r ${SRCDIR}/release/packages/$${pkgname} \
${DESTDIR}/$${pkgname}-manifestdir ; \
sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/$${pkgname}/" \
-e "s/%COMMENT%/Generic comment for $${pkgname}/" \
-e "s/%DESC%/Generic description for $${pkgname}/" \
${DESTDIR}/$${pkgname}-manifestdir/+MANIFEST ; \
${SRCDIR}/release/packages/$${pkgname}.ucl \
> ${DESTDIR}/$${pkgname}.ucl ; \
awk -F\" '/name/ { printf("===> Creating %s-", $$2) } /version/ {print $$2 }' \
${DESTDIR}/$${pkgname}-manifestdir/+MANIFEST ; \
pkg -o ABI_FILE=${DESTDIR}/bin/sh \
create -m ${DESTDIR}/$${pkgname}-manifestdir \
create -M ${DESTDIR}/$${pkgname}.ucl \
-p ${DESTDIR}/$${pkgname}.plist \
-r ${DESTDIR} -o ${DESTDIR} ; \
done

View File

@ -11,3 +11,6 @@ licenses = [ BSD2CLAUSE ]
desc = <<EOD
%DESC%
EOD
post-install = <<EOD
/usr/sbin/kldxref /boot/kernel
EOD

13
release/packages/ssh.ucl Normal file
View File

@ -0,0 +1,13 @@
name = "FreeBSD-ssh"
origin = "base"
version = "%VERSION%"
comment = "Secure SHell"
categories = [ base ]
maintainer = "re@FreeBSD.org"
www = "http://www.FreeBSD.org"
prefix = "/"
licenselogic = "single"
licenses = [ ISCL ]
desc = <<EOD
TODO
EOD