Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 47689adde66a7c314509226275c8923d > files > 8

eclipse-phpeclipse-1.2.0-0.2.svn1573.1mdv2009.0.src.rpm

%define eclipse_base     %{_libdir}/eclipse
%define install_loc      %{_datadir}/eclipse/dropins
%define gcj_support      0

Name:		eclipse-phpeclipse
Version:	1.2.0
Release:	%mkrel 0.2.svn1573.1
Summary:	PHP Eclipse plugin

Group:		Development/PHP
License:	CPL
URL:		http://phpeclipse.net/

# source tarball and the script used to generate it from upstream's source control
# script usage:
# $ sh get-phpeclipse.sh
Source0:   phpeclipse-%{version}.tar.gz
Source1:   get-phpeclipse.sh

Patch0:    %{name}-broken-help-links.patch
Patch1:    %{name}-fix-build-props.patch
Patch2:    %{name}-httpd-integration.patch
Patch3:    %{name}-no-htmlparser.patch
Patch4:    %{name}-rm-win32-help.patch
Patch5:    %{name}-external-parser.patch
Patch6:    %{name}-external-preview.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  eclipse-pde
BuildRequires:  java-rpmbuild
BuildRequires:  zip
BuildRequires:  tomcat5-jsp-2.0-api
%if %{gcj_support}
BuildRequires:		gcc-java >= 0:4.0.2
BuildRequires:		java-gcj-compat-devel >= 0:1.0.33
%else
BuildRequires:		java-devel >= 0:1.4.2
%endif

%if %{gcj_support}
ExclusiveArch:		%{ix86} x86_64 ppc ia64
%else
#BuildArch:		noarch
%endif

Requires:		eclipse-platform >= 1:3.2.1
Requires:		eclipse-pde-runtime
Requires: 		php
Requires:		apache

%description
PHPEclipse is an open source PHP IDE based on the Eclipse platform. Features
supported include syntax highlighting, content assist, PHP manual integration,
templates and support for the XDebug and DBG debuggers.

%prep
%setup -q -n phpeclipse-%{version}

# apply patches
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0

# ditch bundled libs in favor of building against fedora packaged libs
rm net.sourceforge.phpeclipse.phpmanual.htmlparser/sax2.jar \
   net.sourceforge.phpeclipse.phpmanual.htmlparser/htmllexer.jar \
   net.sourceforge.phpeclipse.phpmanual.htmlparser/filterbuilder.jar \
   net.sourceforge.phpeclipse.phpmanual.htmlparser/thumbelina.jar \
   net.sourceforge.phpeclipse.phpmanual.htmlparser/junit.jar \
   net.sourceforge.phpeclipse.phpmanual.htmlparser/htmlparser.jar
build-jar-repository -s -p net.sourceforge.phpeclipse.phpmanual.htmlparser xml-commons-apis

# this is done in a patch instead
#grep -lR sax2 * | xargs sed --in-place "s/sax2/xml-commons-apis/"

# fix jar versions
find -name MANIFEST.MF | xargs sed --in-place "s/0.0.0/%{version}/"

# make sure upstream hasn't sneaked in any jars we don't know about
JARS=""
for j in `find -name "*.jar"`; do
  if [ ! -L $j ]; then
    JARS="$JARS $j"
  fi
done
if [ ! -z "$JARS" ]; then
   echo "These jars should be deleted and symlinked to system jars: $JARS"
   exit 1
fi

%build
mkdir home
homedir=$(cd home > /dev/null & pwd)
# build the main feature
%{eclipse_base}/buildscripts/pdebuild -a -Duser.home=$homedir -D -f net.sourceforge.phpeclipse.feature

# build the debug features
%{eclipse_base}/buildscripts/pdebuild -a -Duser.home=$homedir -f net.sourceforge.phpeclipse.debug.feature
%{eclipse_base}/buildscripts/pdebuild -a -Duser.home=$homedir -f net.sourceforge.phpeclipse.xdebug.feature

