mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Eliminate latent, per package deploy directory
Same process as for the build dir. We have one intermediate deploy directory that the packaes installs it self to, then we package the contents, finally we nuke the build and deploy directory before starting with the next package. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
2afd8fc20b
commit
2c741e06f3
6 changed files with 12 additions and 15 deletions
12
mk.sh
12
mk.sh
|
@ -31,7 +31,7 @@ REPODIR="$BUILDROOT/$PRODUCT/repo"
|
|||
DEPENDSLIST="$BUILDROOT/$PRODUCT/depends"
|
||||
PROVIDESLIST="$BUILDROOT/$PRODUCT/provides"
|
||||
|
||||
mkdir -p "$PKGDOWNLOADDIR" "$PKGSRCDIR" "$PKGLOGDIR" "$PKGDEPLOYDIR"
|
||||
mkdir -p "$PKGDOWNLOADDIR" "$PKGSRCDIR" "$PKGLOGDIR"
|
||||
mkdir -p "$REPODIR"
|
||||
|
||||
pushd "$SCRIPTDIR" > /dev/null
|
||||
|
@ -101,16 +101,16 @@ while read pkg; do
|
|||
|
||||
run_pkg_command "build"
|
||||
run_pkg_command "deploy"
|
||||
deploy_dev_cleanup "$PKGDEPLOYDIR/$PKGNAME"
|
||||
strip_files ${PKGDEPLOYDIR}/${PKGNAME}/{bin,lib}
|
||||
deploy_dev_cleanup "$PKGDEPLOYDIR"
|
||||
strip_files ${PKGDEPLOYDIR}/{bin,lib}
|
||||
|
||||
for f in $SUBPKG; do
|
||||
pkg pack -r "$REPODIR" \
|
||||
-d "$PKGDEPLOYDIR/$PKGNAME/${f}.desc" \
|
||||
-l "$PKGDEPLOYDIR/$PKGNAME/${f}.files"
|
||||
-d "$PKGDEPLOYDIR/${f}.desc" \
|
||||
-l "$PKGDEPLOYDIR/${f}.files"
|
||||
done
|
||||
|
||||
rm -rf "$PKGBUILDDIR"
|
||||
rm -rf "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
||||
touch "$PKGLOGDIR/.$pkg"
|
||||
fi
|
||||
done < "$PACKAGELIST"
|
||||
|
|
|
@ -25,7 +25,7 @@ deploy() {
|
|||
local SOURCE="$1"
|
||||
local DEPLOY="$2"
|
||||
|
||||
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
|
||||
tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" *
|
||||
|
||||
touch "$2/$PKGNAME.files"
|
||||
cat > "$2/$PKGNAME.desc" <<_EOF
|
||||
|
|
|
@ -29,7 +29,7 @@ deploy() {
|
|||
local SOURCE="$1"
|
||||
local DEPLOY="$2"
|
||||
|
||||
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
|
||||
tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" *
|
||||
|
||||
touch "$2/$PKGNAME.files"
|
||||
cat > "$2/$PKGNAME.desc" <<_EOF
|
||||
|
|
|
@ -27,7 +27,7 @@ deploy() {
|
|||
local SOURCE="$1"
|
||||
local DEPLOY="$2"
|
||||
|
||||
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
|
||||
tar czf "$BUILDROOT/$PRODUCT/$PKGNAME.tar.gz" *
|
||||
|
||||
touch "$2/$PKGNAME.files"
|
||||
cat > "$2/$PKGNAME.desc" <<_EOF
|
||||
|
|
|
@ -41,7 +41,7 @@ deploy_dev_cleanup() {
|
|||
}
|
||||
|
||||
unfuck_libtool() {
|
||||
local libdir="$PKGDEPLOYDIR/$PKGNAME/lib"
|
||||
local libdir="$PKGDEPLOYDIR/lib"
|
||||
local f
|
||||
|
||||
for f in $(find $PKGBUILDDIR -type f -name '*.la' -o -name '*.lai'); do
|
||||
|
|
|
@ -12,17 +12,14 @@ include_pkg() {
|
|||
|
||||
run_pkg_command() {
|
||||
local FUNCTION="$1"
|
||||
local DEPLOYDIR="$PKGDEPLOYDIR/$PKGNAME"
|
||||
local LOGFILE="$PKGLOGDIR/${PKGNAME}-${FUNCTION}.log"
|
||||
local SRC="$PKGSRCDIR/$SRCDIR"
|
||||
|
||||
echo "$PKGNAME - $FUNCTION"
|
||||
|
||||
mkdir -p "$PKGBUILDDIR" "$DEPLOYDIR"
|
||||
mkdir -p "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
||||
|
||||
pushd "$PKGBUILDDIR" > /dev/null
|
||||
$FUNCTION "$SRC" "$DEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
||||
$FUNCTION "$SRC" "$PKGDEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
||||
popd > /dev/null
|
||||
|
||||
(rmdir "$DEPLOYDIR" || true) 2> /dev/null ;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue