diff options
Diffstat (limited to 'system/geoclue2/geoclue2.SlackBuild')
-rw-r--r-- | system/geoclue2/geoclue2.SlackBuild | 67 |
1 files changed, 41 insertions, 26 deletions
diff --git a/system/geoclue2/geoclue2.SlackBuild b/system/geoclue2/geoclue2.SlackBuild index 9c07653702..02bada7236 100644 --- a/system/geoclue2/geoclue2.SlackBuild +++ b/system/geoclue2/geoclue2.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for geoclue2 -# Copyright 2017-2018 Aaditya Bagga <aaditya_gnulinux@zoho.com> +# Copyright 2017-2022 Aaditya <aaditya_gnulinux@zoho.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,10 +21,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=geoclue2 -VERSION=${VERSION:-2.4.7} +VERSION=${VERSION:-2.6.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM=geoclue @@ -36,7 +39,11 @@ if [ -z "$ARCH" ]; then esac 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} @@ -61,7 +68,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tar.xz +tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2 cd $SRCNAM-$VERSION chown -R root:root . find -L . \ @@ -70,25 +77,30 @@ 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 {} \; -avahi_opts='--disable-nmea-source' -[ "${AVAHI:-no}" != "no" ] && avahi_opts='' - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - $avahi_opts \ - --enable-static=no \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG +[ "${AVAHI:-no}" != "no" ] && avahi_opts=true || avahi_opts=false +[ "${GTK_DOC:-no}" != "no" ] && doc_opts=true || doc_opts=false + +mkdir build +cd build + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + meson .. \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/libexec \ + --sysconfdir=/etc \ + --includedir=/usr/include \ + --localstatedir=/var \ + --datadir=/usr/share \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --buildtype=release \ + -Dnmea-source=$avahi_opts \ + -Dgtk-doc=$doc_opts \ + -Dstrip=true + "${NINJA:=ninja}" + DESTDIR=$PKG $NINJA install +cd .. # Preserve config file mv $PKG/etc/geoclue/geoclue.conf $PKG/etc/geoclue/geoclue.conf.new @@ -96,8 +108,11 @@ mv $PKG/etc/geoclue/geoclue.conf $PKG/etc/geoclue/geoclue.conf.new 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 + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING COPYING.LIB NEWS README docs \ +cp -a COPYING COPYING.LIB NEWS README.md HACKING.md docs \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -106,4 +121,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 |