ipcalc/ipcalc.spec

50 lines
1.2 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:53:17 -04:00
Name: ipcalc
Version: 0.2.5
Release: 1
Summary: IP network address calculator
License: GPLv2+
URL: https://gitlab.com/ipcalc/%{name}
Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc libmaxminddb-devel
%description
ipcalc provides a simple way to calculate IP information for a host.
The various options specify what information ipcalc should display on standard out.
Multiple options may be specified. An IP address to operate on must always
be specified. Most operations also require a netmask or a CIDR prefix as well.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
CFLAGS="${CFLAGS:-%optflags} $RPM_LD_FLAGS" \
USE_RUNTIME_LINKING=yes USE_GEOIP=no USE_MAXMIND=yes LIBPATH=%{_libdir}
%make_build
%install
install -d %{buildroot}%{_bindir}
install -p -m 0755 ipcalc %{buildroot}%{_bindir}/
install -d -m 0755 %{buildroot}%{_mandir}/man1
install -p -m 0644 ipcalc.1 %{buildroot}%{_mandir}/man1
%check
make check
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%files help
%defattr(-,root,root)
%doc README.md
%{_mandir}/man1/*
%changelog
* Fri Aug 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.2.5-1
- Package init