aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-02-10 17:50:31 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2017-02-10 17:50:31 +0200
commitd8ee8a56a3a5ac156f8d840f050b8223fb955636 (patch)
tree62ac4c1112ea28de5d0b23221db2dcaacbf82ab0
parent8a916702efcd22685b02d7dd2760de8e55a2868b (diff)
downloadsyslogck-d8ee8a56a3a5ac156f8d840f050b8223fb955636.tar.gz
syslogck-d8ee8a56a3a5ac156f8d840f050b8223fb955636.tar.bz2
Add building infrastructureHEADmaster
-rw-r--r--.gitignore10
-rw-r--r--MANIFEST6
-rw-r--r--Makefile.PL20
-rw-r--r--bootstrap.pl61
-rw-r--r--syslogck8
5 files changed, 102 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b43081a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
1.emacs*
2*~
3/MYMETA.json
4/MYMETA.yml
5Makefile
6/syslogck-*.tar.gz
7/tmp
8/blib
9/pm_to_blib
10/inc
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..344ac44
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,6 @@
1Changes
2LICENSE
3Makefile.PL
4MANIFEST This list of files
5inc/ExtUtils/AutoInstall.pm
6syslogck
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..8e9812f
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1,20 @@
1# -*- perl -*-
2use strict;
3use lib 'inc';
4use ExtUtils::AutoInstall (
5 -core => {
6 'Getopt::Long' => 2.34,
7 'File::Basename' => 2.84,
8 'Pod::Usage' => 1.51,
9 'Pod::Man' => 2.25,
10 'Sys::Syslog' => 0.29
11 }
12);
13
14WriteMakefile(NAME => 'syslogck',
15 ABSTRACT_FROM => 'syslogck',
16 VERSION_FROM => 'syslogck',
17 AUTHOR => 'Sergey Poznyakoff <gray@gnu.org>',
18 LICENSE => 'gpl',
19 EXE_FILES => [ 'syslogck' ]
20);
diff --git a/bootstrap.pl b/bootstrap.pl
new file mode 100644
index 0000000..90db16a
--- /dev/null
+++ b/bootstrap.pl
@@ -0,0 +1,61 @@
1#! /usr/bin/perl
2# This file is part of acmeman.
3# Copyright (C) 2014, 2017 Sergey Poznyakoff <gray@gnu.org>
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3, or (at your option)
8# any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18use strict;
19use CPAN;
20use Cwd qw(getcwd);
21use File::Path qw(mkpath);
22
23####
24my $incdir = "inc/ExtUtils";
25my $topdir = getcwd;
26
27my $modname = "ExtUtils::AutoInstall";
28
29my $mod = CPAN::Shell->expandany($modname) or die "Can't expand $modname";
30my $file = $mod->inst_file;
31my $dir;
32
33if (defined($file)) {
34 print "$modname installed at $file\n";
35 if (-f $file) {
36 $file =~ s#/[^/]+\.pm$##;
37 if (-d $file) {
38 $dir = $file;
39 } else {
40 die "Can't find $modname directory";
41 }
42 }
43} else {
44 print "Getting $modname\n";
45 my $distro = $mod->get or die "Can't get distribution for $modname";
46 $dir = $distro->dir;
47}
48
49$file = "$dir/$incdir/AutoInstall.pm";
50$file = "$dir/AutoInstall.pm" unless (-f $file);
51-f $file or die "$file not found";
52
53use autodie;
54chdir $topdir;
55mkpath $incdir unless -d $incdir;
56chdir $incdir;
57no autodie;
58unlink "AutoInstall.pm";
59use autodie;
60symlink $file, "AutoInstall.pm";
61
diff --git a/syslogck b/syslogck
index 808dadd..0427a00 100644
--- a/syslogck
+++ b/syslogck
@@ -7,6 +7,8 @@ use Pod::Usage;
7use Pod::Man; 7use Pod::Man;
8use Getopt::Long qw(:config gnu_getopt no_ignore_case); 8use Getopt::Long qw(:config gnu_getopt no_ignore_case);
9 9
10our $VERSION = '0.99';
11
10use constant { 12use constant {
11 EX_OK => 0, 13 EX_OK => 0,
12 EX_USAGE => 64, 14 EX_USAGE => 64,
@@ -39,9 +41,9 @@ can be changed by supplying the name of the file in the command line. Multiple
39arguments are allowed. 41arguments are allowed.
40 42
41The configuration parser is very permissive. It selects only lines that 43The configuration parser is very permissive. It selects only lines that
42can reliably be parsed as traditional syslog selector lines. This allows to 44can reliably be parsed as traditional syslog selector lines, and silently
43use B<syslogck> with any flavor of syslog that allows for traditional 45ignores the rest. This allows to use B<syslogck> with any flavor of syslog
44configuration (e.g. B<rsyslogd>). 46that allows for traditional configuration (e.g. B<rsyslogd>).
45 47
46On success (test message appeared in the log), B<syslogck> silently exits with 48On success (test message appeared in the log), B<syslogck> silently exits with
47code B<0>. If the message did not appear in the log within the time out period, 49code B<0>. If the message did not appear in the log within the time out period,

Return to:

Send suggestions and report system problems to the System administrator.