source: npl/system/logrotate/logrotate.SlackBuild

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 1.4 KB
Line 
1#!/bin/sh
2##NEED:linux_src
3#DEP:popt
4# Set initial variables:
5CWD=`pwd`
6if [ "$TMP" = "" ]; then
7  TMP=/tmp
8fi
9PKG=$TMP/package-logrotate
10
11NAME=logrotate
12VERSION=3.6.8
13ARCH=`arch`
14BUILD=1DatuX
15
16if [ ! -d $TMP ]; then
17  mkdir -p $TMP # location to build the source
18fi
19rm -rf $PKG
20mkdir -p $PKG # place for the package to be built
21
22cd $TMP
23rm -rf logrotate-$VERSION
24tar xzvf $CWD/logrotate-$VERSION.tar.gz
25cd logrotate-$VERSION
26chown -R root.root .
27make clean || exit 1
28make || exit 1
29strip logrotate
30mkdir -p $PKG/usr/sbin
31cat logrotate > $PKG/usr/sbin/logrotate
32mkdir -p $PKG/usr/man/man8
33cat logrotate.8 | gzip -9c > $PKG/usr/man/man8/logrotate.8.gz
34mkdir -p $PKG/usr/doc/logrotate-$VERSION
35cp -a \
36  CHANGES COPYING READM* \
37  $PKG/usr/doc/logrotate-$VERSION
38chmod 644 $PKG/usr/doc/logrotate-$VERSION/*
39chmod 755 $PKG/usr/sbin/*
40mkdir -p $PKG/install
41mkdir -p $PKG/etc/cron.daily
42cp $CWD/logrotate.d $PKG/etc
43chmod 644 $PKG/etc/logrotate.d/*
44cp $CWD/logrotate.conf $PKG/etc
45cp $CWD/logrotate $PKG/etc/cron.daily
46chmod 644 $PKG/etc/logrotate.conf $PKG/etc/cron.daily
47chown -R root:root $PKG/etc/*
48
49#maak alle configfiles eindigend op .new
50find $PKG/etc -follow -type f -exec mv "{}" "{}.new" \; || exit 1
51
52
53# Build the package:
54cd $PKG
55#makepkg -l y -c n $TMP/logrotate-$VERSION-$ARCH-$BUILD.tgz
56makepkg -l y -c n $CWD/$NAME.pkg > /dev/null &&
57echo $VERSION > $CWD/$NAME.version &&
58arch > $CWD/$NAME.arch
59
60#mv $TMP/logrotate-$VERSION-$ARCH-$BUILD.tgz $CWD
61
62
Note: See TracBrowser for help on using the repository browser.