From fbe899ec8427bec2bfcbda5d58ea93aa92d9dede Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Feb 21 2015 12:45:08 +0000 Subject: new release 0.98.0 --- diff --git a/ipv6calc.spec b/ipv6calc.spec index b475617..5a1decf 100644 --- a/ipv6calc.spec +++ b/ipv6calc.spec @@ -1,21 +1,59 @@ -#define headtag .head.20140802.084646 +#define headtag .rc4.head.20150221.115120 Summary: IPv6 address format change and calculation utility Name: ipv6calc -Version: 0.97.4%{?headtag} -Release: 7%{?dist} +Version: 0.98.0%{?headtag} +Release: 8%{?dist} Group: Applications/Text URL: http://www.deepspace6.net/projects/%{name}.html License: GPLv2 Source: ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/%{name}-%{version}.tar.gz BuildRequires: openssl-devel -BuildRequires: %{_bindir}/iconv BuildRequires: perl(Digest::MD5), perl(Digest::SHA1), perl(URI::Escape) BuildRequires: perl(strict), perl(warnings) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# database support (deselectable) +%if "%{?_without_ip2location:0}%{?!_without_ip2location:1}" == "1" +%define enable_ip2location 1 +%endif + +%if "%{?_without_geoip:0}%{?!_without_geoip:1}" == "1" +%define enable_geoip 1 +%endif + +%if "%{?_without_dbip:0}%{?!_without_dbip:1}" == "1" +%define enable_dbip 1 +%endif + +%if "%{?_without_external:0}%{?!_without_external:1}" == "1" +%define enable_external 1 +%endif + +%if "%{?_without_shared:0}%{?!_without_shared:1}" == "1" +%define enable_shared 1 +%endif + + +# database locations +%define ip2location_db %{_datadir}/IP2Location +%define geoip_db %{_datadir}/GeoIP +%define dbip_db %{_datadir}/DBIP +%define external_db %{_datadir}/%{name}/db + + +# Berkeley DB selector +%define require_db4 %(echo "%{dist}" | egrep -q '^\.el(5|6)$' && echo 1 || echo 0) +%if %{require_db4} +BuildRequires: db4-devel +%else +BuildRequires: libdb-devel +%endif + + %description ipv6calc is a small utility which formats and calculates IPv4/IPv6 addresses in different ways. @@ -34,87 +72,185 @@ Also this package contains additional programs - ipv6logstats: create statistics from list of IPv4/IPv6 addresses (examples included for use with gnu-plot) +Support for following databases + - IP2Location %{?enable_ip2location:ENABLED}%{?!enable_ip2location:DISABLED} + default directory for downloaded db files: %{ip2location_db} + (requires also external library on system) + + - GeoIP %{?enable_geoip:ENABLED}%{?!enable_geoip: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} + + - External %{?enable_external:ENABLED}%{?!enable_external:DISABLED} + default directory for generated db files: %{external_db} + +Built %{?enable_shared:WITH}%{?!enable_shared:WITHOUT} shared-library + +Available rpmbuild rebuild options: + --without ip2location + --without geoip + --without dbip + --without external + --without shared + %package ipv6calcweb -Summary: IP address information web utility -Group: Applications/Internet -Requires: ipv6calc httpd -Requires: perl(URI) perl(Digest::SHA1) perl(Digest::MD5) -BuildRequires: perl(URI) perl(Digest::SHA1) perl(Digest::MD5) +Summary: IP address information web utility +Group: Applications/Internet +Requires: ipv6calc httpd +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 displaying information of IP addresses on a web page using ipv6calc. +Check/addjust %{_sysconfdir}/httpd/conf.d/ipv6calcweb.conf +Default restricts access to localhost + %prep %setup -q -%configure --enable-ip2location --with-ip2location-dynamic --with-ip2location-headers-fallback --enable-geoip --with-geoip-dynamic --with-geoip-headers-fallback +%configure \ + %{?enable_ip2location:--enable-ip2location} \ + %{?enable_ip2location:--with-ip2location-dynamic --with-ip2location-headers-fallback} \ + --with-ip2location-db=%{ip2location_db} \ + %{?enable_geoip:--enable-geoip} \ + %{?enable_geoip:--with-geoip-dynamic --with-geoip-headers-fallback} \ + --with-geoip-db=%{geoip_db} \ + %{?enable_dbip:--enable-dbip} \ + --with-dbip-db=%{dbip_db} \ + %{?enable_external:--enable-external} \ + --with-external-db=%{external_db} \ + %{?enable_shared:--enable-shared} %build +make clean make %{?_smp_mflags} COPTS="$RPM_OPT_FLAGS" - + + %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} -# Copy examples and helper files together -mkdir -p redhat/{ipv6logconv,ipv6logstats/examples-{data,gri}} -chmod 644 examples/analog/run_analog.sh -cp -p examples/analog/run_analog.sh redhat/ipv6logconv -chmod 644 ipv6logstats/{collect_ipv6logstats.pl,example_ipv6logstats.sh} -cp -pf examples/analog/{analog-,ipv6calc.tab}* redhat/ipv6logconv -cp -pf ipv6logstats/{README,collect_,example_}* redhat/ipv6logstats -cp -pf ipv6logstats/examples-data/*.txt redhat/ipv6logstats/examples-data -cp -pf ipv6logstats/examples-gri/*.gri redhat/ipv6logstats/examples-gri +## Install examples and helper files +install -d -p %{buildroot}%{_docdir}/%{name}-%{version}/ # tools install -d %{buildroot}%{_datadir}/%{name}/tools -for tool in GeoIP-update.sh IP2Location-update.sh; do - install -m 755 tools/$tool %{buildroot}%{_datadir}/%{name}/tools +cat < - 0.98.0-8 +- new release 0.98.0 + +* Wed Feb 18 2015 Peter Bieringer +- add support for conditional builds + +* Sat Oct 25 2014 Peter Bieringer +- add /usr/share/ipv6calc/db directory + +* Sat Oct 11 2014 Peter Bieringer +- add additional requirements for ipv6calc-ipv6calcweb +- enable db-ip.com & external database support + * Thu Aug 28 2014 Jitka Plesnikova - 0.97.4-7 - Perl 5.20 rebuild +* Tue Aug 19 2014 Peter Bieringer - 0.97.4-7 +- new package for EPEL6/EPEL7 + * Sun Aug 17 2014 Peter Bieringer - add missing requirement for ipv6calc-ipv6calcweb