%install
rm -rf %{buildroot}
install -d -m 755 %{buildroot}%{eclipse_base}
install -d -m 755 %{buildroot}%{install_loc}
install -d -m 755 %{buildroot}%{install_loc}/phpeclipse
install -d -m 755 %{buildroot}%{install_loc}/phpeclipse-debug
install -d -m 755 %{buildroot}%{install_loc}/phpeclipse-xdebug
unzip -q -d %{buildroot}%{install_loc}/phpeclipse build/rpmBuild/net.sourceforge.phpeclipse.feature.zip
unzip -q -d %{buildroot}%{install_loc}/phpeclipse-debug build/rpmBuild/net.sourceforge.phpeclipse.debug.feature.zip
unzip -q -d %{buildroot}%{install_loc}/phpeclipse-xdebug build/rpmBuild/net.sourceforge.phpeclipse.xdebug.feature.zip

# need to recreate the symlinks to libraries that were setup in "prep"
# because for some reason the ant copy task doesn't preserve them
pushd %{buildroot}%{install_loc}/phpeclipse/eclipse/plugins/net.sourceforge.phpeclipse.phpmanual.htmlparser_*
rm *.jar
build-jar-repository -s -p . xml-commons-apis
popd

%{gcj_compile}

%clean
rm -rf $RPM_BUILD_ROOT

%if %{gcj_support}
%post
%{update_gcjdb}

%postun
%{clean_gcjdb}
%endif

%files
%defattr(-,root,root,-)
# main feature
%{install_loc}/phpeclipse/*

# debug features
%{install_loc}/phpeclipse-debug/*
%{install_loc}/phpeclipse-xdebug/*
%{gcj_files}




%changelog
* Fri Sep 12 2008 Alexander Kurtakov <akurtakov@mandriva.org> 1.2.0-0.2.svn1573.1mdv2009.0
+ Revision: 284156
- install to dropins
- use separate user.home
- BR tomcat5-jsp-2.0-api
- enable debug output
- not noarch
- BR zip
- new version 1.2.0

  + Thierry Vignaud <tvignaud@mandriva.com>
    - rebuild early 2009.0 package (before pixel changes)

* Wed May 14 2008 Alexander Kurtakov <akurtakov@mandriva.org> 1.1.8-16.4.3mdv2009.0
+ Revision: 207105
- move to development/php group

* Tue Mar 11 2008 Alexander Kurtakov <akurtakov@mandriva.org> 1.1.8-16.4.2mdv2008.1
+ Revision: 185242
- build requires java-rpmbuild

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

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Sat Sep 15 2007 Anssi Hannula <anssi@mandriva.org> 1.1.8-16.4.2mdv2008.0
+ Revision: 87365
- rebuild to filter out autorequires of GCJ AOT objects
- remove unnecessary Requires(post) on java-gcj-compat

* Thu Aug 09 2007 David Walluck <walluck@mandriva.org> 1.1.8-16.4.1mdv2008.0
+ Revision: 60687
- rebuild for eclipse 3.3


* Fri Mar 16 2007 David Walluck <walluck@mandriva.org> 1.1.8-16.4mdv2007.1
+ Revision: 144706
- fix httpd integration

* Wed Mar 14 2007 David Walluck <walluck@mandriva.org> 1.1.8-16.3mdv2007.1
+ Revision: 143732
- really fix apache requires

* Tue Mar 13 2007 David Walluck <walluck@mandriva.org> 1.1.8-16.2mdv2007.1
+ Revision: 143267
- fix httpd (apache2) requirement

* Sun Mar 11 2007 David Walluck <walluck@mandriva.org> 1.1.8-16.1mdv2007.1
+ Revision: 141428
- rebuild

* Wed Jan 03 2007 David Walluck <walluck@mandriva.org> 0:1.1.8-15.2mdv2007.1
+ Revision: 103506
- fix apache requires

* Wed Jan 03 2007 David Walluck <walluck@mandriva.org> 0:1.1.8-15.1mdv2007.1
+ Revision: 103490
- remove version requirement from eclipse-platform

* Tue Jan 02 2007 David Walluck <walluck@mandriva.org> 0:1.1.8-15mdv2007.1
+ Revision: 103419
- Import eclipse-phpeclipse

* Mon Jan 02 2006 David Walluck <walluck@mandriva.org> 0:1.1.8-15mdv2007.1
- Own gcj/eclipse-phpeclipse/