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>
This commit is contained in:
newHeiko 2023-04-12 21:45:55 +02:00 committed by Willy Sudiarto Raharjo
parent 60ef62ac72
commit c3bfeb7d4a
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 45 additions and 29 deletions

View file

@ -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
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 ..
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
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

View file

@ -1,8 +1,8 @@
PRGNAM="avrdude"
VERSION="6.4"
VERSION="7.1"
HOMEPAGE="http://www.nongnu.org/avrdude/"
DOWNLOAD="http://download.savannah.gnu.org/releases/avrdude/avrdude-6.4.tar.gz"
MD5SUM="a19321b2563fd5ed60fbc1e687b020dc"
DOWNLOAD="https://github.com/avrdudes/avrdude/archive/v7.1/avrdude-7.1.tar.gz"
MD5SUM="395c66609d57ff12a2288879797d597f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""