diff options
author | joerg <joerg@pkgsrc.org> | 2015-12-27 12:36:42 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-12-27 12:36:42 +0000 |
commit | d5386faf7a169acf97d0c3a35036a5b104cbdc45 (patch) | |
tree | 9c2c1a0a47c8f16295e614c27a2204d40b111063 /bootstrap | |
parent | 993b195ce0e82c25cae220225f103eee1d1b1abf (diff) | |
download | pkgsrc-d5386faf7a169acf97d0c3a35036a5b104cbdc45.tar.gz |
Include basic package creation logic in the bootstrap version of
pkg_install. Use this with PKG_COMPRESSION=none to convert all of the
bootstrap to USE_DESTDIR=yes.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 9a05c51feee..c2b3a1eab0f 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.223 2015/12/18 13:49:07 jperkin Exp $ +# $NetBSD: bootstrap,v 1.224 2015/12/27 12:36:42 joerg Exp $ # # Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> # All rights reserved. @@ -1193,16 +1193,27 @@ esac # bootstrap pkg_install echo_msg "Bootstrapping pkgtools" +copy_src $pkgsrcdir/archivers/libarchive/files libarchive +run_cmd "(cd $wrkdir/libarchive; env $BSTRAP_ENV \ +$shprog ./configure $configure_quiet_flags --enable-static --disable-shared \ +--disable-bsdtar --disable-bsdcpio --disable-posix-regex-lib --disable-xattr \ +--disable-acl --without-zlib --without-bz2lib --without-lzmadec \ +--without-iconv --without-lzma --without-lzo2 --without-nettle \ +--without-openssl --without-xml2 --without-expat && $bmake -j$make_jobs)" copy_src $pkgsrcdir/pkgtools/pkg_install/files pkg_install run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV \ -CPPFLAGS='$CPPFLAGS -I../libnbcompat -I../../libnbcompat' \ -LDFLAGS='$LDFLAGS -L../libnbcompat -L../../libnbcompat' \ +CPPFLAGS='$CPPFLAGS -I${wrkdir}/libnbcompat -I${wrkdir}/libarchive/libarchive' \ +LDFLAGS='$LDFLAGS -L${wrkdir}/libnbcompat' \ LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C \ --enable-bootstrap --prefix=$prefix --sysconfdir=$sysconfdir \ ---with-pkgdbdir=$pkgdbdir --infodir=$infodir --mandir=$mandir $pkg_install_args && $bmake -j$make_jobs)" +--with-pkgdbdir=$pkgdbdir --infodir=$infodir --mandir=$mandir $pkg_install_args && \ +STATIC_LIBARCHIVE=$wrkdir/libarchive/.libs/libarchive.a \ +PKGSRC_MACHINE_ARCH="$machine_arch" $bmake -j$make_jobs)" +run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/add/pkg_add $wrkdir/sbin/pkg_add" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/admin/pkg_admin $wrkdir/sbin/pkg_admin" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/create/pkg_create $wrkdir/sbin/pkg_create" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/info/pkg_info $wrkdir/sbin/pkg_info" +echo "PKG_ADD_CMD?= $wrkdir/sbin/pkg_add" >> ${BOOTSTRAP_MKCONF} echo "PKG_ADMIN_CMD?= $wrkdir/sbin/pkg_admin" >> ${BOOTSTRAP_MKCONF} echo "PKG_CREATE_CMD?= $wrkdir/sbin/pkg_create" >> ${BOOTSTRAP_MKCONF} echo "PKG_INFO_CMD?= $wrkdir/sbin/pkg_info" >> ${BOOTSTRAP_MKCONF} @@ -1276,7 +1287,7 @@ echo ".endif # end pkgsrc settings" >> ${BOOTSTRAP_MKCONF} # build and register packages # usage: build_package <packagedirectory> [additional arguments] build_package() { - run_cmd "(cd $pkgsrcdir/$1 && $bmake MAKE_JOBS=${make_jobs} USE_DESTDIR=no -DPKG_PRESERVE MAKECONF=${BOOTSTRAP_MKCONF} install)" + run_cmd "(cd $pkgsrcdir/$1 && $bmake MAKE_JOBS=${make_jobs} USE_DESTDIR=yes PKG_COMPRESSION=none -DPKG_PRESERVE MAKECONF=${BOOTSTRAP_MKCONF} install)" } # |