123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/bash
- # MKit - simple install helper
- # See LICENSE file for copyright and license details.
-
- mkit_import build
- mkit_import target
-
- debstuff__main() {
- #
- # Build Debian stuff (eamed tarball, debian dir)
- #
- local version # package version
- local debian_skel # 'debian' folder skeleton
- local dfsrc # each source file from ^^
- local dftgt # each built packaging file
- target__run dist || die
- version=$(build__cached semver)
-
- # tarball - we should already have by means of 'dist'
- #
- mv "${MKIT_PROJ_PKGNAME}-$version.tar.gz" \
- "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz" \
- || die "could not rename tarball"
- build__record "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz"
-
- # read content of each mandatory file from debian_skel
- #
- debian_skel=$(ini 1value dist:debstuff)
- test -n "$debian_skel" || die "dist:debstuff not specified"
- test -d "$debian_skel" || die "debian directory template found: $debian_skel"
- mkdir -p debian/source
- find "$debian_skel" -type f \
- | while read -r dfsrc; do
- dftgt="debian/${dfsrc#"$debian_skel"}"
- mkdir -p "$(dirname "$dftgt")"
- build__file "$dfsrc" "$dftgt" debstuff
- done
- build__recordr debian
- }
|