#!/bin/bash # # clementine.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # clementine.SlackBuild 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. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # Based on clementine.SlackBuild by Eric Hameleers # -- PATENT ALERT! -- # FFmpeg can be built with MP3 audio encoder (needed for FLV videos), # AMR audio encoder (needed for 3GGP videos) and AAC audio encoder (used in MP4) # but these libraries are 'contaminated' with patents from Fraunhofer, GGP etc. # You can build these patended algorithms into clementine, and if you are an # ordinary end user, no one will bother you for using them. # This script will install all these libraries and so the binary package may # not be distributed. # default settings PACKAGE="clementine" PACKAGE_EXT="gz" VERSION=${VERSION:=1.2.3} BUILD=${BUILD:=3} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="$VERSION.tar.$PACKAGE_EXT" #URL="http://clementine-player.googlecode.com/files/$SRC" URL="https://github.com/clementine-player/Clementine/archive/$SRC" get_source $SRC $URL unpack_source $SRC Clementine-$VERSION cat $CWD/clementine-gcc5.1.patch | patch -p1 cat $CWD/clementine-udisks-namespace.patch | patch -p1 mkdir build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DMAN_INSTALL_DIR=/usr/man \ -DCMAKE_BUILD_TYPE=Release \ .. make all CFLAGS="-fPIC" PMFLAGS="-DNEWBUFFER" make install DESTDIR=$PKG cd .. for i in 16 32 64; do install -m 0644 -D dist/${PACKAGE}_${i}.png $PKG/usr/share/icons/hicolor/${i}x${i}/apps/application-x-clementine.png done # Add documentation (for all the deps as well) mkdir -p $DOCS cp -a COPYING Changelog $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/clementine-$VERSION rm -rf $PKG fi