Permalink
Browse files

Merge branch 'collectd-5.1'

  • Loading branch information...
octo committed Oct 11, 2012
2 parents 9f52d13 + 5fb8bff commit 5eb71045f1d3b72b17e922a86b5014f68345b5b3
Showing with 305 additions and 178 deletions.
  1. +39 −12 bindings/Makefile.am
  2. +1 −1 configure.in
  3. +5 −0 src/Makefile.am
  4. +259 −160 src/snmp.c
  5. +1 −5 version-gen.sh
View
@@ -10,28 +10,55 @@ EXTRA_DIST = perl/Makefile.PL \
perl/lib/Collectd/Plugins/Monitorus.pm \
perl/lib/Collectd/Plugins/OpenVZ.pm
+CLEANFILES = \
+ buildperl/Collectd.pm \
+ buildperl/Collectd/Plugins/OpenVZ.pm \
+ buildperl/Collectd/Unixsock.pm \
+ buildperl/Makefile.PL \
+ .perl-directory-stamp
+
+DISTCLEANFILES = \
+ buildperl/Collectd.pm \
+ buildperl/Collectd/Plugins/OpenVZ.pm \
+ buildperl/Collectd/Unixsock.pm \
+ buildperl/Makefile.PL \
+ .perl-directory-stamp
+
all-local: @PERL_BINDINGS@
+
install-exec-local:
- [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) install )
+ [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
+
+# Perl 'make uninstall' does not work as well as wanted.
+# So we do the work here.
+uninstall-local:
+ rm -f $(DESTDIR)$(mandir)/man3/Collectd::Unixsock.3pm
+ rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd.pm
+ rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd/Plugins/OpenVZ.pm
+ rm -f $(DESTDIR)$(datarootdir)/perl5/Collectd/Unixsock.pm
+ rm -f $(DESTDIR)$(prefix)/lib64/perl5/perllocal.pod
+ rm -f $(DESTDIR)$(prefix)/lib64/perl5/auto/Collectd/.packlist
clean-local:
- [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean )
+ rm -rf buildperl
-perl: perl/Makefile
- cd perl && $(MAKE)
+perl: buildperl/Makefile
+ cd buildperl && $(MAKE)
-perl/Makefile: .perl-directory-stamp perl/Makefile.PL \
+buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
$(top_builddir)/config.status
- cd perl && @PERL@ Makefile.PL INSTALL_BASE=$(prefix) @PERL_BINDINGS_OPTIONS@
+ cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(prefix) @PERL_BINDINGS_OPTIONS@
+
+buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
.perl-directory-stamp:
- if test ! -d perl; then \
- mkdir -p perl/Collectd/Plugins; \
- cp $(srcdir)/perl/Collectd.pm perl/; \
- cp $(srcdir)/perl/Makefile.PL perl/; \
- cp $(srcdir)/perl/Collectd/Unixsock.pm perl/Collectd/; \
- cp $(srcdir)/perl/Collectd/Plugins/OpenVZ.pm perl/Collectd/Plugins/; \
+ if test ! -d buildperl; then \
+ mkdir -p buildperl/Collectd/Plugins; \
+ cp $(srcdir)/perl/lib/Collectd.pm buildperl/; \
+ cp $(srcdir)/perl/Makefile.PL buildperl/; \
+ cp $(srcdir)/perl/lib/Collectd/Unixsock.pm buildperl/Collectd/; \
+ cp $(srcdir)/perl/lib/Collectd/Plugins/OpenVZ.pm buildperl/Collectd/Plugins/; \
fi
touch $@
View
@@ -2986,7 +2986,7 @@ AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
perl_interpreter="perl"
AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
[
- if test -x "$withval"
+ if test -f "$withval" && test -x "$withval"
then
perl_interpreter="$withval"
with_libperl="yes"
View
@@ -1392,3 +1392,8 @@ install-exec-hook:
$(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
$(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
$(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(pkgdatadir)/types.db;
+ rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
+ rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
Oops, something went wrong.

0 comments on commit 5eb7104

Please sign in to comment.