Name: ipcalculator Version: 0.41 Release: 9%{?dist} Summary: A utility for computing broadcast, network, mask, and host ranges Group: Applications/Internet License: GPLv2+ URL: http://jodies.de/ipcalc Source0: http://jodies.de/ipcalc-archive/ipcalc-%{version}.tar.gz Source1: ipcalculator.conf Source2: bg.gif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %package cgi Summary: A CGI wrapper for ipcalculator Group: Applications/Internet Requires: ipcalculator Requires: httpd # fixes the URLS in ipcalculator.cgi Patch0: ipcalculator-hrefs.patch %description ipcalculator takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. By giving a second netmask, you can design subnets and supernets. It is also intended to be a teaching tool and presents the subnetting results as easy-to-understand binary values. %description cgi ipcalculator-cgi contains a CGI wrapper around the ipcalculator script. It allows you to embed ipcalculator's functionality into a web page. %prep %setup -q -n ipcalc-%{version} # "ipcalc" is hardcoded into the help and usage messages. We don't want to # substitute everything since there are mentions of ipcalc in URLs etc. sed -i '1041,1085s/ipcalc/ipcalculator/g' ipcalc # the cgi wrapper uses hardcoded path to a different location sed -i 's:/usr/local/bin/ipcalc:%{_bindir}/ipcalculator:' ipcalc.cgi %patch0 -p1 -b .hrefs %build %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} install -pm 644 ipcalc.gif $RPM_BUILD_ROOT%{_datadir}/%{name}/ipcal03.gif install -pm 644 ipcalculator.png \ $RPM_BUILD_ROOT%{_datadir}/%{name}/ipcalculator.png install -pm 755 ipcalc $RPM_BUILD_ROOT%{_bindir}/ipcalculator ## CGI wrapper install install -Dpm 644 %{SOURCE1} \ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/ipcalculator.conf install -Dpm 755 ipcalc.cgi \ $RPM_BUILD_ROOT%{_datadir}/%{name}/ipcalculator.cgi install -Dpm 644 %{SOURCE2} \ $RPM_BUILD_ROOT%{_datadir}/%{name}/bg.gif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc changelog contributors license %dir %{_datadir}/%{name} %{_bindir}/ipcalculator %files cgi %defattr(-,root,root,-) %dir %{_datadir}/%{name} %config(noreplace) %{_sysconfdir}/httpd/conf.d/ipcalculator.conf %{_datadir}/%{name}/ipcal03.gif %{_datadir}/%{name}/bg.gif %{_datadir}/%{name}/ipcalculator.png %{_datadir}/%{name}/ipcalculator.cgi %changelog * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.41-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 0.41-7 - Fix Patch0:/%%patch mismatch. * Wed Dec 26 2007 Jakub Hrozek <jhrozek@redhat.com> - 0.41-6 - fix a typo in the sed substitution - add the background image from the project page * Sun Dec 16 2007 Jakub Hrozek <jhrozek@redhat.com> - 0.41-5 - correct timestamps for the tarball - fix the URLs in ipcalculator.cgi - fix the config file (Patrice Dumas) - remove autodetected reqs, add req:httpd for the -cgi subpackage - own the images by the -cgi subpackage - fix the license tag * Sat Jun 16 2007 Jakub Hrozek <jhrozek@redhat.com> - 0.41-4 - split the CGI wrapper into its own -cgi subpackage - nicer sed substitution in the CGI module - own the /usr/share/ipcalculator directory - add a config file for httpd (written by Manuel Wolfshant) - mention ipcalculator, not ipcalc in usage and help messages * Sat Jun 1 2007 Jakub Hrozek <jhrozek@redhat.com> - 0.41-3 - move the cgi script outside /var/www * Tue May 29 2007 Jakub Hrozek <jhrozek@redhat.com> - 0.41-2 - renamed to "ipcalculator" to avoid clash with /bin/ipcalc, also rename ipcalc the binary and ipcalc.cgi * Tue May 29 2007 Jakub Hrozek <jhrozek@redhat.com> - 0.41-1 - initial packaging