summaryrefslogtreecommitdiffstats
path: root/desktop/gtklock/gtklock.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/gtklock/gtklock.SlackBuild')
-rw-r--r--desktop/gtklock/gtklock.SlackBuild41
1 files changed, 24 insertions, 17 deletions
diff --git a/desktop/gtklock/gtklock.SlackBuild b/desktop/gtklock/gtklock.SlackBuild
index 7bcc1c46db..80fb93a9be 100644
--- a/desktop/gtklock/gtklock.SlackBuild
+++ b/desktop/gtklock/gtklock.SlackBuild
@@ -10,7 +10,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gtklock
-VERSION=${VERSION:-2.1.0}
+VERSION=${VERSION:-3.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -61,28 +61,35 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-# 20230407 bkw: sed surgery. Slackware 15.0 doesn't have a pkg-config
-# pam.pc, so we have to remove it from LIBS, then add -lpam to LDLIBS.
-# Also, use our CFLAGS, fix the man page path, and install to /usr,
-# not /usr/local.
-sed -i -e '/^LIBS\>/s,\<pam\>,,' \
- -e '/^LDLIBS\>/s,$, -lpam,' \
- -e "/-std=/s,= ,= $SLKCFLAGS ," \
- -e 's,share/man,man,g' \
- -e 's,usr/local,usr,g' \
- makefile
-
-make
-strip $PRGNAM
-make install DESTDIR=$PKG
-gzip $PKG/usr/man/man?/*
+mkdir -p meson-build
+cd meson-build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson setup .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc
+
+"${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
# It's a config file, so make it .new
rename lock lock.new $PKG/etc/pam.d/$PRGNAM
+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
+
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
-cp -a LICENSE README* $PKGDOC
+cp -a LICENSE README.md $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install