From d88085a2a474026282e462a72fcc8b1780b0af73 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 11 Mar 2014 21:16:57 -0400 Subject: build: Detect plat, pkgs, and vers automatically. --- 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 -- cgit v0.9.1