rpms/ipcalculator/F-7 bg.gif, NONE, 1.1 ipcalculator-hrefs.patch, NONE, 1.1 ipcalculator.conf, NONE, 1.1 ipcalculator.spec, NONE, 1.1 sources, 1.1, 1.2

Jakub Hrozek (jhrozek) fedora-extras-commits at redhat.com
Tue Feb 12 13:44:00 UTC 2008


Author: jhrozek

Update of /cvs/extras/rpms/ipcalculator/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5740

Modified Files:
	sources 
Added Files:
	bg.gif ipcalculator-hrefs.patch ipcalculator.conf 
	ipcalculator.spec 
Log Message:
Initial import into the F-7 branch

ipcalculator-hrefs.patch:

--- NEW FILE ipcalculator-hrefs.patch ---
diff -up ./ipcalc.cgi.hrefs ./ipcalc.cgi
--- ./ipcalc.cgi.hrefs	2007-12-16 14:44:42.000000000 +0100
+++ ./ipcalc.cgi	2007-12-16 14:46:25.000000000 +0100
@@ -339,11 +339,11 @@ print <<"EOF";
 </table>
 <hr>
 <a href="http://jodies.de/ipcalc-archive/">Download</a><br>
-<a href="ipcalc.png">Screenshot</a> (ipcalc works also at the prompt)<br>
+<a href="http://jodies.de/ipcalc.png">Screenshot</a> (ipcalc works also at the prompt)<br>
 <a href="http://jodies.de/ipcalc_cgi">CGI wrapper that produced this page</a>.<br>
-<a href="ipcalc-archive">Archive</a><br>
+<a href="http://jodies.de/ipcalc-archive/">Archive</a><br>
 Have a look in the archives for the <b>new version 0.38</b>, with the capability to deaggregate network ranges<br>
-<a href="ipcalc-faq/win32.html">How to run this under windows</a><br>
+<a href="http://jodies.de/ipcalc-faq/win32.html">How to run this under windows</a><br>
 Debian users can apt-get install ipcalc<br>
 2000-2004 <a href="mailto:$MAIL_ADDRESS">Krischan Jodies</a>
 


--- NEW FILE ipcalculator.conf ---
Alias /ipcalculator /usr/share/ipcalculator/
<Directory /usr/share/ipcalculator/>
    DirectoryIndex ipcalculator.cgi
    Options ExecCGI
    AddHandler cgi-script cgi
    order deny,allow
    deny from all
    allow from 127.0.0.1
</Directory>


--- NEW FILE ipcalculator.spec ---
Name:           ipcalculator
Version:        0.41
Release:        6%{?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
%patch -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
* Wed Dec 26 2007 Jakub Hrozek <jhrozek at 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 at 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 at 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 at redhat.com> - 0.41-3
- move the cgi script outside /var/www

* Tue May 29 2007 Jakub Hrozek <jhrozek at 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 at redhat.com> - 0.41-1
- initial packaging


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ipcalculator/F-7/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	12 Feb 2008 02:36:15 -0000	1.1
+++ sources	12 Feb 2008 13:43:22 -0000	1.2
@@ -0,0 +1 @@
+fb791e9a5220fc8e624d915e18fc4697  ipcalc-0.41.tar.gz




More information about the fedora-extras-commits mailing list