diff options
author | Andrzej Telszewski <atelszewski@gmail.com> | 2011-12-21 06:28:00 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-12-22 00:03:03 -0600 |
commit | 7bb560d5ca6f6f280a0ac2a2099b9c78fd55a171 (patch) | |
tree | b6fb2113c3c8c7200553b836f448d3f3fe7291d8 /development/dfu-programmer/dfu-programmer.SlackBuild | |
parent | 6c68fe54b8d4f81b9b1d6da1f6f6aee26b7bdbaf (diff) |
development/dfu-programmer: Added (USB programmer for USB AVR chips)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'development/dfu-programmer/dfu-programmer.SlackBuild')
-rw-r--r-- | development/dfu-programmer/dfu-programmer.SlackBuild | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/development/dfu-programmer/dfu-programmer.SlackBuild b/development/dfu-programmer/dfu-programmer.SlackBuild new file mode 100644 index 000000000000..03f03092d225 --- /dev/null +++ b/development/dfu-programmer/dfu-programmer.SlackBuild @@ -0,0 +1,83 @@ +#!/bin/sh + +# Slackware build script for dfu-programmer. +# Written by Andrzej Telszewski <atelszewski@gmail.com> + +PRGNAM=dfu-programmer +VERSION=0.5.4 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+rw,go+r-w . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +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 \ + $PKG/usr/doc/$PRGNAM-$VERSION +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} |