slackbuilds

Personal Slackbuilds in the style of slackbuilds.org
git clone git://git.danielmoch.com/slackbuilds.git
Log | Files | Refs

arc-theme.SlackBuild (2998B)


      1 #!/bin/sh
      2 #
      3 # Slackware build script for arc-theme
      4 
      5 # Copyright 2016 Marcel Saegebarth <marc@mos6581.de>
      6 # All rights reserved.
      7 # Modified portions Copyright 2020 Daniel Moch <daniel@danielmoch.com>
      8 #
      9 # Redistribution and use in source and binary forms, with or without
     10 # modification, are permitted provided that the following conditions are
     11 # met:
     12 #
     13 # * Redistributions of source code must retain the above copyright
     14 # notice, this list of conditions and the following disclaimer.
     15 #
     16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 
     28 PRGNAM=arc-theme
     29 VERSION=${VERSION:-20190917}
     30 BUILD=${BUILD:-1}
     31 TAG=${TAG:-_djmoch}
     32 
     33 if [ -z "$ARCH" ]; then
     34   case "$( uname -m )" in
     35     i?86) ARCH=i586 ;;
     36     arm*) ARCH=arm ;;
     37        *) ARCH=$( uname -m ) ;;
     38   esac
     39 fi
     40 
     41 CWD=$(pwd)
     42 TMP=${TMP:-/tmp/djmoch}
     43 PKG=$TMP/package-$PRGNAM
     44 OUTPUT=${OUTPUT:-/tmp}
     45 
     46 if [ "$ARCH" = "i586" ]; then
     47   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
     48   LIBDIRSUFFIX=""
     49 elif [ "$ARCH" = "i686" ]; then
     50   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
     51   LIBDIRSUFFIX=""
     52 elif [ "$ARCH" = "x86_64" ]; then
     53   SLKCFLAGS="-O2 -fPIC"
     54   LIBDIRSUFFIX="64"
     55 else
     56   SLKCFLAGS="-O2"
     57   LIBDIRSUFFIX=""
     58 fi
     59 
     60 set -e
     61 
     62 rm -rf $PKG
     63 mkdir -p $TMP $PKG $OUTPUT
     64 cd $TMP
     65 rm -rf $PRGNAM-$VERSION
     66 tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
     67 cd $PRGNAM-$VERSION
     68 chown -R root:root .
     69 find -L . \
     70  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
     71   -o -perm 511 \) -exec chmod 755 {} \; -o \
     72  \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
     73   -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
     74 
     75 sh autogen.sh --prefix=/usr --with-gnome-shell=3.30
     76 CFLAGS="$SLKCFLAGS" \
     77 CXXFLAGS="$SLKCFLAGS" \
     78 ./configure \
     79   --prefix=/usr \
     80   --libdir=/usr/lib${LIBDIRSUFFIX} \
     81   --sysconfdir=/etc \
     82   --localstatedir=/var \
     83   --mandir=/usr/man \
     84   --docdir=/usr/doc/$PRGNAM-$VERSION \
     85   --with-gnome-shell=3.30 \
     86   --build=$ARCH-slackware-linux
     87 
     88 make
     89 make install DESTDIR=$PKG
     90 
     91 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
     92 cp -a AUTHORS COPYING HACKING.md README.md $PKG/usr/doc/$PRGNAM-$VERSION
     93 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
     94 
     95 mkdir -p $PKG/install
     96 cat $CWD/slack-desc > $PKG/install/slack-desc
     97 
     98 cd $PKG
     99 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}