summaryrefslogtreecommitdiffstats
path: root/t-func/local.at
diff options
context:
space:
mode:
Diffstat (limited to 't-func/local.at')
-rw-r--r--t-func/local.at32
1 files changed, 32 insertions, 0 deletions
diff --git a/t-func/local.at b/t-func/local.at
new file mode 100644
index 0000000..3a221c1
--- /dev/null
+++ b/t-func/local.at
@@ -0,0 +1,32 @@
+# Dpkg helper macros
+
+m4_pattern_forbid([^DPKG_])
+
+# DPKG_GEN_CONTROL([$pkgname])
+m4_define([DPKG_GEN_CONTROL], [
+ mkdir -p '$1/DEBIAN'
+
+ cat >'$1/DEBIAN/control' <<CTRL_TEMPL
+Package: $1
+Version: 0.0-1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Description: test package
+CTRL_TEMPL
+])
+
+# DPKG_MOD_CONTROL([$pkgname], [$sedexpr])
+m4_define([DPKG_MOD_CONTROL], [
+ sed -i -e '$2' '$1/DEBIAN/control'
+])
+
+# DPKG_GEN_FILE([$pkgname], [$file], [$contents])
+m4_define([DPKG_GEN_FILE], [
+ mkdir -p '$1/DEBIAN'
+
+ cat >'$1/DEBIAN/$2' <<CTRL_TEMPL
+$3
+CTRL_TEMPL
+])