imapfilter convenience wrapper

debstuff 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # MKit - simple install helper
  3. # See LICENSE file for copyright and license details.
  4. mkit_import build
  5. mkit_import target
  6. debstuff__main() {
  7. #
  8. # Build Debian stuff (eamed tarball, debian dir)
  9. #
  10. local version # package version
  11. local debian_skel # 'debian' folder skeleton
  12. local dfsrc # each source file from ^^
  13. local dftgt # each built packaging file
  14. target__run dist || die
  15. version=$(build__cached semver)
  16. # tarball - we should already have by means of 'dist'
  17. #
  18. mv "${MKIT_PROJ_PKGNAME}-$version.tar.gz" \
  19. "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz" \
  20. || die "could not rename tarball"
  21. build__record "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz"
  22. # read content of each mandatory file from debian_skel
  23. #
  24. debian_skel=$(ini 1value dist:debstuff)
  25. test -n "$debian_skel" || die "dist:debstuff not specified"
  26. test -d "$debian_skel" || die "debian directory template found: $debian_skel"
  27. mkdir -p debian/source
  28. find "$debian_skel" -type f \
  29. | while read -r dfsrc; do
  30. dftgt="debian/${dfsrc#"$debian_skel"}"
  31. mkdir -p "$(dirname "$dftgt")"
  32. build__file "$dfsrc" "$dftgt" debstuff
  33. done
  34. build__recordr debian
  35. }