diff --git a/.gitignore b/.gitignore index e69de29..a1228f1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/0.1.0.tar.gz diff --git a/ipcalc.spec b/ipcalc.spec new file mode 100644 index 0000000..d523590 --- /dev/null +++ b/ipcalc.spec @@ -0,0 +1,50 @@ +Name: ipcalc +Version: 0.1.0 +Release: 1%{?dist} +Summary: IP network address calculator + +# This is an updated version of ipcalc originally found +# in Fedora's initscripts at: +# https://fedorahosted.org/releases/i/n/initscripts/ + +License: GPLv2+ +URL: https://github.com/nmav/ipcalc +Source0: https://github.com/nmav/ipcalc/archive/%{version}.tar.gz + +BuildRequires: GeoIP-devel +BuildRequires: popt-devel +# Explicitly conflict with older initscript packages that ship ipcalc +Conflicts: initscripts < 9.63 + +%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. + +%prep +%setup -q + +%build +CFLAGS="${CFLAGS:-%optflags}" LIBPATH=%{_libdir} make %{?_smp_mflags} + +%install +mkdir -p %{buildroot}%{_bindir} +install -p -m 755 ipcalc %{buildroot}%{_bindir}/ +mkdir -p -m 755 %{buildroot}%{_mandir}/man1 +install -p -m 644 ipcalc.1 %{buildroot}%{_mandir}/man1 + +%check +make check + +%files + +%{_bindir}/ipcalc +%license COPYING +%doc README.md +%{_mandir}/man1/ipcalc.1* + +%changelog +* Mon May 18 2015 Nikos Mavrogiannopoulos - 0.1.0-1 +- First independent release outside initscripts diff --git a/sources b/sources index e69de29..046cb22 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7dc1cf323da528331722809e58c613ee 0.1.0.tar.gz