Summary: Geolocation databases download helper for ntopng and other ntop software
Name: ntopng-data
Version: @NTOPNG_VERSION@
Release: @REVISION@
License: GPL
Group: Networking/Utilities
URL: http://www.ntop.org/
Source: ntopng-data-%{version}.tgz
Packager: Luca Deri <deri@ntop.org>
BuildArch: noarch
# Temporary location where the RPM will be built
BuildRoot:  %{_tmppath}/%{name}-%{version}-root

# Make sure .build-id is not part of the package
%define _build_id_links none

%description
Geolocation databases for ntopng and other ntop software packaged from https://db-ip.com

%prep

%build
mkdir -p $RPM_BUILD_ROOT/usr/share/ntopng/httpdocs/geoip
cp $HOME/dat_files/dbip-city-lite-*.mmdb $RPM_BUILD_ROOT/usr/share/ntopng/httpdocs/geoip/dbip-city-lite.mmdb
cp $HOME/dat_files/dbip-asn-lite-*.mmdb $RPM_BUILD_ROOT/usr/share/ntopng/httpdocs/geoip/dbip-asn-lite.mmdb
cp $HOME/dat_files/dbip-country-lite-*.mmdb $RPM_BUILD_ROOT/usr/share/ntopng/httpdocs/geoip/dbip-country-lite.mmdb

%clean

%files
/usr/share/ntopng/httpdocs/geoip/dbip-city-lite.mmdb
/usr/share/ntopng/httpdocs/geoip/dbip-asn-lite.mmdb
/usr/share/ntopng/httpdocs/geoip/dbip-country-lite.mmdb

# Set the default attributes of all of the files specified to have an
# owner and group of root and to inherit the permissions of the file
# itself.
%defattr(-, root, root)

%changelog

