summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-03-11 21:16:57 (EDT)
committer P. J. McDermott <pjm@nac.net>2014-03-11 21:16:57 (EDT)
commitd88085a2a474026282e462a72fcc8b1780b0af73 (patch)
tree98ce48a90b8e5f5cdcd07d8818d546c1399b97af
parent0a325d164bccd3bdbe7c6dc6a5f30cdc23837878 (diff)
build: Detect plat, pkgs, and vers automatically.
-rwxr-xr-xbuild24
-rw-r--r--src/busybox/1.21.1/busybox.config (renamed from src/busybox/config)0
2 files changed, 12 insertions, 12 deletions
diff --git a/build b/build
index 28a91e8..2f1de60 100755
--- a/build
+++ b/build
@@ -1,16 +1,8 @@
#!/usr/bin/make -f
-# Host/target platform:
-plat = dev
-
-# The OPK_SOURCE_VERSION_UPSTREAMs of packages:
-busybox_ver = 1.21.1
-
-# Nothing beyond this point requires updating for platform porting or new
-# upstream package versions.
-
-base = /usr/share/platconf/$(plat)
-busybox_platconf = config-busybox-$(plat).data/$(base)/busybox_$(busybox_ver)
+plat = $${OPK_SOURCE\#config-}
+config_pkg = config-$${pkg}-$(plat)
+platconf_dir = $(config_pkg).data/usr/share/platconf/$(plat)/$${pkg}_$${ver}
nop:
@:
@@ -19,4 +11,12 @@ build:
@:
install: build
- install -D src/busybox/config $(busybox_platconf)/busybox.config
+ set -e; \
+ for pkg in src/*; do \
+ pkg="$${pkg#src/}"; \
+ for ver in "src/$${pkg}/"*; do \
+ ver="$${ver#src/$${pkg}/}"; \
+ mkdir -p "$(platconf_dir)"; \
+ cp -p "src/$${pkg}/$${ver}/"* "$(platconf_dir)"; \
+ done; \
+ done
diff --git a/src/busybox/config b/src/busybox/1.21.1/busybox.config
index 9bc8536..9bc8536 100644
--- a/src/busybox/config
+++ b/src/busybox/1.21.1/busybox.config