Commit 1e58bab1 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Implemented 'strip' file for packages - may contain FIND and STRIP variables controlling stripping

parent c083249d
...@@ -70,7 +70,12 @@ $(PACKAGES): ...@@ -70,7 +70,12 @@ $(PACKAGES):
rm -rf work rm -rf work
rm -rf mnt rm -rf mnt
mkdir -p /usr/share/packages mkdir -p /usr/share/packages
find root -type f ! -name vmlinu* -exec strip --strip-unneeded -K grub_mod_init -K grub_mod_fini '{}' ';' 2> /dev/null if [ -f /build/packages/$(firstword $(subst ., ,$@))/strip ] ; then \
source /build/packages/$(firstword $(subst ., ,$@))/strip ; \
find root -type f $$FIND -exec strip --strip-unneeded $$STRIP '{}' ';' 2> /dev/null ; \
else \
find root -type f -exec strip --strip-unneeded '{}' ';' 2> /dev/null ; \
fi
find root -type c -exec bash -c "FILE=\$$(ls -l '{}' | awk '/0, 0/ {print \$$NF}'); if [ ! -z \$$FILE ]; then MAIN=\$$(echo \$$FILE | sed -e 's/root//'); rm -rf \$$MAIN \$$FILE; fi" ';' find root -type c -exec bash -c "FILE=\$$(ls -l '{}' | awk '/0, 0/ {print \$$NF}'); if [ ! -z \$$FILE ]; then MAIN=\$$(echo \$$FILE | sed -e 's/root//'); rm -rf \$$MAIN \$$FILE; fi" ';'
find root -type f -exec md5sum '{}' ';' | sed -e 's/ root/ /' >> /usr/share/packages/$@.md5 find root -type f -exec md5sum '{}' ';' | sed -e 's/ root/ /' >> /usr/share/packages/$@.md5
if [ -s /usr/share/packages/$@.md5 ] ; then \ if [ -s /usr/share/packages/$@.md5 ] ; then \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment