diff options
Diffstat (limited to 'system/colord/colord.SlackBuild')
-rw-r--r-- | system/colord/colord.SlackBuild | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/system/colord/colord.SlackBuild b/system/colord/colord.SlackBuild index 2ac2cabcf3..2fb974a299 100644 --- a/system/colord/colord.SlackBuild +++ b/system/colord/colord.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for colord -# Copyright 2015-2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org> +# Copyright 2015-2024 Willy Sudiarto Raharjo <willysr@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,13 @@ # 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=colord -VERSION=${VERSION:-1.3.5} +VERSION=${VERSION:-1.4.7} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -48,7 +51,11 @@ elif ! getent passwd colord 2>/dev/null 1>/dev/null ; then bailout fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -68,16 +75,9 @@ else fi if [ "${BASH_COMPLETION:-no}" = "yes" ]; then - USE_BASH="--enable-bash-completion" + USE_BASH="true" else - USE_BASH="--disable-bash-completion" -fi - -# Check if ARGYLL is set to yes -if [ "${ARGYLL:-no}" = "yes" ]; then - argyll="--enable-argyllcms-sensor" -else - argyll="--disable-argyllcms-sensor" + USE_BASH="false" fi set -e @@ -95,39 +95,41 @@ 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 \ - --enable-gusb \ - --enable-udev \ - --enable-polkit \ - --enable-sane \ - --enable-libcolordcompat \ - $argyll \ - --enable-vala \ - --disable-systemd-login \ - --with-daemon-user=colord \ - --build=$ARCH-slackware-linux \ - $USE_BASH - -make -make install DESTDIR=$PKG +# Since polkit in current apply upstream git +# we have to reduce the polkit version used to test +# https://github.com/hughsie/colord/issues/36 +sed -i "s|0.114|0.113|" meson.build + +mkdir -p build +cd build +meson --prefix=/usr \ + --buildtype=release \ + --localstatedir=/var \ + --libdir=lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/lib${LIBDIRSUFFIX}/colord \ + --mandir=/usr/man \ + -Dlibcolordcompat=true \ + -Dsane=true \ + -Dvapi=true \ + -Dsystemd=false \ + -Dargyllcms_sensor=false \ + -Dprint_profiles=false \ + -Dtests=false \ + -Dbash_completion=${USE_BASH} \ + -Ddaemon_user=colord \ + -Dman=false \ + ../ +"${NINJA:=ninja}" +DESTDIR=$PKG $NINJA install +cd .. 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 -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 - -mv $PKG/etc/dbus-1/system.d/org.freedesktop.ColorManager.conf \ - $PKG/etc/dbus-1/system.d/org.freedesktop.ColorManager.conf.new +# Fix paths +sed -i "s|/lib|/lib${LIBDIRSUFFIX}|g" $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/colord.pc +sed -i "s|/lib|/lib${LIBDIRSUFFIX}|g" $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/colorhug.pc +mv $PKG/usr/share/dbus-1/system.d/org.freedesktop.ColorManager.conf $PKG/usr/share/dbus-1/system.d/org.freedesktop.ColorManager.conf.new mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS COPYING* MAINTAINERS $PKG/usr/doc/$PRGNAM-$VERSION @@ -143,4 +145,4 @@ 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |