diff options
Diffstat (limited to 'development/xnedit/xnedit.SlackBuild')
-rw-r--r-- | development/xnedit/xnedit.SlackBuild | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/development/xnedit/xnedit.SlackBuild b/development/xnedit/xnedit.SlackBuild index a7ccff0e0a..834c717ee1 100644 --- a/development/xnedit/xnedit.SlackBuild +++ b/development/xnedit/xnedit.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for xnedit -# Copytight 2019 Qunying Zhu <zhu.qunying@gmail.com> +# Copyright 2019-2023 Qunying Zhu <zhu.qunying@gmail.com> # Copyright 2017 Alessandro Pittaluga <agp@pittux.com> # All rights reserved. @@ -25,10 +25,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=xnedit -VERSION=${VERSION:-1.1.1} +VERSION=${VERSION:-1.5.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -38,7 +41,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,21 +58,16 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* -cd $PRGNAM -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 \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -make linux +cd $PRGNAM-$VERSION + +make -j1 linux docs mkdir -p $PKG/usr/bin $PKG/usr/man/man1 install -m 755 source/xnedit $PKG/usr/bin/xnedit +install -m 755 source/xnc $PKG/usr/bin/xnc install -m 644 doc/xnedit.man $PKG/usr/man/man1/xnedit.1 -install -m 644 doc/xnc.man $PKG/usr/man/man1/xcl.1 +install -m 644 doc/xnc.man $PKG/usr/man/man1/xnc.1 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 @@ -74,10 +79,12 @@ mkdir -p $PKG/usr/share/icons mkdir -p $PKG/usr/share/applications cp resources/desktop/xnedit.png $PKG/usr/share/icons -sed 's/%PREFIX%/\/usr/g' resources/desktop/xnedit.desktop.template > $PKG/usr/share/applications/xnedit.desktop +sed -e 's/%PREFIX%/\/usr/g' \ + -e 's/Application;//' \ + resources/desktop/xnedit.desktop.template > $PKG/usr/share/applications/xnedit.desktop mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE CHANGELOG README ReleaseNotes doc/faq.txt $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE CHANGELOG README.md ReleaseNotes doc/faq.txt doc/html $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -85,4 +92,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh 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 |