Merge pull request #2 from lrusak/seo-stripping

stripping changes
This commit is contained in:
MilhouseVH 2016-03-14 17:55:15 +00:00
commit d8f6577b52
7 changed files with 32 additions and 3 deletions

View File

@ -462,3 +462,10 @@ show_config() {
echo -e "$config_message"
}
# strip
debug_strip() {
if [ ! "$DEBUG" = yes ]; then
$STRIP `find $* -type f -executable 2>/dev/null` 2>/dev/null || :
fi
}

View File

@ -24,7 +24,7 @@ if [ "$DEBUG" = yes ]; then
else
TARGET_CFLAGS="$TARGET_CFLAGS -fomit-frame-pointer"
TARGET_CXXFLAGS="$TARGET_CXXFLAGS -fomit-frame-pointer"
TARGET_LDFLAGS="$TARGET_LDFLAGS -s"
TARGET_LDFLAGS="$TARGET_LDFLAGS"
fi
TARGET_CPPFLAGS=

View File

@ -130,4 +130,8 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/bin/pydoc
rm -rf $INSTALL/usr/bin/smtpd.py
rm -rf $INSTALL/usr/bin/python*-config
# strip
chmod u+w $INSTALL/usr/lib/libpython*.so.*
debug_strip $INSTALL/usr
}

View File

@ -408,6 +408,8 @@ post_makeinstall_target() {
mkdir -p $INSTALL/usr/share/kodi/media/Fonts
cp $PKG_DIR/fonts/*.ttf $INSTALL/usr/share/kodi/media/Fonts
fi
debug_strip $INSTALL/usr/lib/kodi/kodi.bin
}
post_install() {

View File

@ -66,6 +66,8 @@ post_makeinstall_target() {
sed -i $INSTALL/etc/ssh/sshd_config -e "s|^#PermitRootLogin.*|PermitRootLogin yes|g"
echo "PubkeyAcceptedKeyTypes +ssh-dss" >> $INSTALL/etc/ssh/sshd_config
debug_strip $INSTALL/usr
}
post_install() {

View File

@ -209,6 +209,10 @@ post_makeinstall_target() {
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/shutdown
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/telinit
# strip
debug_strip $INSTALL/usr
# defaults
mkdir -p $INSTALL/usr/config
cp -PR $PKG_DIR/config/* $INSTALL/usr/config

View File

@ -352,8 +352,18 @@ if [ ! -f $STAMP ]; then
find $INSTALL -type d -exec rmdir -p "{}" ";" 2>/dev/null || true
if [ ! "$DEBUG" = yes ]; then
$STRIP `find $INSTALL -name "*.so" 2>/dev/null` 2>/dev/null || :
$STRIP `find $INSTALL -name "*.so.[0-9]*" 2>/dev/null` 2>/dev/null || :
$STRIP `find $INSTALL \
-type f -name "*.so*" \
! -name "ld-*.so" \
! -name "libc-*.so" \
! -name "libpthread-*.so" \
! -name "libthread_db-*so" \
2>/dev/null` 2>/dev/null || :
if [ "$TARGET" = "init" ]; then
$STRIP `find $INSTALL -type f -name "*.so*" 2>/dev/null` 2>/dev/null || :
fi
$STRIP `find $INSTALL/bin $INSTALL/usr/bin $INSTALL/sbin $INSTALL/usr/sbin \
-type f -executable 2>/dev/null` 2>/dev/null || :
fi
fi
fi