Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > bae4536a6e9e98aa6ff85286ccc16059 > files > 4

apache-HTML-Embperl-2.2.0-2mdv2007.1.src.rpm

%define module HTML-Embperl
%define mod_conf 76_Embperl.conf

Summary:	Embperl is a framework for building web sites with Perl
Name:		apache-%{module}
Version:	2.2.0
Release:	%mkrel 2
License:	GPL
Group:		System/Servers
URL:		http://perl.apache.org/embperl/
Source0:	ftp://ftp.dev.ecos.de/pub/perl/embperl/Embperl-%{version}.tar.bz2
Source1:	%{mod_conf}
Patch0:		Embperl-2.09b-fix-CVS.patch
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(pre):	apache-conf >= 2.2.0
Requires(pre):	apache >= 2.2.0
Requires:	apache-mod_perl >= 1:2.0.2
BuildRequires:	apache >= 2.2.0
BuildRequires:	apache-devel >= 2.2.0
BuildRequires:	apache-modules >= 2.2.0
BuildRequires:	apache-mod_perl >= 1:2.0.2
BuildRequires:	apache-mod_perl-devel >= 1:2.0.2
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-%{version}

cp %{SOURCE1} %{mod_conf}

# 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

%patch0 -p1

perl -pi -e "s/\&lt;/\</;" 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-1-config --includes`"
export APU_HEADERS="`apu-1-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 OPTIMIZE="%{optflags} `apr-1-config --cppflags`" 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 LD_RUN_PATH=""

# one test fails atm
#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}-%{version}-filelist

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}

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
* Sun Mar 11 2007 Oden Eriksson <oeriksson@mandriva.com> 2.2.0-2mdv2007.1
+ Revision: 141325
- rebuild

* Thu Nov 09 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.0-1mdv2007.1
+ Revision: 79302
- Import apache-HTML-Embperl



* Mon Apr 10 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.0-1mdk
- Minor feature enhancements
- drop upstream patches; P1
- zero out LD_RUN_PATH to fix rpath

* Tue Jan 31 2006 Oden Eriksson <oeriksson@mandriva.com> 2.1.0-1mdk
- 2.1.0
- added P1 to make it build against apache-2.2.0
- fix versioning

* Mon Oct 03 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0.1-1mdk
- 2.0.1 (Minor bugfixes)
- run the test suite

* 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