commit ac90eb3aa3e52037f89b071be0ba44ef8660123e parent b4165184fed0cbc6913eaab207c2f5f110c38aca Author: Daniel Bainton <dpb@driftaway.org> Date: Sun, 9 Mar 2014 13:46:05 +0200 Move each package to their own dir Also support for the $pkgdir variable in build files, which will include the full path to the directory of the package (for patches, configs etc) Diffstat:
44 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/mkfile b/mkfile @@ -23,11 +23,13 @@ fetch-all fetch-world:VQ: ${fetchpkgs} `{ mkdir -p src } `{ mkdir -p .cache } `{ printf '# auto-generated file, do not edit\n' > pkgs.mk } -`{ cd pkgs && for pkg in *; do cat $pkg ../stuff/fetch-pkg.mk |\ +`{ cd pkgs && for pkg in *; do cat $pkg/build ../stuff/fetch-pkg.mk |\ sed -e "s,^build:,$pkg:QP./stuff/cmp-pkgs: $pkg-fetch pkgs/$pkg," |\ sed -e "s,^fetch-target:,$pkg-fetch:," |\ sed -e "s,^v=,_${pkg}_v=," |\ + sed -e "s,^pkgdir=,_${pkg}_pkgdir=$top/pkgs/$pkg," |\ sed -e "s,\$v,\${_${pkg}_v},g" |\ + sed -e "s,\$pkgdir,\${_${pkg}_pkgdir},g" |\ sed -e "s,\$url,\${_${pkg}_url},g" |\ sed -e "s, url=, _${pkg}_url=,g" |\ sed -e "s,\$git,\${_${pkg}_git},g" |\ diff --git a/pkgs/9base b/pkgs/9base/build diff --git a/pkgs/abduco b/pkgs/abduco/build diff --git a/pkgs/busybox b/pkgs/busybox/build diff --git a/pkgs/crossmusl b/pkgs/crossmusl/build diff --git a/pkgs/dropbear b/pkgs/dropbear/build diff --git a/pkgs/dvtm b/pkgs/dvtm/build diff --git a/pkgs/dwm b/pkgs/dwm/build diff --git a/pkgs/e2fsprogs b/pkgs/e2fsprogs/build diff --git a/pkgs/extlinux b/pkgs/extlinux/build diff --git a/pkgs/file b/pkgs/file/build diff --git a/pkgs/fs b/pkgs/fs/build diff --git a/pkgs/jupp b/pkgs/jupp/build diff --git a/pkgs/kernel b/pkgs/kernel/build diff --git a/pkgs/libevent b/pkgs/libevent/build diff --git a/pkgs/linux_fw b/pkgs/linux_fw/build diff --git a/pkgs/make b/pkgs/make/build diff --git a/pkgs/man b/pkgs/man/build diff --git a/pkgs/mksh b/pkgs/mksh/build diff --git a/pkgs/mpg123 b/pkgs/mpg123/build diff --git a/pkgs/ncurses b/pkgs/ncurses/build diff --git a/pkgs/prepare_root b/pkgs/prepare_root/build diff --git a/pkgs/quark b/pkgs/quark/build diff --git a/pkgs/rsync b/pkgs/rsync/build diff --git a/pkgs/sbase b/pkgs/sbase/build diff --git a/pkgs/sdhcp b/pkgs/sdhcp/build diff --git a/pkgs/sic b/pkgs/sic/build diff --git a/pkgs/sinit b/pkgs/sinit/build diff --git a/pkgs/smdev b/pkgs/smdev/build diff --git a/pkgs/stage0 b/pkgs/stage0/build diff --git a/pkgs/terminus b/pkgs/terminus/build diff --git a/pkgs/tinyalsa b/pkgs/tinyalsa/build diff --git a/pkgs/tinywm b/pkgs/tinywm/build diff --git a/pkgs/tinyxlib b/pkgs/tinyxlib/build diff --git a/pkgs/tinyxserver b/pkgs/tinyxserver/build diff --git a/pkgs/tmux b/pkgs/tmux/build diff --git a/pkgs/ubase b/pkgs/ubase/build diff --git a/pkgs/uuterm b/pkgs/uuterm/build diff --git a/pkgs/vim b/pkgs/vim/build diff --git a/pkgs/xsetroot b/pkgs/xsetroot/build diff --git a/pkgs/zlib b/pkgs/zlib/build diff --git a/stuff/cmp-fetch b/stuff/cmp-fetch @@ -1,4 +1,4 @@ #!/bin/sh pkg=`echo $1 | sed -e 's,-fetch$,,'` -cmp -s .cache/$1 pkgs/$pkg +cmp -s .cache/$1 pkgs/$pkg/build diff --git a/stuff/cmp-pkgs b/stuff/cmp-pkgs @@ -1,3 +1,3 @@ #!/bin/sh -cmp -s .cache/$1 pkgs/$1 +cmp -s .cache/$1 pkgs/$1/build diff --git a/stuff/fetch-pkg.mk b/stuff/fetch-pkg.mk @@ -1,4 +1,6 @@ - cp $top/pkgs/$target $top/.cache/$target + cp $pkgdir/build $top/.cache/$target + +pkgdir= fetch-target:QP./stuff/cmp-fetch: . cd src @@ -30,4 +32,4 @@ fetch-target:QP./stuff/cmp-fetch: . ;; esac fi - cp $top/pkgs/$pkg $top/.cache/$target + cp $pkgdir/build $top/.cache/$target