summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-07-14 16:32:01 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-07-14 16:32:01 (EDT)
commit57db596822c4d3727374b258d218e8986cf3a92a (patch)
treef6759aae9e2fa86c2da4f1427df84e6c14e1f182
parent1f88a9f8f183d25c0e3a4ac6d551327c79e64513 (diff)
Add build.mk files
-rwxr-xr-xbuild4
-rw-r--r--src/1/build.mk31
-rw-r--r--src/build.mk2
3 files changed, 37 insertions, 0 deletions
diff --git a/build b/build
index 1c2d34f..4d73d41 100755
--- a/build
+++ b/build
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+pkgdatadir = platconf-pkg-tools.data/usr/share/platconf-pkg-tools
+
nop:
@:
@@ -8,3 +10,5 @@ build:
touch $@
install: build
+ install -D -m 0644 src/build.mk $(pkgdatadir)/build.mk
+ install -D -m 0644 src/1/build.mk $(pkgdatadir)/1/build.mk
diff --git a/src/1/build.mk b/src/1/build.mk
new file mode 100644
index 0000000..eef0ed2
--- /dev/null
+++ b/src/1/build.mk
@@ -0,0 +1,31 @@
+ppt_plat = $${OPK_SOURCE\#config-}
+ppt_pkg_dir = config-$${pkg}-$(ppt_plat).data
+ppt_platconf_dir = $(ppt_pkg_dir)/usr/share/platconf/$(ppt_plat)/$${pkg}_$${ver}
+
+nop:
+ @:
+
+build:
+ @:
+
+install: build
+ set -e; \
+ for pkg in src/build/*; do \
+ pkg="$${pkg#src/build/}"; \
+ for ver in "src/build/$${pkg}/"*; do \
+ ver="$${ver#src/build/$${pkg}/}"; \
+ mkdir -p "$(ppt_platconf_dir)"; \
+ cp -p "src/build/$${pkg}/$${ver}/"* "$(ppt_platconf_dir)"; \
+ done; \
+ done
+ set -e; \
+ for pkg in src/run/*; do \
+ pkg="$${pkg#src/run/}"; \
+ mkdir "config-$${pkg}.data"; \
+ find "src/run/$${pkg}" -type f | while read -r file; do \
+ file="$${file#src/run/$${pkg}}"; \
+ mkdir -p "config-$${pkg}.data/$${file%/*}"; \
+ cp -p "src/run/$${pkg}/$${file}" \
+ "config-$${pkg}.data/$${file}"; \
+ done; \
+ done
diff --git a/src/build.mk b/src/build.mk
new file mode 100644
index 0000000..ff1414c
--- /dev/null
+++ b/src/build.mk
@@ -0,0 +1,2 @@
+include ../ppt-version
+include /usr/share/platconf-pkg-tools/$(ppt_version)/build.mk