diff options
Diffstat (limited to 'source/a/upower/upower.SlackBuild')
-rwxr-xr-x | source/a/upower/upower.SlackBuild | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/source/a/upower/upower.SlackBuild b/source/a/upower/upower.SlackBuild index 22dcb2cca..dfcc52113 100755 --- a/source/a/upower/upower.SlackBuild +++ b/source/a/upower/upower.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for upower # Copyright 2010, 2011, 2015 Robby Workman, Tuscaloosa, Alabama, USA +# Copyright 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -48,7 +49,7 @@ fi # the name of the created package would be, and then exit. This information # could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + echo "$PKGNAM-$(echo $VERSION | sed "s/v//g")-$ARCH-$BUILD.txz" exit 0 fi @@ -90,21 +91,31 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ +# Fix libimobiledevice support: +zcat $CWD/81a89385a45d3de1028bcd86b3688fb465b4035c.patch.gz | patch -p1 --verbose || exit 1 + +# Configure, build, and install: +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +mkdir meson-build +cd meson-build +meson setup \ --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ + --libdir=lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/libexec \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --includedir=/usr/include \ + --datadir=/usr/share \ + --mandir=/usr/man \ --sysconfdir=/etc \ --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PKGNAM-$VERSION \ - --disable-static \ - --enable-man-pages \ - --build=$TARGET || exit 1 - -make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG || exit 1 + --buildtype=release \ + -Dsystemdsystemunitdir=no \ + .. || exit 1 + "${NINJA:=ninja}" $NUMJOBS || exit 1 + DESTDIR=$PKG $NINJA install || exit 1 +cd .. # Add upower policy allowing users in the 'power' group # to suspend/hibernate the computer: @@ -113,9 +124,6 @@ install -m 0644 -o root \ $CWD/10-enable-upower-suspend.rules \ $PKG/usr/share/polkit-1/rules.d/10-enable-upower-suspend.rules.new -# Don't ship .la files: -rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -125,14 +133,14 @@ mv $PKG/etc/UPower/UPower.conf $PKG/etc/UPower/UPower.conf.new 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 -mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$(echo $VERSION | sed "s/v//g") cp -a \ AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README \ - $PKG/usr/doc/$PKGNAM-$VERSION + $PKG/usr/doc/$PKGNAM-$(echo $VERSION | sed "s/v//g") mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | sed "s/v//g")-$ARCH-$BUILD.txz |