mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Cleanup deploy/devdeploy split
- Don't duplicate shared objects, use the ones from the deploy directory when building dependend packages - Add helper function for moving headers, static libraries and pkgconfig data to devdeploy directory Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
8dca35930b
commit
525b36aa89
28 changed files with 74 additions and 92 deletions
|
@ -31,13 +31,10 @@ deploy() {
|
|||
|
||||
ln -sv bash "$DEPLOY/bin/sh"
|
||||
|
||||
rm -r "$DEPLOY/share/doc"
|
||||
rm -r "$DEPLOY/share/info"
|
||||
rm -r "$DEPLOY/share/man"
|
||||
rm -r "$DEPLOY/share/locale"
|
||||
|
||||
mv "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/share"
|
||||
rm "$DEPLOY/bin/bashbug"
|
||||
|
||||
cp -r "$SCRIPTDIR/$PKGDIR/$PKGNAME/etc" "$DEPLOY"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -38,8 +38,7 @@ deploy() {
|
|||
done
|
||||
|
||||
rm -r "$DEPLOY/docs"
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,8 +26,6 @@ deploy() {
|
|||
|
||||
make PREFIX="$DEPLOY" install
|
||||
|
||||
mv $DEPLOY/include $DEVDEPLOY
|
||||
mv $DEPLOY/lib $DEVDEPLOY
|
||||
rm -r $DEPLOY/man
|
||||
|
||||
${TARGET}-strip --discard-all ${DEPLOY}/bin/bunzip2
|
||||
|
@ -44,4 +42,6 @@ deploy() {
|
|||
ln -s "/bin/bzgrep" "$DEPLOY/bin/bzfgrep"
|
||||
ln -s "/bin/bzmore" "$DEPLOY/bin/bzless"
|
||||
ln -s "/bin/bzdiff" "$DEPLOY/bin/bzcmp"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -28,9 +28,7 @@ deploy() {
|
|||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/share"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/share"
|
||||
rm -r ${DEPLOY}/lib/*.la
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
rm -r "$DEPLOY/share"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -28,13 +28,12 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm -r "$DEPLOY/share/man"
|
||||
rm -r ${DEPLOY}/lib/*.la
|
||||
|
||||
for target in depmod insmod lsmod modinfo modprobe rmmod; do
|
||||
ln -sf kmod $DEPLOY/bin/$target
|
||||
done
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -27,9 +27,7 @@ deploy() {
|
|||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/share"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,9 +26,8 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/bin"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
rm -r "$DEPLOY/bin"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -29,6 +29,5 @@ deploy() {
|
|||
rm -r "$DEPLOY/share"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -29,8 +29,5 @@ deploy() {
|
|||
rm -r "$DEPLOY/share"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,8 +26,7 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -27,9 +27,7 @@ deploy() {
|
|||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/share"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,9 +26,8 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm -r "$DEPLOY/share"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -29,6 +29,5 @@ deploy() {
|
|||
rm -r "$DEPLOY/share"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -33,12 +33,7 @@ deploy() {
|
|||
rm -r "$DEPLOY/share/man"
|
||||
rm "$DEPLOY/bin/ncursesw6-config"
|
||||
|
||||
mkdir -p "$DEVDEPLOY/lib"
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm ${DEPLOY}/lib/*.a
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
|
||||
mkdir -p "${DEVDEPLOY}/include/ncurses"
|
||||
|
||||
|
@ -53,9 +48,7 @@ deploy() {
|
|||
|
||||
ln -s "libncursesw.so.$VERSION" "$DEPLOY/lib/libtinfo.so"
|
||||
ln -s "libncursesw.so.$VERSION" "$DEPLOY/lib/libtinfo.so.$VERSION"
|
||||
ln -s "libncursesw.so.$VERSION" "$DEVDEPLOY/lib/libtinfo.so"
|
||||
ln -s "libncursesw.so.$VERSION" "$DEVDEPLOY/lib/libtinfo.so.$VERSION"
|
||||
ln -s "libncursesw.a.$VERSION" "$DEVDEPLOY/lib/libtinfo.a"
|
||||
ln -s "libncursesw.a" "$DEVDEPLOY/lib/libtinfo.a"
|
||||
|
||||
# only keep relevant terminfo files
|
||||
local olddir="$DEPLOY/share/terminfo.old"
|
||||
|
|
|
@ -26,7 +26,5 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -37,10 +37,8 @@ deploy() {
|
|||
DESTDIR="$DEPLOY" OS=Linux BRANDING="distroname" UPREFIX="" \
|
||||
install
|
||||
|
||||
mv ${DEPLOY}/include ${DEVDEPLOY}
|
||||
cp -R ${DEPLOY}/lib ${DEVDEPLOY}
|
||||
rm -r ${DEPLOY}/lib/pkgconfig
|
||||
rm ${DEPLOY}/lib/*.a
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
|
||||
rm -r ${DEPLOY}/share
|
||||
rm -r ${DEPLOY}/etc
|
||||
|
||||
|
|
|
@ -29,12 +29,9 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
|
||||
rm "$DEPLOY/bin/c_rehash"
|
||||
rm -r "$DEPLOY/etc/ssl/misc"
|
||||
rm -r "$DEPLOY/share"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm ${DEPLOY}/lib/*.a
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -31,8 +31,7 @@ deploy() {
|
|||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -R "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm -r "$DEPLOY/share"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,8 +26,7 @@ deploy() {
|
|||
|
||||
make SHLIB_LIBS="-lncursesw" DESTDIR="$DEPLOY" install
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
rm -r "$DEPLOY/share"
|
||||
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY/"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,10 +26,8 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY/"
|
||||
|
||||
rm -r "$DEPLOY/share"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm ${DEPLOY}/lib/*.a ${DEPLOY}/lib/*.la
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -32,6 +32,5 @@ deploy() {
|
|||
rm ${DEPLOY}/lib/*.la
|
||||
rm -r "$DEPLOY/share"
|
||||
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -59,11 +59,7 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
|
||||
rm -r "$DEPLOY/share/man"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
rm -r "$DEPLOY/share/doc"
|
||||
rm -r ${DEPLOY}/lib/*.la
|
||||
|
||||
|
@ -84,4 +80,6 @@ deploy() {
|
|||
rm "$path"
|
||||
fi
|
||||
done
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,9 +26,8 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install-strip
|
||||
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
rm ${DEPLOY}/lib/*.la
|
||||
rm -r "$DEPLOY/share"
|
||||
rm -r "$DEPLOY/lib/pkgconfig"
|
||||
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
}
|
||||
|
|
|
@ -26,10 +26,8 @@ deploy() {
|
|||
|
||||
make DESTDIR="$DEPLOY" install
|
||||
|
||||
cp -r "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
|
||||
mv "$DEPLOY/share/pkgconfig" "$DEVDEPLOY/lib"
|
||||
|
||||
rm ${DEPLOY}/lib/*.a
|
||||
rm -r ${DEPLOY}/share
|
||||
}
|
||||
|
|
22
util/misc.sh
22
util/misc.sh
|
@ -5,3 +5,25 @@ apply_patches() {
|
|||
patch -p1 < $PATCH
|
||||
done
|
||||
}
|
||||
|
||||
split_dev_deploy() {
|
||||
local lib f
|
||||
|
||||
if [ -d "$1/include" ]; then
|
||||
mv "$1/include" "$2"
|
||||
fi
|
||||
|
||||
if [ -d "$1/lib/pkgconfig" ]; then
|
||||
mkdir -p "$2/lib"
|
||||
mv "$1/lib/pkgconfig" "$2/lib"
|
||||
fi
|
||||
|
||||
for f in ${1}/lib/*.a; do
|
||||
if [ -f "$f" ]; then
|
||||
mkdir -p "$2/lib"
|
||||
mv ${1}/lib/*.a "$2/lib"
|
||||
fi
|
||||
|
||||
break
|
||||
done
|
||||
}
|
||||
|
|
|
@ -24,6 +24,9 @@ install_build_deps() {
|
|||
if [ -d "$devdir/include" ]; then
|
||||
cp -R "$devdir/include" "$TCDIR/$TARGET"
|
||||
fi
|
||||
if [ -d "$PKGDEPLOYDIR/$deppkg/lib" ]; then
|
||||
cp -R "$PKGDEPLOYDIR/$deppkg/lib" "$TCDIR/$TARGET"
|
||||
fi
|
||||
if [ -d "$devdir/lib" ]; then
|
||||
cp -R "$devdir/lib" "$TCDIR/$TARGET"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue