graphics/blender: Fix doc and icon dirs, strip python stuff.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2022-04-04 22:05:36 -04:00
parent 5c0fa7644c
commit 665f38b530
1 changed files with 19 additions and 11 deletions

View File

@ -24,13 +24,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220404 bkw: Modified by SlackBuilds.org, BUILD=2:
# - strip the python interpreter and one shared lib that weren't already.
# - remove the broken symlinks in the icons dir. upstream doesn't include
# PNG icons (I assume it did at one time), only an SVG one.
# - add SlackBuild to doc dir.
# Thanks to Giorgio Peron <giorgio.peron@gmail.com> for some build tips
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=blender
VERSION=${VERSION:-2.90.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -47,9 +53,6 @@ case "$( uname -m )" in
*) ARCH=$( uname -m ) ;;
esac
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -80,6 +83,7 @@ chown -R root:root .
# Move the docs to our standard location first
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mv *.txt readme.html \
$PKG/usr/doc/$PRGNAM-$VERSION
@ -97,14 +101,18 @@ if [ "$LMTFA" != "yes" ]; then
rm -f $PKG/opt/blender/lib/libGL*
fi
# Put symlinks to icons in the standard places
for size in 16x16 22x22 24x24 32x32 48x48 ; do
mkdir -p $PKG/usr/share/icons/hicolor/$size/apps
ln -s /opt/blender/icons/$size/apps/blender.png \
$PKG/usr/share/icons/hicolor/$size/apps/
done
# 20220404 bkw: a couple of things aren't stripped... this
# is noticeably faster than the template find|strip.
find $PKG/opt/blender -type f -print0 | \
xargs -0 file -m /etc/file/magic/elf | \
grep 'ELF.*dynamic.*not stripped' | \
cut -d: -f1 | xargs strip
# Put symlinks to icons in the standard places.
# 20220404 bkw: looks like upstream got rid of PNG icons and only
# ships an SVG (which has moved).
mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps
ln -s /opt/blender/icons/scalable/apps/blender.svg \
ln -s ../../../../../../opt/blender/blender.svg \
$PKG/usr/share/icons/hicolor/scalable/apps/
# Add a desktop menu entry