# RPM Spec file for cgi.tcl # # Author: Stefan Hornburg # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any # later version. Name: cgi.tcl Summary: CGI support library for Tcl programmers %define major_version 0.7 %define minor_version 5 Version: %{major_version}.%{minor_version} Release: 1 Group: Development/Languages/Tcl Source: http://expect.nist.gov/cgi.tcl/cgi.tcl.tar.gz Patch: cgi.tcl-Makefile.in.diff Copyright: Public Domain Requires: tcl BuildRoot: /var/tmp/cgi.tcl BuildArch: noarch %description cgi.tcl is the CGI support library for Tcl programmers. The library is very thorough - it supports forms, tables, cookies, file upload, plug-ins, JavaScript, Netscape extensions, etc, etc. It also provides very convenient support for debugging and handling CGI errors. cgi.tcl can also be used for generating static html. This enables you to get programming features into HTML, such as variables, if/then/else, file I/O, etc. For example, HTML lacks variables so if you repeatedly use a link on a page and one day the link changes, you've got to update every use of the link, possibly on hundreds of pages. By storing the link in a Tcl variable, you can just change the one place where the variable is defined. This makes maintenance much easier. This is just a tiny example of the benefits cgi.tcl provides. %prep %setup -n cgi.tcl-%{major_version} %patch %build # ignore (site-)local settings CONFIG_SITE= ./configure --prefix=/usr make %install make prefix=$RPM_BUILD_ROOT/usr install # CGI examples mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/%{name}-%{version}/examples make exampledir=$RPM_BUILD_ROOT/$RPM_DOC_DIR/%{name}-%{version}/examples examples cp HISTORY README doc/ref.txt $RPM_BUILD_ROOT/$RPM_DOC_DIR/%{name}-%{version}/ %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/doc/cgi.tcl-%{version}/ /usr/lib/cgi%{major_version}/ /usr/man/man3/cgi.tcl.3