colord: Upgraded to 1.4.1.

It requires meson.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>
This commit is contained in:
Willy Sudiarto Raharjo 2017-08-14 21:33:19 +07:00
parent 6762842b42
commit 77d9b8db46
No known key found for this signature in database
GPG key ID: 887B8374D7333381
2 changed files with 30 additions and 47 deletions

View file

@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=colord
VERSION=${VERSION:-1.3.5}
BUILD=${BUILD:-2}
VERSION=${VERSION:-1.4.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_csb}
if [ -z "$ARCH" ]; then
@ -61,10 +61,10 @@ if ! grep -q ^colord: /etc/group ; then
useradd -d /var/lib/colord -u 303 -g colord -s /bin/false colord
fi
if [ "${BASH_COMPLETION:-no}" = "yes" ]; then
USE_BASH="--enable-bash-completion"
if [ -f /usr/share/bash-completion/bash_completion ]; then
USE_BASH="true"
else
USE_BASH="--disable-bash-completion"
USE_BASH="false"
fi
set -e
@ -85,32 +85,29 @@ find -L . \
# 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|114|113|g" configure
sed -i "s|0.114|0.113|" meson.build
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 \
--enable-vala \
--disable-systemd-login \
--disable-argyllcms-sensor \
--with-daemon-user=colord \
--build=$ARCH-slackware-linux \
$USE_BASH
make
make install DESTDIR=$PKG
mkdir -p build
cd build
meson --prefix=/usr \
--buildtype=release \
--localstatedir=/var \
--libdir=lib${LIBDIRSUFFIX} \
--libexecdir=/usr/lib${LIBDIRSUFFIX}/colord \
--mandir=/usr/man \
-Denable-libcolordcompat=true \
-Denable-sane=true \
-Denable-vala=true \
-Denable-systemd=false \
-Denable-argyllcms-sensor=false \
-Denable-print-profiles=false \
-Denable-tests=false \
-Denable-bash-completion=${USE_BASH} \
-Dwith-daemon-user=colord \
../
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
@ -118,8 +115,9 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING* MAINTAINERS $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,18 +1,3 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/dbus-1/system.d/org.freedesktop.ColorManager.conf.new
if [ -e usr/share/glib-2.0/schemas ]; then
if [ -x /usr/bin/glib-compile-schemas ]; then
/usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1