2021-07-03 19:48:15 +02:00
|
|
|
#!/bin/bash
|
2010-12-13 16:20:54 +01:00
|
|
|
# Slackware build script for exaile
|
2010-05-13 00:59:38 +02:00
|
|
|
# Written by Marco Cecchetti (mrc.ildp@gmail.com)
|
2010-12-13 16:20:54 +01:00
|
|
|
# Update by Diogo Leal (diogo@diogoleal.com)
|
2010-05-13 00:59:38 +02:00
|
|
|
|
2017-03-10 11:27:53 +01:00
|
|
|
# Copyright 2017 Ekin Akoglu, Erdemli, Mersin, Turkey | ekinakoglu@gmail.com
|
2017-01-04 21:51:40 +01:00
|
|
|
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
|
2015-01-29 02:14:40 +01:00
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2015-09-10 23:05:20 +02:00
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
2015-01-29 02:14:40 +01:00
|
|
|
# (at your option) any later version, with the following exception:
|
|
|
|
# the text of the GPL license may be omitted.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# without any warranty; without even the implied warranty of
|
|
|
|
# merchantability or fitness for a particular purpose. Compiling,
|
|
|
|
# interpreting, executing or merely reading the text of the program
|
|
|
|
# may result in lapses of consciousness and/or very being, up to and
|
|
|
|
# including the end of all existence and the Universe as we know it.
|
|
|
|
# See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You may have received a copy of the GNU General Public License
|
|
|
|
# along with this program (most likely, a file named COPYING). If
|
|
|
|
# not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2010-05-13 00:59:38 +02:00
|
|
|
PRGNAM=exaile
|
2015-07-25 18:35:55 +02:00
|
|
|
VERSION=${VERSION:-3.4.5}
|
2010-05-13 00:59:38 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2010-05-20 04:58:27 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2017-03-10 11:27:53 +01:00
|
|
|
i?86) ARCH=i586 ;;
|
2010-06-04 07:11:31 +02:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
2010-05-20 04:58:27 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-13 00:59:38 +02:00
|
|
|
CWD=$(pwd)
|
2010-12-13 16:20:54 +01:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
2010-05-13 00:59:38 +02:00
|
|
|
PKG=$TMP/package-$PRGNAM
|
2010-12-13 16:20:54 +01:00
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
2010-05-13 00:59:38 +02:00
|
|
|
|
2017-03-10 11:27:53 +01:00
|
|
|
if [ "$ARCH" = "i586" ]; then
|
2010-05-13 00:59:38 +02:00
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
|
|
LIBDIRSUFFIX="64"
|
2010-05-20 04:58:27 +02:00
|
|
|
else
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-13 00:59:38 +02:00
|
|
|
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 .
|
2013-11-22 08:37:19 +01:00
|
|
|
find -L . \
|
2015-01-29 02:14:40 +01:00
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
|
|
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
2010-05-13 00:59:38 +02:00
|
|
|
|
2015-01-29 02:14:40 +01:00
|
|
|
## Fix manpage location.
|
2011-06-26 14:03:39 +02:00
|
|
|
sed -i -e 's|share/man|man|g' Makefile
|
|
|
|
|
2010-05-13 00:59:38 +02:00
|
|
|
make
|
|
|
|
PREFIX=/usr \
|
|
|
|
LIBINSTALLDIR=/lib${LIBDIRSUFFIX} \
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
|
|
|
mv $PKG/etc/xdg/exaile/settings.ini $PKG/etc/xdg/exaile/settings.ini.new
|
|
|
|
|
2015-01-29 02:14:40 +01:00
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
2010-05-19 08:40:41 +02:00
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2010-05-13 00:59:38 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a \
|
|
|
|
COPYING DEPS INSTALL 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
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|