-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pkgsrc hackery
jordansissel edited this page Jun 8, 2011
·
2 revisions
cd pkgsrc
SH=/bin/bash ./bootstrap/bootstrap --unprivileged --prefix $PWD/build/usr/local --pkgdbdir $PWD/pkgdb
PATH=$PWD/build/usr/local/bin:$PWD/build/usr/local/sbin:$PATH
# Might as well fetch the vuln db.
pkg_admin -K $PWD/pkgdb fetch-pkg-vulnerabilities
# Try something simple like 'pkgtools/digest'
target=pkgtools/digest
bmake -C $target clean package USE_DESTDIR=yes LOCALBASE=/usr/local DESTDIR=$PWD/build
version=$(bmake -C $target show-var VARNAME=PKGVERSION)
fullname=$(bmake -C $target show-var VARNAME=PKGNAME)
version="${version}-pkgsrc"
name="$(echo "$fullname" | sed -e "s/-$version\$//")"
# Handle deps
fpmflags=""
for dep in $(bmake -C $target show-depends-pkgpaths) ; do
eval "$(make -C $dep show-vars-eval VARS="PKGNAME PKGVERSION")"
PKGNAME="$(echo "$PKGNAME" | sed -e "s/-$PKGVERSION\$//")"
fpmflags="$fpmflags -d
deps="$(bmake -C $target show-depends-pkgpaths | xargs -n1 sh -c 'make -C $1 )
fpm -s tar -t deb