diff --git a/.gitignore b/.gitignore index 614138b..78e15f9 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ ipv6calc-0.73.0.tar.gz /ipv6calc-0.99.2.tar.gz /ipv6calc-1.0.0.tar.gz /ipv6calc-1.1.0.tar.gz +/ipv6calc-2.0.0.tar.gz diff --git a/ipv6calc.spec b/ipv6calc.spec index e6130eb..d039712 100644 --- a/ipv6calc.spec +++ b/ipv6calc.spec @@ -15,9 +15,8 @@ Summary: IPv6 address format change and calculation utility Name: ipv6calc -Version: 1.1.0 -Release: 28%{?gittag}%{?dist} -Group: Applications/Text +Version: 2.0.0 +Release: 31%{?gittag}%{?dist} URL: http://www.deepspace6.net/projects/%{name}.html License: GPLv2 %if 0%{?gitcommit:1} @@ -38,7 +37,6 @@ Provides: ipv6calc-libs = %{version}-%{release} Conflicts: ipv6calc-libs %endif -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # mod_ipv6calc related @@ -59,6 +57,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %define enable_dbip 1 %endif +%if "%{?_without_mmdb:0}%{?!_without_mmdb:1}" == "1" +%define enable_mmdb 1 +%endif + %if "%{?_without_external:0}%{?!_without_external:1}" == "1" %define enable_external 1 %endif @@ -83,6 +85,10 @@ BuildRequires: db4-devel BuildRequires: libdb-devel %endif +%if %{enable_mmdb} +BuildRequires: libmaxminddb-devel +%endif + # RPM license macro detector %define rpm_license_extra %(echo "%{_defaultlicensedir}" | grep -q defaultlicensedir && echo 0 || echo 1) @@ -115,10 +121,18 @@ Support for following databases default directory for downloaded db files: %{geoip_db} (requires also external library on system) + - GeoIP v2 %{?enable_mmdb:ENABLED}%{?!enable_mmdb:DISABLED} + default directory for downloaded db files: %{geoip_db} + (requires also external library on system) + - db-ip.com %{?enable_dbip:ENABLED}%{?!enable_dbip:DISABLED} (once generated database files are found on system) default directory for generated db files: %{dbip_db} + - db-ip.com v2 %{?enable_mmdb:ENABLED}%{?!enable_mmdb:DISABLED} + (once generated database files are found on system) + default directory for generated db files: %{dbip_db} + - External %{?enable_external:ENABLED}%{?!enable_external:DISABLED} default directory for generated db files: %{external_db} @@ -128,6 +142,7 @@ Available rpmbuild rebuild options: --without ip2location --without geoip --without dbip + --without mmdb (which disables GeoIP v2 and db-ip.com v2) --without external --without shared --without mod_ipv6calc @@ -135,10 +150,9 @@ Available rpmbuild rebuild options: %package ipv6calcweb Summary: IP address information web utility -Group: Applications/Internet Requires: ipv6calc httpd -Requires: perl(URI) perl(Digest::SHA1) perl(Digest::MD5) perl(HTML::Entities) perl(Proc::ProcessTable) -BuildRequires: perl(URI) perl(Digest::SHA1) perl(Digest::MD5) perl(HTML::Entities) perl(Proc::ProcessTable) +Requires: perl(URI) perl(Digest::SHA1) perl(Digest::MD5) perl(HTML::Entities) +BuildRequires: perl(URI) perl(Digest::SHA1) perl(Digest::MD5) perl(HTML::Entities) %description ipv6calcweb ipv6calcweb contains a CGI program and a configuration file for @@ -151,7 +165,6 @@ Default restricts access to localhost %if %{enable_mod_ipv6calc} %package mod_ipv6calc Summary: Apache module for ipv6calc -Group: Applications/Internet BuildRequires: httpd-devel psmisc curl Requires: httpd >= 2.4.0 Requires: httpd <= 2.4.99999 @@ -191,6 +204,7 @@ By default the module is disabled. --with-geoip-db=%{geoip_db} \ %{?enable_dbip:--enable-dbip} \ --with-dbip-db=%{dbip_db} \ + %{?enable_mmdb:--enable-mmdb --with-mmdb-dynamic} \ %{?enable_external:--enable-external} \ --with-external-db=%{external_db} \ %{?enable_shared:--enable-shared} \ @@ -234,14 +248,21 @@ done # db directory install -d %{buildroot}%{external_db} +# selinux +install -d %{buildroot}%{_datadir}/%{name}/selinux + # ipv6calcweb install -d %{buildroot}%{_sysconfdir}/httpd/conf.d install -d %{buildroot}%{_localstatedir}/www/cgi-bin -install ipv6calcweb/ipv6calcweb.conf %{buildroot}%{_sysconfdir}/httpd/conf.d -install -m 755 ipv6calcweb/ipv6calcweb.cgi %{buildroot}%{_localstatedir}/www/cgi-bin +install ipv6calcweb/ipv6calcweb.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/ +install -m 755 ipv6calcweb/ipv6calcweb.cgi %{buildroot}%{_localstatedir}/www/cgi-bin/ +install -m 644 ipv6calcweb/ipv6calcweb-databases-in-var.te %{buildroot}%{_datadir}/%{name}/selinux/ +# mod_ipv6calc +install -d %{buildroot}%{_datadir}/%{name}/examples/mod_ipv6calc +install -m 755 mod_ipv6calc/ipv6calc.cgi %{buildroot}%{_datadir}/%{name}/examples/mod_ipv6calc %clean rm -rf %{buildroot} @@ -272,6 +293,9 @@ rm -rf %{buildroot} # tools %attr(755,-,-) %{_datadir}/%{name}/tools/* +# selinux +%attr(644,-,-) %{_datadir}/%{name}/selinux/* + # shared library %{?enable_shared:%attr(755,-,-) %{_libdir}/libipv6calc*} @@ -281,7 +305,9 @@ rm -rf %{buildroot} # examples %attr(755,-,-) %{_datadir}/%{name}/examples/*/*.pl %attr(755,-,-) %{_datadir}/%{name}/examples/*/*.sh -%{_datadir}/%{name}/examples/* +%{_datadir}/%{name}/examples/ipv6loganon/ +%{_datadir}/%{name}/examples/ipv6logconv/ +%{_datadir}/%{name}/examples/ipv6logstats/ %files ipv6calcweb @@ -311,6 +337,8 @@ rm -rf %{buildroot} %config(noreplace) %{_httpd_confdir}/ipv6calc.conf %attr(755,-,-) %{_httpd_moddir}/mod_ipv6calc.so +%attr(755,-,-) %{_datadir}/%{name}/examples/mod_ipv6calc/ipv6calc.cgi + %post /usr/sbin/ldconfig @@ -321,6 +349,11 @@ rm -rf %{buildroot} %changelog +* Tue Feb 05 2019 Peter Bieringer - 2.0.0-31 +- new release 2.0.0 +- subpackage ipv6calcweb: remove dependency Perl(Proc::ProcessTable) +- add dependency libmaxminddb-devel + * Wed Oct 03 2018 Peter Bieringer - 1.1.0-28 - new release 1.1.0 - subpackage ipv6calcweb: add dependency Perl(Proc::ProcessTable) diff --git a/sources b/sources index 70bc518..d50a369 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipv6calc-1.1.0.tar.gz) = 8fe2a4717f2be4ceae051b635d4329b8c438d9741e9a99a3c12cc1c0d0daef89325cc9beb7ca65da3c671586ce2a596191962118005aeaaf7cfe33a1d4549101 +SHA512 (ipv6calc-2.0.0.tar.gz) = 6763c27399529b1cc22bdffd84e1fb412d8fe7e20fa7c120fa9a231c0d24e2dde5c285856166ed71e498c93574baaf9d87c4ffb50b2a8511d71b7af4f35c3f25