#!/bin/bash # # SweetHome3D.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # SweetHome3D.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="SweetHome3D" PACKAGE_EXT="tgz" VERSION=${VERSION:=7.1} BUILD=${BUILD:=1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi if [ "$ARCH" = "i486" ]; then TARGET="x86" elif [ "$ARCH" = "i686" ]; then TARGET="x86" elif [ "$ARCH" = "x86_64" ]; then TARGET="x64" fi check_required SRC="${PACKAGE}-$VERSION-linux-${TARGET}.$PACKAGE_EXT" URL="http://downloads.sourceforge.net/project/sweethome3d/$PACKAGE/$PACKAGE-${VERSION}/$SRC" get_source $SRC $URL unpack_source $SRC $PACKAGE-$VERSION # Copy executable file mkdir -p $PKG/usr/bin cp -a SweetHome3D $PKG/usr/bin # Fix path for java and libs of SweetHome3D sed -i "s/\"\$PROGRAM_DIR\"\/jre8\/bin\/java/\/usr\/lib${LIBDIRSUFFIX}\/java\/bin\/java/g" $PKG/usr/bin/$PACKAGE sed -i "s/\"\$PROGRAM_DIR\"\/jre8\/lib/\/usr\/lib${LIBDIRSUFFIX}\/java\/jre\/lib/g" $PKG/usr/bin/$PACKAGE sed -i "s/\"\$PROGRAM_DIR\"\/lib/\/usr\/lib${LIBDIRSUFFIX}\/$PACKAGE/g" $PKG/usr/bin/$PACKAGE # Copy libraries of program mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/$PACKAGE cp -a lib/* $PKG/usr/lib${LIBDIRSUFFIX}/$PACKAGE # Install icons mkdir -p $PKG/usr/share/pixmaps cat $CWD/SweetHome3D.png > $PKG/usr/share/pixmaps/SweetHome3D.png mkdir -p $PKG/usr/share/applications cat $CWD/SweetHome3D.desktop > $PKG/usr/share/applications/SweetHome3D.desktop # Copy documentation mkdir -p $DOCS cp -a COPYING.TXT LICENSE.TXT THIRDPARTY-LICENSE-*.TXT THIRDPARTY-LICENSE-JMF.HTML $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi