Package: mmdebstrap
Version: 0.6.0-1
Severity: wishlist

Hi, you expressed some interest in including this "clever" tarring in
your examples.

    # GOAL: pre-build libdvdcss2_NNN_amd64.deb, so
    #       I can distribute it to airgapped, compiler-less systems.
    $ mmdebstrap buster --components=main,contrib --include=libdvd-pkg 
--customize-hook='chroot $1 /usr/lib/libdvd-pkg/b-i_libdvdcss.sh' |
      tar --extract --verbose --exclude=build --strip-components=3 
./usr/src/libdvd-pkg/

It automatically tears down the build environment, leaving you with just the 
build results in your working tree:

    $ ls -1 libdvd-pkg
    libdvdcss-dev_1.4.2-1~local_amd64.deb
    libdvdcss2-1.4.2-1.is-installed
    libdvdcss2-dbgsym_1.4.2-1~local_amd64.deb
    libdvdcss2_1.4.2-1~local_amd64.build
    libdvdcss2_1.4.2-1~local_amd64.deb
    libdvdcss_1.4.2-1~local_amd64.buildinfo
    libdvdcss_1.4.2-1~local_amd64.changes
    libdvdcss_1.4.2.orig.tar.bz2

The above command is just enough to work; this refinement makes it go faster 
and extract less:

    $ mmdebstrap buster --components=main,contrib --include=libdvd-pkg 
--customize-hook='chroot $1 /usr/lib/libdvd-pkg/b-i_libdvdcss.sh' \
          --variant=apt \
          --aptopt='Acquire::http::Proxy "http://127.1:3142";' \
          --dpkgopt=force-unsafe-io \
          
--dpkgopt=path-exclude=/usr/share/{doc,info,man,omf,help,gnome/help}/'*' |
      tar --extract --verbose --strip-components=4 --wildcards  
'./usr/src/libdvd-pkg/libdvdcss2_*_*.deb'

    $ ls
    libdvdcss2_1.4.2-1~local_amd64.deb

Reply via email to