diff options
author | newHeiko <35038740+newHeiko@users.noreply.github.com> | 2023-04-12 21:45:55 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-04-15 07:15:37 +0700 |
commit | c3bfeb7d4a4759158c212b32b1ab094bc6ba9cc3 (patch) | |
tree | b2935d7cb69c928845f988a39f5a03224c70e2f9 /development/avrdude/avrdude.SlackBuild | |
parent | 60ef62ac72f26855fbcf358fd52519e88ff6c5af (diff) |
development/avrdude: Updated for version 7.1.
Upstream switched to cmake, so this SlackBuild was basically
re-written from template.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/avrdude/avrdude.SlackBuild')
-rw-r--r-- | development/avrdude/avrdude.SlackBuild | 70 |
1 files changed, 43 insertions, 27 deletions
diff --git a/development/avrdude/avrdude.SlackBuild b/development/avrdude/avrdude.SlackBuild index b70684e253913..764e64dceac98 100644 --- a/development/avrdude/avrdude.SlackBuild +++ b/development/avrdude/avrdude.SlackBuild @@ -2,14 +2,35 @@ # Slackware build script for avrdude -# Written by Dustin Schnee <schnee72{at}gmail{dot}com> +# Copyright 2023 Heiko Rosemann Germany # -# Updated by Heiko Rosemann 2020-2022 +# Originally written by Dustin Schnee <schnee72{at}gmail{dot}com> +# and updated by Heiko Rosemann 2020-2022, but completely re-written in +# 2023 when upstream switched from autotools to cmake. +# +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# 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=avrdude -VERSION=${VERSION:-6.4} +VERSION=${VERSION:-7.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +43,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 @@ -63,37 +81,35 @@ 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 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --disable-static \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -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 +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ + -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \ + -DUSE_STATIC_LIBS=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la 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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog NEWS README \ +cp -a \ + AUTHORS COPYING NEWS README.md atmel-docs \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# avoid overwriting configuration mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new -rm -f $PKG/usr/lib*/*.la - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |