diff options
author | khronosschoty <khronosschoty@posteo.org> | 2022-03-01 21:43:33 -0800 |
---|---|---|
committer | khronosschoty <khronosschoty@posteo.org> | 2022-03-01 22:02:46 -0800 |
commit | 09606fc9ee2368feb724a75e9bb3f440616b6a4b (patch) | |
tree | 8b8c3e12aaf88067b0fae5341dc724083739dbf2 | |
parent | 2dbac016f564b0fe57019b56c2b1b176b4c3ebe9 (diff) | |
download | local-sbo-templates-09606fc9ee2368feb724a75e9bb3f440616b6a4b.tar.gz |
-rw-r--r-- | autotools-template.SlackBuild | 83 | ||||
-rw-r--r-- | cmake-template.SlackBuild | 71 | ||||
-rw-r--r-- | haskell-template.SlackBuild | 28 | ||||
-rw-r--r-- | meson-template.SlackBuild | 80 | ||||
-rw-r--r-- | perl-template.SlackBuild | 65 | ||||
-rw-r--r-- | python-template.SlackBuild | 59 | ||||
-rw-r--r-- | rubygem-template.SlackBuild | 56 | ||||
-rw-r--r-- | template.info | 4 |
8 files changed, 59 insertions, 387 deletions
diff --git a/autotools-template.SlackBuild b/autotools-template.SlackBuild index 59ec634..0e6a27f 100644 --- a/autotools-template.SlackBuild +++ b/autotools-template.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for <appname> -# Copyright <year> <you> <where you live> +# Copyright 2022 Vasily Sora USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,46 +22,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# |-----------------------------------------------------------------| # -# REMOVE THIS ENTIRE BLOCK OF TEXT # -# -# A license is required, and we strongly suggest you use the above -# BSD/MIT style license. We DO NOT accept "Public Domain" scripts. -# Public domain is not valid in some countries, and no license is -# worse than a "bad" license in those countries. -# -# This template is not meant to be a 'cut and paste' script to -# enable any random user to make a working package. While -# we're certainly not discouraging use of this template, if -# you haven't manually gone through each step of the process -# without the build script (typically as a normal user, as this -# will reveal problems that you won't see as root), then there's -# a good chance that something important is missing from your -# submission. - -# When using this template script, please remove as many of -# these unnecessary comments as possible. Commented code is -# a good thing, but if it's obvious, there's no need to comment it. -# -# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST -# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT. -# -# |-----------------------------------------------------------------| # - cd $(dirname $0) ; CWD=$(pwd) -PRGNAM=appname # replace with name of program -VERSION=${VERSION:-1.4.1} # replace with version of program +PRGNAM=appname +VERSION=${VERSION:-1.4.1} BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} # the "_SBo" is required +TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -# Automatically determine the architecture we're building on: +DOCS="" + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -74,9 +48,9 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this +TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -92,10 +66,7 @@ else LIBDIRSUFFIX="" fi -set -e # Exit on most errors -# If you prefer to do selective error checking with -# command || exit 1 -# then that's also acceptable. +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -110,10 +81,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Your application will probably need different configure flags; -# these are provided as an example only. -# Be sure to build only shared libraries unless there's some need for -# static. CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -126,58 +93,28 @@ CXXFLAGS="$SLKCFLAGS" \ --disable-static \ --build=$ARCH-slackware-linux -# Compile the application and install it into the $PKG directory make make install DESTDIR=$PKG # Don't ship .la files: rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la -# Strip binaries and libraries - this can be done with 'make install-strip' -# in many source trees, and that's usually acceptable if so, but if not, -# use this: 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 -# Compress man pages -# If the man pages are installed to /usr/share/man instead, you'll need to either -# add the --mandir=/usr/man flag to configure or move them manually after the -# make install process is run. find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Compress info pages and remove the package's dir file -# If no info pages are installed by the software, don't leave this in the script rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/*.info* -# Remove perllocal.pod and other special files that don't need to be installed, -# as they will overwrite what's already on the system. If this is not needed, -# remove it from the script. -# Remove 'special' files -find $PKG -name perllocal.pod \ - -o -name ".packlist" \ - -o -name "*.bs" \ - | xargs rm -f - -# Copy program documentation into the package -# The included documentation varies from one application to another, so be sure -# to adjust your script as needed -# Also, include the SlackBuild script in the documentation directory mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - <documentation> \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a "$DOCS" $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Make the package; be sure to leave it in $OUTPUT -# If package symlinks need to be created during install *before* -# your custom contents of doinst.sh runs, then add the -p switch to -# the makepkg command below -- see makepkg(8) for details cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/cmake-template.SlackBuild b/cmake-template.SlackBuild index 66f52f1..3680cca 100644 --- a/cmake-template.SlackBuild +++ b/cmake-template.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for <appname> -# Copyright <year> <you> <where you live> +# Copyright 2022 Vasily Sora USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,46 +22,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# |-----------------------------------------------------------------| # -# REMOVE THIS ENTIRE BLOCK OF TEXT # -# -# A license is required, and we strongly suggest you use the above -# BSD/MIT style license. We DO NOT accept "Public Domain" scripts. -# Public domain is not valid in some countries, and no license is -# worse than a "bad" license in those countries. -# -# This template is not meant to be a 'cut and paste' script to -# enable any random user to make a working package. While -# we're certainly not discouraging use of this template, if -# you haven't manually gone through each step of the process -# without the build script (typically as a normal user, as this -# will reveal problems that you won't see as root), then there's -# a good chance that something important is missing from your -# submission. - -# When using this template script, please remove as many of -# these unnecessary comments as possible. Commented code is -# a good thing, but if it's obvious, there's no need to comment it. -# -# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST -# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT. -# -# |-----------------------------------------------------------------| # - cd $(dirname $0) ; CWD=$(pwd) -PRGNAM=appname # replace with name of program -VERSION=${VERSION:-1.4.1} # replace with version of program +PRGNAM=appname +VERSION=${VERSION:-1.4.1} BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} # the "_SBo" is required +TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -# Automatically determine the architecture we're building on: +DOCS="" + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; -# Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -74,9 +48,9 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this +TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -92,7 +66,7 @@ else LIBDIRSUFFIX="" fi -set -e # Exit on most errors +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -107,8 +81,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Your application will probably need different cmake flags; these are only -# examples. You might use 'ccmake' to see the available flags... mkdir -p build cd build cmake \ @@ -125,45 +97,22 @@ cd .. # Don't ship .la files: rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la -# Strip binaries and libraries - this can be done with 'make install-strip' -# in many source trees, and that's usually acceptable, if not, use this: 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 -# Compress man pages -# If the man pages are installed to /usr/share/man instead, you'll need to -# move them manually. find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Compress info pages and remove the package's dir file -# If no info pages are installed by the software, don't leave this in the script rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/*.info* -# Remove perllocal.pod and other special files that don't need to be installed, -# as they will overwrite what's already on the system. If this is not needed, -# remove it from the script. -find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true - -# Copy program documentation into the package -# The included documentation varies from one application to another, so be sure -# to adjust your script as needed -# Also, include the SlackBuild script in the documentation directory mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - <documentation> \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a "$DOCS" $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Make the package; be sure to leave it in $OUTPUT -# If package symlinks need to be created during install *before* -# your custom contents of doinst.sh runs, then add the -p switch to -# the makepkg command below -- see makepkg(8) for details cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/haskell-template.SlackBuild b/haskell-template.SlackBuild index 764511a..d8b0892 100644 --- a/haskell-template.SlackBuild +++ b/haskell-template.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for <appname> -# Copyright <year> <you> <where you live> +# Copyright 2022 Vasily Sora USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,32 +22,6 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# |-----------------------------------------------------------------| # -# REMOVE THIS ENTIRE BLOCK OF TEXT # -# -# A license is required, and we strongly suggest you use the above -# BSD/MIT style license. We DO NOT accept "Public Domain" scripts. -# Public domain is not valid in some countries, and no license is -# worse than a "bad" license in those countries. -# -# This template is not meant to be a 'cut and paste' script to -# enable any random user to make a working package. While -# we're certainly not discouraging use of this template, if -# you haven't manually gone through each step of the process -# without the build script (typically as a normal user, as this -# will reveal problems that you won't see as root), then there's -# a good chance that something important is missing from your -# submission. - -# When using this template script, please remove as many of -# these unnecessary comments as possible. Commented code is -# a good thing, but if it's obvious, there's no need to comment it. -# -# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST -# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT. -# -# |-----------------------------------------------------------------| # - cd $(dirname $0) ; CWD=$(pwd) PRGNAM=haskell-appname # replace 'appname' with name of program diff --git a/meson-template.SlackBuild b/meson-template.SlackBuild index 598373d..fe7be1b 100644 --- a/meson-template.SlackBuild +++ b/meson-template.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for <appname> -# Copyright <year> <you> <where you live> +# Copyright 2022 Vasily Sora USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,46 +22,18 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# |-----------------------------------------------------------------| # -# REMOVE THIS ENTIRE BLOCK OF TEXT # -# -# A license is required, and we strongly suggest you use the above -# BSD/MIT style license. We DO NOT accept "Public Domain" scripts. -# Public domain is not valid in some countries, and no license is -# worse than a "bad" license in those countries. -# -# This template is not meant to be a 'cut and paste' script to -# enable any random user to make a working package. While -# we're certainly not discouraging use of this template, if -# you haven't manually gone through each step of the process -# without the build script (typically as a normal user, as this -# will reveal problems that you won't see as root), then there's -# a good chance that something important is missing from your -# submission. - -# When using this template script, please remove as many of -# these unnecessary comments as possible. Commented code is -# a good thing, but if it's obvious, there's no need to comment it. -# -# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST -# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT. -# -# |-----------------------------------------------------------------| # - cd $(dirname $0) ; CWD=$(pwd) -PRGNAM=appname # replace with name of program -VERSION=${VERSION:-1.4.1} # replace with version of program +PRGNAM=appname +VERSION=${VERSION:-1.4.1} BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} # the "_SBo" is required +TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -74,9 +46,9 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this +TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -92,10 +64,7 @@ else LIBDIRSUFFIX="" fi -set -e # Exit on most errors -# If you prefer to do selective error checking with -# command || exit 1 -# then that's also acceptable. +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -110,10 +79,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Your application will probably need different configure flags; -# these are provided as an example only. -# Be sure to build only shared libraries unless there's some need for -# static. mkdir build cd build CFLAGS="$SLKCFLAGS" \ @@ -134,51 +99,22 @@ cd .. # Don't ship .la files: rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la -# Strip binaries and libraries - this can be done with 'make install-strip' -# in many source trees, and that's usually acceptable if so, but if not, -# use this: 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 -# Compress man pages -# If the man pages are installed to /usr/share/man instead, you'll need to either -# add the --mandir=/usr/man flag to configure or move them manually after the -# make install process is run. find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Compress info pages and remove the package's dir file -# If no info pages are installed by the software, don't leave this in the script rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/*.info* -# Remove perllocal.pod and other special files that don't need to be installed, -# as they will overwrite what's already on the system. If this is not needed, -# remove it from the script. -# Remove 'special' files -find $PKG -name perllocal.pod \ - -o -name ".packlist" \ - -o -name "*.bs" \ - | xargs rm -f - -# Copy program documentation into the package -# The included documentation varies from one application to another, so be sure -# to adjust your script as needed -# Also, include the SlackBuild script in the documentation directory mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - <documentation> \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a "$DOCS" $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Make the package; be sure to leave it in $OUTPUT -# If package symlinks need to be created during install *before* -# your custom contents of doinst.sh runs, then add the -p switch to -# the makepkg command below -- see makepkg(8) for details cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/perl-template.SlackBuild b/perl-template.SlackBuild index 88aa177..e93373f 100644 --- a/perl-template.SlackBuild +++ b/perl-template.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for <appname> -# Copyright <year> <you> <where you live> +# Copyright 2022 Vasily Sora USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,63 +22,34 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# |-----------------------------------------------------------------| # -# REMOVE THIS ENTIRE BLOCK OF TEXT # -# -# A license is required, and we strongly suggest you use the above -# BSD/MIT style license. We DO NOT accept "Public Domain" scripts. -# Public domain is not valid in some countries, and no license is -# worse than a "bad" license in those countries. -# -# This template is not meant to be a 'cut and paste' script to -# enable any random user to make a working package. While -# we're certainly not discouraging use of this template, if -# you haven't manually gone through each step of the process -# without the build script (typically as a normal user, as this -# will reveal problems that you won't see as root), then there's -# a good chance that something important is missing from your -# submission. - -# When using this template script, please remove as many of -# these unnecessary comments as possible. Commented code is -# a good thing, but if it's obvious, there's no need to comment it. -# -# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST -# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT. -# -# |-----------------------------------------------------------------| # - cd $(dirname $0) ; CWD=$(pwd) -PRGNAM=perl-appname # replace "appname" with name of program -VERSION=${VERSION:-1.4.1} # replace with version of program +PRGNAM=perl-appname +VERSION=${VERSION:-1.4.1} BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} # the "_SBo" is required +TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +DOCS="" + SRCNAM="$(printf $PRGNAM | cut -d- -f2-)" -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; -# Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; 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 fi -TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this +TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -109,8 +80,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Your application may need different flags; these are provided as examples -# There seem to be two different methods for building perl apps: # Build method #1 (preferred) perl Makefile.PL \ @@ -133,36 +102,20 @@ perl Build.PL \ ./Build install \ --destdir $PKG -# Strip binaries and libraries - -# If this is not needed,remove it from the script. 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 -# Compress man pages find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Remove perllocal.pod and other special files that don't need to be installed, -# as they will overwrite what's already on the system. -find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true - -# Remove empty directories find $PKG -depth -type d -empty -delete || true -# Copy program documentation into the package -# The included documentation varies from one application to another, so be sure -# to adjust your script as needed -# Also, include the SlackBuild script in the documentation directory mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - <documentation> \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a "$DOCS" $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Copy the slack-desc into ./install mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -# Make the package; be sure to leave it in $OUTPUT cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/python-template.SlackBuild b/python-template.SlackBuild index ecf7492..0ac15f6 100644 --- a/python-template.SlackBuild +++ b/python-template.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for <appname> -# Copyright <year> <you> <where you live> +# Copyright 2022 Vasily Sora USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,46 +22,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# |-----------------------------------------------------------------| # -# REMOVE THIS ENTIRE BLOCK OF TEXT # -# -# A license is required, and we strongly suggest you use the above -# BSD/MIT style license. We DO NOT accept "Public Domain" scripts. -# Public domain is not valid in some countries, and no license is -# worse than a "bad" license in those countries. -# -# This template is not meant to be a 'cut and paste' script to -# enable any random user to make a working package. While -# we're certainly not discouraging use of this template, if -# you haven't manually gone through each step of the process -# without the build script (typically as a normal user, as this -# will reveal problems that you won't see as root), then there's -# a good chance that something important is missing from your -# submission. - -# When using this template script, please remove as many of -# these unnecessary comments as possible. Commented code is -# a good thing, but if it's obvious, there's no need to comment it. -# -# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST -# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT. -# -# |-----------------------------------------------------------------| # - cd $(dirname $0) ; CWD=$(pwd) -PRGNAM=appname # replace with name of program -VERSION=${VERSION:-1.4.1} # replace with version of program +PRGNAM=appname +VERSION=${VERSION:-1.4.1} BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} # the "_SBo" is required +TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -# Automatically determine the architecture we're building on: +DOCS="" + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; -# Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -74,9 +48,9 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this +TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -115,34 +89,19 @@ python2 setup.py install --root=$PKG # For python3 python3 setup.py install --root=$PKG -# Strip binaries and libraries. 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 -# Compress man pages -# If the man pages are installed to /usr/share/man instead, you'll need to -# move them manually. find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Copy program documentation into the package -# The included documentation varies from one application to another, so be sure -# to adjust your script as needed -# Also, include the SlackBuild script in the documentation directory mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - <documentation> \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a "$DOCS" $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Make the package; be sure to leave it in $OUTPUT -# If package symlinks need to be created during install *before* -# your custom contents of doinst.sh runs, then add the -p switch to -# the makepkg command below -- see makepkg(8) for details cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/rubygem-template.SlackBuild b/rubygem-template.SlackBuild index b4fbdb0..7d93a31 100644 --- a/rubygem-template.SlackBuild +++ b/rubygem-template.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for <appname> -# Copyright <year> <you> <where you live> +# Copyright 2022 Vasily Sora USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,48 +22,22 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# |-----------------------------------------------------------------| # -# REMOVE THIS ENTIRE BLOCK OF TEXT # -# -# A license is required, and we strongly suggest you use the above -# BSD/MIT style license. We DO NOT accept "Public Domain" scripts. -# Public domain is not valid in some countries, and no license is -# worse than a "bad" license in those countries. -# -# This template is not meant to be a 'cut and paste' script to -# enable any random user to make a working package. While -# we're certainly not discouraging use of this template, if -# you haven't manually gone through each step of the process -# without the build script (typically as a normal user, as this -# will reveal problems that you won't see as root), then there's -# a good chance that something important is missing from your -# submission. - -# When using this template script, please remove as many of -# these unnecessary comments as possible. Commented code is -# a good thing, but if it's obvious, there's no need to comment it. -# -# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST -# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT. -# -# |-----------------------------------------------------------------| # - cd $(dirname $0) ; CWD=$(pwd) -PRGNAM=rubygem-appname # replace 'appname' with name of gem -VERSION=${VERSION:-1.4.1} # replace with version of program +PRGNAM=rubygem-appname +VERSION=${VERSION:-1.4.1} BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} # the "_SBo" is required +TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -SRCNAM=appname # replace with name of gem +SRCNAM=appname + +DOCS="" -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; -# Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -76,9 +50,9 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this +TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -142,31 +116,21 @@ gem install \ --bindir $PKG/usr/bin \ $CWD/$SRCNAM-$VERSION.gem -# Strip binaries and libraries. 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 # Remove cached gem from install, if you are so inspired .. #rm -rf $PKG/$DESTDIR/cache -# Copy program documentation into the package -# The included documentation varies from one application to another, so be sure -# to adjust your script as needed -# Also, include the SlackBuild script in the documentation directory mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION tar -x -O --file=$CWD/$SRCNAM-$VERSION.gem data.tar.gz \ | tar -xz -C $PKG/usr/doc/$PRGNAM-$VERSION --file=- \ - <documentation> + "$DOCS" cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Make the package; be sure to leave it in $OUTPUT -# If package symlinks need to be created during install *before* -# your custom contents of doinst.sh runs, then add the -p switch to -# the makepkg command below -- see makepkg(8) for details cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/template.info b/template.info index 6d39f7d..f1634c3 100644 --- a/template.info +++ b/template.info @@ -6,5 +6,5 @@ MD5SUM="md5sum(s) of the source tarball(s) defined in DOWNLOAD" DOWNLOAD_x86_64="direct download link(s) of application source tarball(s), x86_64 only" MD5SUM_x86_64="md5sum(s) of the source tarball(s) defined in DOWNLOAD_x86_64" REQUIRES="%README%" -MAINTAINER="name of SlackBuild script maintainer" -EMAIL="email address of author" +MAINTAINER="khronosschoty" +EMAIL="khronosschoty@posteo.org" |