Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ecsos:monitoring
nedi
nedi.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nedi.spec of Package nedi
# # spec file for package nedi # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. Name: nedi Version: 2.1C Release: 1 License: GPL-3.0-or-later Summary: Network Discovery Url: http://www.nedi.ch Group: System/Monitoring #Source: http://www.nedi.ch/pub/%{name}-%{version}.tgz Source: http://www.nedi.ch/pub/%{name}-%{version}.npkg Source1: nedi-rpmlintrc Source2: create_manfile.pl Source3: apache2_nedi.conf Source5: nedi-README.SUSE Patch0: libpath_in_libmisc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl(Pod::Man) BuildRequires: nagios-rpm-macros BuildRequires: fdupes BuildRequires: cron Requires(pre): apache2 Requires: %{name}-db == %{version} Requires: cron Requires: net-snmp Requires: perl(Algorithm::Diff) Requires: perl(DBI) Requires: perl(Crypt::OpenSSL::RSA) Requires: perl(File::Path) Requires: perl(Getopt::Std) Requires: perl(IO::Tty) Requires: perl(IO::Pty::Easy) Requires: perl(Net::Nslookup) Requires: perl(Net::Ping) Requires: perl(Net::SMTP) Requires: perl(Net::SSH2) Requires: perl(Net::SNMP) Requires: perl(Net::Telnet) Requires: perl(RRDs) Requires: perl(Socket6) Requires: perl(Time::HiRes) Requires: php-dba Requires: php-gd Requires: php-session Requires: php-snmp Requires: rrdtool Requires: gd Requires: nfdump Recommends: arpwatch Recommends: perl(Net::Telnet::Cisco) Recommends: perl(IO::Tty) Recommends: perl(libnet) Recommends: perl(LWP::UserAgent) Recommends: perl(Net::DNS::Resolver) Recommends: perl(NTP) Recommends: perl(YAML) %description NeDi can discover your network on a regular basis. It allows you to locate and track all connected devices, monitor traffic or broadcasts, send mails or SMS when certain events occur and backup the configuration of your switches & routers in addition. A modular architecture provides cross vendor support and simple expandability. It even supports virtualized environments, where you can manage the VMs natively. Seamless visibility lets you to pinpoint bottlenecks or network related problems in your data center. The self-documenting concept is based on the network configuration itself. Dynamic maps can also be used to visualize traffic & errors between buildings or cities for example. %package pgsql Summary: Dependencies for PostgreSQL Group: System/Monitoring Requires: %{name} == %{version} Requires: perl(Class::DBI::Pg) Requires: perl(DBD::Pg) Requires: php-pgsql Provides: %{name}-db = %{version}-%{release} %description pgsql Install this package if you want to run %{name} with PostgreSQL. %package mysql Summary: Dependencies for MySQL or MariaDB Group: System/Monitoring Requires: %{name} == %{version} Requires: perl(Class::DBI::mysql) Requires: perl(DBD::mysql) Requires: php-mysql Provides: %{name}-db = %{version}-%{release} %description mysql Install this package if you want to run %{name} with MySQL or MariaDB. %prep %setup -q -T -c %{name} -a0 %patch0 -p1 install -Dm644 %{SOURCE5} README.SUSE find . -name "*.css" -exec chmod -x {} \; find . -name "*.def" -exec chmod -x {} \; find . -name "*.html" -exec chmod -x {} \; find . -name "*.php" -exec chmod -x {} \; find . -name "*.txt" -exec chmod -x {} \; find . -name "*.js" -exec chmod -x {} \; find . -name "*.pm" -exec chmod -x {} \; find . -name "*.tar*" -exec chmod -x {} \; find . -type f -name "*.pl" -exec sed -i -e 's|\/usr\/bin\/env perl|\/usr\/bin\/perl|g' {} \; %build %install mkdir -p %{buildroot}/%{_sysconfdir}/apache2/conf.d/ mkdir -p %{buildroot}/%{_sysconfdir}/cron.d/ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_sysconfdir}/%{name} mkdir -p %{buildroot}/%{_datadir}/%{name} mkdir -p %{buildroot}/%{_libdir}/%{name} mkdir -p %{buildroot}/%{_var}/lib/%{name} mkdir -p %{buildroot}/%{_var}/log/%{name} mkdir -p %{buildroot}/%{_var}/cache/rrd install -Dm660 nedi.conf %{buildroot}/%{_sysconfdir}/%{name}/nedi.conf install -Dm660 seedlist %{buildroot}/%{_sysconfdir}/%{name}/seedlist install -Dm660 agentlist %{buildroot}/%{_sysconfdir}/%{name}/agentlist install -Dm640 inc/crontab %{buildroot}/%{_sysconfdir}/cron.d/%{name} rm inc/crontab cp *.pl %{buildroot}/%{_libdir}/%{name}/ cp -r contrib exe %{buildroot}/%{_libdir}/%{name}/ cp -r inc %{buildroot}/%{_libdir}/%{name}/ cp -r conf rrd sysobj %{buildroot}/%{_var}/lib/%{name}/ cp -r html %{buildroot}/%{_datadir}/%{name}/ # fix path for nedi.conf, seedlist, agentlist and crontab in files sed -i "s|\$nedipath/nedi.conf|%{_sysconfdir}/%{name}/nedi.conf|g; \ s|\$nedipath/seedlist|%{_sysconfdir}/%{name}/seedlist|g; \ s|\$nedipath/agentlist|%{_sysconfdir}/%{name}/agentlist|g; \ s|^nedipath.*|nedipath %{_libdir}/nedi|g; \ s|\$nedipath/inc/crontab|%{_sysconfdir}/cron.d/%{name}|g;" \ %{buildroot}/%{_datadir}/%{name}/html/System-Files.php sed -i "s|<?=\$nedipath?>/nedi.conf|%{_sysconfdir}/%{name}/nedi.conf|g; \ s|<?=\$nedipath?>/seedlist|%{_sysconfdir}/%{name}/seedlist|g; \ s|<?=\$nedipath?>/agentlist|%{_sysconfdir}/%{name}/agentlist|g; \ s|<?=\$nedipath?>/inc/crontab|%{_sysconfdir}/cron.d/%{name}|g;" \ %{buildroot}/%{_datadir}/%{name}/html/log/msg.txt sed -i "s|/etc/nedi.conf|%{_sysconfdir}/%{name}/nedi.conf|g; \ s|\$nedipath/seedlist|%{_sysconfdir}/%{name}/seedlist|g; \ s|\$nedipath/agentlist|%{_sysconfdir}/%{name}/agentlist|g;" \ %{buildroot}/%{_libdir}/%{name}/inc/libmisc.pm sed -i "s|/etc/nedi.conf|%{_sysconfdir}/%{name}/nedi.conf|g;" \ %{buildroot}/%{_datadir}/%{name}/html/inc/libmisc.php sed -i "s|/var/nedi/nedi.pl|%{_libdir}/%{name}/nedi.pl|g; \ s|/var/nedi/statis.pl|%{_libdir}/%{name}/stati.pl|g; \ s|/var/nedi/nedi.conf|%{_sysconfdir}/%{name}/nedi.conf|g;" \ %{buildroot}/%{_sysconfdir}/cron.d/%{name} # fix default values in standard config sed -i "s|/Data/nagios/rw/nagios.cmd|%{nagios_command_file}|g; \ s|/var/nedi|%{_libdir}/%{name}|g; \ s|^nedipath.*|nedipath %{_libdir}/%{name}|g; \ s|/var/arpwatch/arp|/var/lib/arpwatch/arp|g;" %{buildroot}/%{_sysconfdir}/%{name}/nedi.conf # create man pages out of the perldoc mkdir -p %{buildroot}/%{_mandir}/man1 for i in %{buildroot}/%{_libdir}/%{name}/*.pl ; do name=$(basename $i) perl %{SOURCE2} "%{version}" "1" $i %{buildroot}/%{_mandir}/man1/${name}.1 done # install apache2 configuration file install -m644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/apache2/conf.d/%{name}.conf # avoid empty subpackages echo "This package is here to require the needed dependencies for PostgreSQL" > README-pgsql echo "This package is here to require the needed dependencies for MySQL/MariaDB" > README-mysql # run fdupes %fdupes %{buildroot}%{_var}/lib/%{name}/sysobj/ %clean rm -rf %{buildroot} %postun if [ "$1" = "0" ]; then # deinstallation of the package - remove the apache flag test -x %{_sbindir}/a2disflag && %{_sbindir}/a2disflag NEDI >/dev/null fi %pre if [ "$1" = "1" ]; then # enable version in apache config test -x %{_sbindir}/a2enmod && %{_sbindir}/a2enmod version >/dev/null || : # enable php in apache config test -x %{_sbindir}/a2enmod && %{_sbindir}/a2enmod php7 >/dev/null || : # enable NEDI in /etc/sysconfig/apache2 test -x %{_sbindir}/a2enflag && %{_sbindir}/a2enflag NEDI >/dev/null || : fi %files %defattr(-,root,root) %doc README.SUSE %dir %{_sysconfdir}/%{name} %dir %{_libdir}/%{name} %dir %{_datadir}/%{name} %dir %{_var}/lib/%{name} %dir %{_var}/log/%{name} %dir %{_var}/cache/rrd %{_mandir}/man1/* %config(noreplace) %attr(0660,root,www) %{_sysconfdir}/%{name}/nedi.conf %config(noreplace) %attr(0660,root,www) %{_sysconfdir}/%{name}/seedlist %config(noreplace) %attr(0660,root,www) %{_sysconfdir}/%{name}/agentlist %config(noreplace) %{_sysconfdir}/cron.d/%{name} %config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}.conf %{_libdir}/%{name}/* %{_datadir}/%{name}/* %{_var}/lib/%{name}/* %defattr(0755,root,root) %{_libdir}/%{name}/contrib/*.sh %{_libdir}/%{name}/contrib/*.pl %{_libdir}/%{name}/contrib/delete-stale-devices %{_libdir}/%{name}/exe/*.pl %{_libdir}/%{name}/inc/*.pl %files pgsql %defattr(-,root,root) %doc README-pgsql %files mysql %defattr(-,root,root) %doc README-mysql %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor