diff options
Diffstat (limited to 'network/chrony/chrony.SlackBuild')
-rw-r--r-- | network/chrony/chrony.SlackBuild | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/network/chrony/chrony.SlackBuild b/network/chrony/chrony.SlackBuild index 92e3c05de3..ca8d8a96c3 100644 --- a/network/chrony/chrony.SlackBuild +++ b/network/chrony/chrony.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for chrony @@ -22,10 +22,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=chrony -VERSION=${VERSION:-3.4} +VERSION=${VERSION:-4.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} NTP_USER=${NTP_USER:-chrony} NTP_GROUP=${NTP_GROUP:-chrony} @@ -38,7 +41,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -96,7 +106,7 @@ make install DESTDIR=$PKG chown ${NTP_USER}:${NTP_GROUP} $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 -sed -i "s%@NTP_USER@%${NTP_USER}%g" $PKG/etc/rc.d/rc.chrony.new +sed -i "s%^NTP_USER=@NTP_USER@%NTP_USER=${NTP_USER}%g" $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 @@ -113,4 +123,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 |