diff options
Diffstat (limited to 'development/uncrustify/uncrustify.SlackBuild')
-rw-r--r-- | development/uncrustify/uncrustify.SlackBuild | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/development/uncrustify/uncrustify.SlackBuild b/development/uncrustify/uncrustify.SlackBuild index 7b170d05ad..6a8c45c795 100644 --- a/development/uncrustify/uncrustify.SlackBuild +++ b/development/uncrustify/uncrustify.SlackBuild @@ -1,13 +1,17 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for uncrustify - +# Copyright 2015-2023, Zhu Qun-Ying +# # Written by Aleksandar Samardzic <asamardzic@gmail.com> +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=uncrustify -VERSION=${VERSION:-0.71.0} +VERSION=${VERSION:-0.78.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -17,7 +21,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -48,13 +59,12 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkdir -p build cd build - cmake \ + cmake -G Ninja \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release .. - make - make install DESTDIR=$PKG + DESTDIR=$PKG ninja install cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ @@ -64,12 +74,13 @@ mv $PKG/usr/share/man $PKG/usr gzip -9 $PKG/usr/man/man1/* mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog documentation \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a documentation $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/doc/uncrustify/* $PKG/usr/doc/$PRGNAM-$VERSION +rm -rf $PKG/usr/share cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |