aboutsummaryrefslogtreecommitdiff
path: root/network/chrony/chrony.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/chrony/chrony.SlackBuild')
-rw-r--r--network/chrony/chrony.SlackBuild24
1 files changed, 19 insertions, 5 deletions
diff --git a/network/chrony/chrony.SlackBuild b/network/chrony/chrony.SlackBuild
index 59c1d4f56b5f0..572a856cece06 100644
--- a/network/chrony/chrony.SlackBuild
+++ b/network/chrony/chrony.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for Chrony
+# Slackware build script for chrony
-# Copyright 2015-2016 Richard Ellis (USA)
+# Copyright 2015-2018 Richard Ellis (USA)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=chrony
-VERSION=${VERSION:-2.4}
+VERSION=${VERSION:-3.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -56,6 +56,13 @@ fi
set -e
+if ! getent group chrony 2>&1 > /dev/null || \
+ ! getent passwd chrony 2>&1 > /dev/null; then
+ echo "You must have a \"chrony\" user and group in order to run this script."
+ echo "See the included README for a suggested UID/GID."
+ exit 1
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -69,6 +76,7 @@ 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 {} \;
+CC=${CC:-gcc} \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -76,11 +84,16 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --with-user=chrony
make
make install DESTDIR=$PKG
+chown chrony:chrony $PKG/var/lib/chrony
+install -D -m 0644 $CWD/chrony.conf $PKG/etc/chrony.conf.new
+install -D -m 0644 $CWD/rc.chrony $PKG/etc/rc.d/rc.chrony.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
@@ -88,11 +101,12 @@ 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 INSTALL README NEWS contrib/ examples/ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a contrib/ examples/ COPYING FAQ INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
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}