Date: Monday, September 23, 2019 @ 10:37:53
  Author: spupykin
Revision: 511570

upgpkg: logwatch 7.5.2-5

Modified:
  logwatch/trunk/PKGBUILD
Deleted:
  logwatch/trunk/logwatch-xz-support.patch

---------------------------+
 PKGBUILD                  |   77 +++++++++++++-------------------------------
 logwatch-xz-support.patch |   21 ------------
 2 files changed, 24 insertions(+), 74 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2019-09-23 09:22:26 UTC (rev 511569)
+++ PKGBUILD    2019-09-23 10:37:53 UTC (rev 511570)
@@ -3,7 +3,7 @@
 
 pkgname=logwatch
 pkgver=7.5.2
-pkgrel=4
+pkgrel=5
 arch=('any')
 pkgdesc="Logwatch is a customizable log analysis system."
 url="http://www.logwatch.org/";
@@ -25,68 +25,39 @@
             '59466406f306b4b377616943e8737f522cff713dd1fc968045cba57eeb0acbc2'
             'a4c78442968abf363729e96bfd9ed379eb0718967deb60950c201d40f8aaa461')
 
+prepare() {
+       cd "$srcdir"/$pkgname-$pkgver
+       sed \
+               -e '/BASEDIR=/d' \
+               -e '/CONFIGDIR=/d' \
+               -e '/TEMPDIR=/d' \
+               -e '/PERLEXE=/d' \
+               -e '/MANDIR=/d' \
+               -e '/ln -f -s $BASEDIR/d' \
+               -e "s|/lib/systemd/|$pkgdir/usr/lib/systemd/|g" \
+               -e "s|/usr/sbin/logwatch|$pkgdir/usr/bin/logwatch/|g" \
+               -i install_logwatch.sh
+}
+
 package() {
        cd "$srcdir"/$pkgname-$pkgver
 
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/dist.conf
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/dist.conf/logfiles
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/dist.conf/services
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf/logfiles
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf/services
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/default.conf/html
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts/logfiles
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts/services
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/scripts/shared
-       install -m 0755 -d "$pkgdir"/usr/share/logwatch/lib
+       install -dm0755 "$pkgdir"/usr/{bin,lib/systemd/system}
 
-       install -m 0644 README "$pkgdir"/usr/share/logwatch/README
-       install -m 0644 HOWTO-Customize-LogWatch 
"$pkgdir"/usr/share/logwatch/HOWTO-Customize-LogWatch
-       install -m 0644 conf/*.conf "$pkgdir"/usr/share/logwatch/default.conf
-       install -m 0644 conf/logfiles/* 
"$pkgdir"/usr/share/logwatch/default.conf/logfiles
-       install -m 0644 conf/services/* 
"$pkgdir"/usr/share/logwatch/default.conf/services
-       install -m 0644 conf/html/* 
"$pkgdir"/usr/share/logwatch/default.conf/html
-       install -m 0755 scripts/logwatch.pl 
"$pkgdir"/usr/share/logwatch/scripts/logwatch.pl
-       for i in scripts/logfiles/* ; do
-               if [ `ls $i | grep -v CVS | wc -l` -ne 0 ] ; then
-               install -m 0755 -d "$pkgdir"/usr/share/logwatch/$i
-               install -m 0644 $i/* "$pkgdir"/usr/share/logwatch/$i
-               fi
-       done
-       install -m 0644 scripts/shared/* 
"$pkgdir"/usr/share/logwatch/scripts/shared
-       install -m 0644 scripts/services/* 
"$pkgdir"/usr/share/logwatch/scripts/services
-       install -m 0644 lib/* "$pkgdir"/usr/share/logwatch/lib
+       export BASEDIR="$pkgdir/usr/share/logwatch"
+       export CONFIGDIR="$pkgdir/etc/logwatch"
+       export TEMPDIR="$pkgdir/var/cache/logwatch"
+       export PERLEXE="$pkgdir/usr/bin/perl"
+       export MANDIR="$pkgdir/usr/share/man"
+       echo "$pkgdir/usr/share/logwatch" | sh install_logwatch.sh --systemd
+       ln -sf /usr/share/logwatch/scripts/logwatch.pl 
"$pkgdir"/usr/bin/logwatch
+       rm -rf "$pkgdir"/usr/lib/systemd/system/multi-user.target.wants
 
-       install -m 0755 -d "$pkgdir"/etc/logwatch
-       install -m 0755 -d "$pkgdir"/etc/logwatch/scripts
-       install -m 0755 -d "$pkgdir"/etc/logwatch/conf
-       install -m 0755 -d "$pkgdir"/etc/logwatch/conf/logfiles
-       install -m 0755 -d "$pkgdir"/etc/logwatch/conf/services
-       install -m 0755 -d "$pkgdir"/etc/logwatch/conf/html
-
-       touch "$pkgdir"/etc/logwatch/conf/logwatch.conf
-       touch "$pkgdir"/etc/logwatch/conf/ignore.conf
-       touch "$pkgdir"/etc/logwatch/conf/override.conf
-
-       install -m 0755 -d "$pkgdir"/usr/share/man/man8/
-       install -m 0644 logwatch.8 "$pkgdir"/usr/share/man/man8/
-
-       install -m 0755 -d "$pkgdir"/usr/bin/
-       ln -s /usr/share/logwatch/scripts/logwatch.pl "$pkgdir"/usr/bin/logwatch
-
-       install -m 0755 -d "$pkgdir"/var/cache/logwatch
-
        install -Dm0644 "$srcdir"/cron.conf 
"$pkgdir"/usr/share/logwatch/dist.conf/logfiles/cron.conf
        install -Dm0644 "$srcdir"/maillog.conf 
"$pkgdir"/usr/share/logwatch/dist.conf/logfiles/maillog.conf
        install -Dm0644 "$srcdir"/messages.conf 
"$pkgdir"/usr/share/logwatch/dist.conf/logfiles/messages.conf
        install -Dm0644 "$srcdir"/secure.conf 
"$pkgdir"/usr/share/logwatch/dist.conf/logfiles/secure.conf
 
-       # systemd
-       install -Dm0644 scheduler/logwatch.timer 
"$pkgdir"/usr/lib/systemd/system/logwatch.timer
-       install -Dm0644 scheduler/logwatch.service 
"$pkgdir"/usr/lib/systemd/system/logwatch.service
-
        install -m 0755 -d "$pkgdir"/usr/share/licenses/$pkgname/
        install -m 0644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/
 }

Deleted: logwatch-xz-support.patch
===================================================================
--- logwatch-xz-support.patch   2019-09-23 09:22:26 UTC (rev 511569)
+++ logwatch-xz-support.patch   2019-09-23 10:37:53 UTC (rev 511570)
@@ -1,21 +0,0 @@
---- scripts/logwatch.pl        2016-04-27 23:14:37.000000000 +0300
-+++ scripts/logwatch.pl        2016-05-13 15:26:00.000000000 +0300
-@@ -87,6 +87,7 @@
- $Config{'pathtocat'} = "cat";
- $Config{'pathtozcat'} = "zcat";
- $Config{'pathtobzcat'} = "bzcat";
-+$Config{'pathtoxzcat'} = "xzcat";
- $Config{'output'} = "stdout"; #8.0
- $Config{'format'} = "text"; #8.0
- $Config{'encode'} = "none"; #8.0
-@@ -767,6 +768,10 @@
-             my $arguments = "'${Archive}' 2>/dev/null >> $DestFile";
-             system("$Config{'pathtobzcat'} $arguments") == 0
-                or die "system '$Config{'pathtobzcat'} $arguments' failed: $?"
-+         } elsif (($Archive =~ m/xz$/) && (-f "$Archive") && (-s "$Archive")) 
{
-+            my $arguments = "'${Archive}' 2>/dev/null >> $DestFile";
-+            system("$Config{'pathtoxzcat'} $arguments") == 0
-+               or die "system '$Config{'pathtoxzcat'} $arguments' failed: $?"
-          } elsif ((-f "$Archive") && (-s "$Archive")) {
-             my $arguments = "'${Archive}'  >> $DestFile";
-             system("$Config{'pathtocat'} $arguments") == 0

Reply via email to