Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 1eb9bdd0dd9dcf3cfc58aad4843f7e49 > files > 2

apache-mod_tcl-1.0.1-8mdv2009.0.src.rpm

#Module-Specific definitions
%define mod_name mod_tcl
%define mod_conf 27_%{mod_name}.conf
%define mod_so %{mod_name}.so

Summary:	DSO module for the apache web server
Name:		apache-%{mod_name}
Version:	1.0.1
Release:	%mkrel 8
Group:		System/Servers
License:	Apache License
URL:		http://tcl.apache.org/mod_tcl/
Source0:	%{mod_name}-%{version}.tar.gz
Source1:	%{mod_conf}
Source2:	test_script.tm
Patch0:		mod_tcl-fix-wild_name
Requires:	tcl >= 8.4.5
BuildRequires:	tcl >= 8.4.5
BuildRequires:	tcl-devel >= 8.4.5
Requires(pre):	tcl >= 8.4.5
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(pre):	apache-conf >= 2.2.0
Requires(pre):	apache >= 2.2.0
Requires:	apache-conf >= 2.2.0
Requires:	apache >= 2.2.0
BuildRequires:	apache-devel >= 2.2.0
BuildRequires:	file
Epoch:		1
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
mod_tcl includes a Tcl interpreter into an Apache web servers memory space,
thus combining Tcl and Apache web server together. This allows Apache to run
Tcl scripts natively without having to reload a Tcl interpreter every time the
script is run. The Tcl scripts are cached in the Tcl interpreter until the
script file modification time changes or Apache web server is restarted. Tcl
scripts using mod_tcl execute much faster than traditional CGI scripts because
they can avoid the initialization penalties that traditional CGI scripts incur
each time they are executed. mod_tcl only needs to initialize an interpreter
once at Apache web server startup. Additionally mod_tcl exports the Apache API
which allows a programmer to have complete control over http requests that CGI
scripts can not provide.

%prep

%setup -q -n %{mod_name}-%{version}
%patch0

cp %{SOURCE2} test_script.tm
cp %{SOURCE1} %{mod_conf}

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

%build

cp tcl_core.c %{mod_name}.c 

# use stuff availble to determine stuff... :-)
. %{_libdir}/tclConfig.sh

#%{_sbindir}/apxs -c -I%{_includedir} -Wl,-ltcl8.3 -DHAVE_TCL_H %{mod_name}.c tcl_cmds.c tcl_misc.c
%{_sbindir}/apxs -c -I%{_includedir} -Wl,-ltcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} -DHAVE_TCL_H %{mod_name}.c tcl_cmds.c tcl_misc.c

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_libdir}/apache-extramodules
install -d %{buildroot}%{_sysconfdir}/httpd/modules.d

install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/
install -m0644 %{mod_conf} %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf}

install -d %{buildroot}%{_var}/www/html/addon-modules
ln -s ../../../..%{_docdir}/%{name}-%{version} %{buildroot}%{_var}/www/html/addon-modules/%{name}-%{version}

%post
if [ -f %{_var}/lock/subsys/httpd ]; then
    %{_initrddir}/httpd restart 1>&2;
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f %{_var}/lock/subsys/httpd ]; then
	%{_initrddir}/httpd restart 1>&2
    fi
fi

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc AUTHORS INSTALL NEWS README test_script.tm
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf}
%attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so}
%{_var}/www/html/addon-modules/*




%changelog
* Mon Jul 14 2008 Oden Eriksson <oeriksson@mandriva.com> 1:1.0.1-8mdv2009.0
+ Revision: 235111
- rebuild

* Thu Jun 05 2008 Oden Eriksson <oeriksson@mandriva.com> 1:1.0.1-7mdv2009.0
+ Revision: 215652
- fix rebuild

* Sun Mar 09 2008 Oden Eriksson <oeriksson@mandriva.com> 1:1.0.1-6mdv2008.1
+ Revision: 182870
- rebuild

* Mon Feb 18 2008 Thierry Vignaud <tvignaud@mandriva.com> 1:1.0.1-5mdv2008.1
+ Revision: 170753
- rebuild
- fix "foobar is blabla" summary (=> "blabla") so that it looks nice in rpmdrake
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Sat Sep 08 2007 Oden Eriksson <oeriksson@mandriva.com> 1:1.0.1-4mdv2008.0
+ Revision: 82684
- rebuild

* Fri Sep 07 2007 Anssi Hannula <anssi@mandriva.org> 1:1.0.1-3mdv2008.0
+ Revision: 81991
- rebuild for new soname of tcl


* Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 1.0.1-2mdv2007.1
+ Revision: 140762
- rebuild

* Mon Feb 12 2007 Oden Eriksson <oeriksson@mandriva.com> 1:1.0.1-1mdv2007.1
+ Revision: 118935
- 1.0.1

* Sun Nov 12 2006 Oden Eriksson <oeriksson@mandriva.com> 1:1.0-7mdv2007.1
+ Revision: 83317
- rebuild
- remove macro to make iurt able to build the package
- bunzip patches and sources

  + Stefan van der Eijk <stefan@mandriva.org>
    - Import apache-mod_tcl

* Mon Aug 07 2006 Oden Eriksson <oeriksson@mandriva.com> 1:1.0-5mdv2007.0
- rebuild

* Wed Feb 15 2006 Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> 1:1.0-4mdk
- Rebuild for new tcl

* Sun Jan 01 2006 Oden Eriksson <oeriksson@mandriva.com> 1:1.0-3mdk
- rebuilt against soname aware deps (tcl/tk)
- fix deps

* Fri Dec 16 2005 Oden Eriksson <oeriksson@mandriva.com> 1:1.0-2mdk
- rebuilt against apache-2.2.0

* Mon Nov 28 2005 Oden Eriksson <oeriksson@mandriva.com> 1:1.0-1mdk
- fix versioning

* Sun Jul 31 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_1.0-2mdk
- fix deps

* Fri Jun 03 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_1.0-1mdk
- rename the package
- the conf.d directory is renamed to modules.d
- use new rpm-4.4.x pre,post magic

* Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.0-4mdk
- use the %%mkrel 1

* Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.0-3mdk
- fix %%post and %%postun to prevent double restarts
- fix bug #6574

* Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.0-2mdk
- spec file cleanups, remove the ADVX-build stuff

* Tue Feb 08 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.0-1mdk
- rebuilt for apache 2.0.53

* Wed Sep 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_1.0-1mdk
- built for apache 2.0.52

* Fri Sep 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.51_1.0-1mdk
- built for apache 2.0.51

* Tue Jul 13 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_1.0-1mdk
- built for apache 2.0.50
- remove redundant provides

* Tue Jun 15 2004 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.49_1.0-1mdk
- built for apache 2.0.49