#%define snap 20040801 %define module HTML-Embperl %define rver 2.0.0 %define apache_version 2.0.54 %define modperl_version 2.0.54_2.0.1 %define mod_conf 76_Embperl.conf Summary: Embperl is a framework for building web sites with Perl Name: apache-%{module} Version: %{apache_version}_%{rver} Release: %mkrel 1 License: GPL Group: System/Servers URL: http://perl.apache.org/embperl/ Source0: ftp://ftp.dev.ecos.de/pub/perl/embperl/Embperl-%{rver}.tar.bz2 Source1: %{mod_conf}.bz2 Patch0: Embperl-2.09b-fix-CVS.patch.bz2 Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(pre): apache-conf >= 2.0.54 Requires(pre): apache >= %{apache_version} Requires: apache-mod_perl >= %{modperl_version} BuildRequires: apache >= %{apache_version} BuildRequires: apache-devel >= %{apache_version} BuildRequires: apache-modules >= %{apache_version} BuildRequires: apache-mod_perl = %{modperl_version} BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: perl-Apache-Session BuildRequires: perl-Apache-SessionX BuildRequires: perl-ExtUtils-XSBuilder BuildRequires: perl-HTML-Parser BuildRequires: perl-Parse-RecDescent BuildRequires: perl-Tie-IxHash BuildRequires: perl-libwww-perl BuildRequires: perl-devel BuildRequires: file Provides: apache2-HTML-Embperl Obsoletes: apache2-HTML-Embperl BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Embperl is a framework for building websites with Perl. For the beginner it's an easy to setup and use way of embedding Perl code in HTML pages. It delivers several features that ease the task of creating a ebsites, including dynamic tables, formfield-processing, escaping/unescaping, session handling, caching and more. If your demands grow it gives you the power to make your Website object-oriented and build it out of small reusable components. If you don't like the idea of mixing up all your layout and code then Embperl also supports separating it in different objects (e.g. creating an MVC application). Of course Embperl doesn't tie you to HTML - it allows components to be from different source formats (e.g. HTML, WML, XML, POD, ...) and if necessary transforms them (for example via XSLT) to other output formats. This is achieved by dividing the output generation into small steps, where each is processed by a plugable provider. Advanced users can create their own syntax definitions (for example tag libraries) and extend Embperl by writing their own providers and much more... Embperl is a server-side tool, which means that it's browser-independent. It can run in various ways: under mod_perl, as a CGI script, or offline. %prep %setup -q -n Embperl-%{rver} # fix strange perms find . -type d -perm 0700 -exec chmod 755 {} \; find . -type f -perm 0555 -exec chmod 755 {} \; find . -type f -perm 0444 -exec chmod 644 {} \; # 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//' rm -f eg/x/config.htm %patch -p1 perl -pi -e "s/\</\</;" eg/x/loop.htm cat << EOF > eg/.htaccess <Files ~ (\.htm)> SetHandler perl-script PerlResponseHandler Embperl </Files> Options +Indexes EOF find -type d|grep CVS|xargs rm -rf find -type f|grep cvsignore|xargs rm -f %build # (oe) pull in the apr and apu headers where ever they may be export APR_HEADERS="`apr-config --includes`" export APU_HEADERS="`apu-config --includes`" perl -pi -e "s|-I\\\$EPPATH \\\$i|-I\\\$EPPATH \\\$i $APR_HEADERS $APU_HEADERS|g" Makefile.PL perl -pi -e "s/action_module/actions_module/;" Makefile.PL perl xsbuilder/source_scan.pl perl xsbuilder/xs_generate.pl cat << EOF | perl Makefile.PL INSTALLDIRS=vendor INC="-I%{_includedir}/apache -I%{_includedir}/apache/regex -I%{_includedir}/apache/os/unix $APR_HEADERS $APU_HEADERS -I%{_includedir}/libxml2 -I./xs" y %{_includedir}/apache y %{_sbindir}/httpd %{_libdir}/apache-extramodules %{_libdir}/apache . EOF make # make test does not succeed even with older versions #make test %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/httpd/modules.d eval `perl '-V:installarchlib'` install -d %{buildroot}/$installarchlib %makeinstall_std %__os_install_post find %{buildroot}%{_prefix} -type f -print | sed "s@^%{buildroot}@@g" | grep -v perllocal.pod > %{module}-%{rver}-filelist bzcat %{SOURCE1} > %{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} rm -rf test/tmp/* rm -rf blib mkdir -p blib/arch pushd blib/arch eval `perl '-V:vendorarch'` ln -s ../../../../../..$vendorarch/auto/ . popd cd test #chmod 755 tmp find -type f|xargs perl -pi -e \ "s|$RPM_BUILD_DIR/embperl|%{_docdir}/%{name}-%{version}|g;" perl -pi -e 's/\015//;' conf/config.pl cd .. rm -f %{buildroot}$vendorarch/auto/Embperl/*.bs %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 MANIFEST READM* eg test.pl test *.pod TODO blib %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf} %attr(0755,root,root) %{_bindir}/* %{perl_vendorlib}/* %{_mandir}/*/* %{_var}/www/html/addon-modules/* %changelog * Mon Aug 15 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0.0-1mdk - 2.0.0 (Major feature enhancements) * Sun Aug 14 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0-0.rc5.1mdk - 2.0 rc5 * Thu Jun 02 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0-0.rc3.1mdk - 2.0 rc3 - 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_2.0-0.rc1.6mdk - remove broken perl version detection, rely on autodetection instead * Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0-0.rc1.5mdk - use the %%mkrel macro * Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0-0.rc1.4mdk - fix %%post and %%postun to prevent double restarts * Thu Feb 24 2005 Stefan van der Eijk <stefan@eijk.nu> 2.0.53_2.0-0.rc1.3mdk - fix bug #6574 * Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0-0.rc1.2mdk - spec file cleanups, remove the ADVX-build stuff * Wed Feb 09 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0-0.rc1.1mdk - built for apache 2.0.53 * Fri Jan 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_2.0-0.rc1.2mdk - rebuilt for latest mod_perl * Tue Nov 30 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_2.0-0.rc1.1mdk - rebuilt for perl-5.8.6 - fix version * Tue Sep 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_2.0rc1-1mdk - built for apache 2.0.52 * Thu Sep 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.51_2.0rc1-1mdk - built for apache 2.0.51 * Wed Aug 25 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0rc1-0.1mdk - 2.0rc1 * Mon Aug 02 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0b12-0.20040801.1mdk - use a recent snap (20040801) * Mon Aug 02 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0b11-1mdk - 2.0b11 - remove redundant provides - pull in the apr and apu headers where ever they may be * Wed Apr 07 2004 Michael Scherer <misc@mandrake.org> 2.0b9-0.20030308.8mdk - rebuild for new perl * Wed Jan 21 2004 Pixel <pixel@mandrakesoft.com> 2.0b9-0.20030308.7mdk - added epoch in versions - removed explicit lib dependencies * Wed Jan 21 2004 Pixel <pixel@mandrakesoft.com> 2.0b9-0.20030308.6mdk - rebuild for new perl * Thu Aug 14 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.0b9-0.20030308.5mdk - rebuild for new perl - use %%makeinstall_std macro * Tue Jul 29 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0b9-0.20030308.4mdk - rebuilt for apache v2.0.47 - fix buildrequires on perl-devel (oops!) * Sat May 31 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0b9-0.20030308.3mdk - rebuilt for apache v2.0.46 - buildprereq ADVX-build >= 9.2 - fix buildrequires - misc spec file fixes * Mon Mar 17 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.0b9-0.20030308.2mdk - fix description * Sat Mar 8 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.0b9-0.20030308.1mdk - initial contribs release