mirror of git://git.2f30.org/morpheus.git
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)
This commit is contained in:
parent
b4165184fe
commit
ac90eb3aa3
4
mkfile
4
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" |\
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
cmp -s .cache/$1 pkgs/$1
|
||||
cmp -s .cache/$1 pkgs/$1/build
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue