mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
academic/wxMaxima: Use DESTDIR properly.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
76828fdad0
commit
37a52401c5
1 changed files with 8 additions and 12 deletions
|
@ -22,6 +22,9 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# 20230627 bkw: Modified by SlackBuilds.org, BUILD=2:
|
||||
# - use DESTDIR properly, to avoid baking $PKG into the binary.
|
||||
|
||||
# Mar 2021 - updated for v. 21.01, Judah Milgram, milgram at cgpp com
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
@ -29,7 +32,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PRGNAM=wxMaxima
|
||||
SRCNAM=wxmaxima
|
||||
VERSION=${VERSION:-21.01.0}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -41,9 +44,6 @@ if [ -z "$ARCH" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
@ -55,16 +55,12 @@ OUTPUT=${OUTPUT:-/tmp}
|
|||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
@ -78,9 +74,9 @@ cd $SRCNAM-Version-$VERSION
|
|||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
-o -perm 511 \) -exec chmod 755 {} + -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} +
|
||||
|
||||
BUILDDIR=build
|
||||
mkdir -p $BUILDDIR
|
||||
|
@ -88,11 +84,11 @@ mkdir -p $BUILDDIR
|
|||
export PATH="/opt/cmake-202x/bin:$PATH"
|
||||
cmake \
|
||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=$PKG/usr \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-G Ninja -S . -B $BUILDDIR
|
||||
cmake --build $BUILDDIR
|
||||
cmake --install $BUILDDIR
|
||||
DESTDIR=$PKG cmake --install $BUILDDIR
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
|
Loading…
Reference in a new issue