Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 0ec7dcc6b517bdf1d74fa00d8449f337 > files > 2

php-phpmd-PHP-PMD-1.4.1-1.fc18.src.rpm

%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
%global pear_name PHP_PMD
%global channel pear.phpmd.org

Name:           php-phpmd-PHP-PMD
Version:        1.4.1
Release:        1%{?dist}
Summary:        PHPMD - PHP Mess Detector

Group:          Development/Libraries
License:        BSD
URL:            http://www.phpmd.org/
Source0:        http://pear.phpmd.org/get/%{pear_name}-%{version}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  php-pear >= 1:1.6.0
BuildRequires:  php-channel(%{channel})
Requires:       php-channel(%{channel})
Requires:       php-common >= 5.2.3
Requires:       php-xml
Requires:       php-pear(pear.pdepend.org/PHP_Depend) >= 1.0.3
Requires(post): %{__pear}
Requires(postun): %{__pear}

Provides:       php-pear(%{channel}/%{pear_name}) = %{version}


%description
This is the project site of PHPMD. It is a spin-off project of PHP Depend 
and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can 
be seen as an user friendly front-end application for the raw metrics 
stream measured by PHP Depend.

%prep
%setup -q -c
[ -f package2.xml ] || mv package.xml package2.xml
%{__mv} package2.xml %{pear_name}-%{version}/%{name}.xml
cd %{pear_name}-%{version}


%build
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.


%install
cd %{pear_name}-%{version}
%{__rm} -rf $RPM_BUILD_ROOT docdir
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml

# Clean up unnecessary files
%{__rm} -rf %{buildroot}/%{pear_metadir}/.??* 

# Install XML package description
%{__mkdir} -p $RPM_BUILD_ROOT%{pear_xmldir}
%{__install} -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}


%clean
%{__rm} -rf $RPM_BUILD_ROOT


%post
%{__pear} install --nodeps --soft --force --register-only \
  %{pear_xmldir}/%{name}.xml >/dev/null || :


%postun
if [ $1 -eq 0 ] ; then
  %{__pear} uninstall --nodeps --ignore-errors --register-only \
    %{channel}/%{pear_name} >/dev/null || :
fi


%files
%defattr(-,root,root,-)
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/PHP/PMD.php
%{pear_phpdir}/PHP/PMD
%{pear_datadir}/PHP_PMD
%{_bindir}/phpmd
%doc %{pear_docdir}/%{pear_name}

%changelog
* Sat Jan 12 2013 Christof Damian <christof@damian.net> - 1.4.1-1
- upstream 1.4.1
- add metadir support

* Sat Sep  8 2012 Christof Damian <christof@damian.net> - 1.4.0-1
- upstream 1.4.0

* Sun Aug 19 2012 Remi Collet <remi@fedoraproject.org> - 1.3.3-3
- rebuilt for new pear_datadir

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Mar  2 2012 Christof Damian <christof@damian.net> - 1.3.3-1
- upstream 1.3.3

* Thu Feb  9 2012 Christof Damian <christof@damian.net> - 1.3.0-1
- upstream 1.3.0

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Oct 28 2011 Christof Damian <christof@damian.net> - 1.2.0-1
- upstream 1.2.0

* Fri Jul 15 2011 Christof Damian <christof@damian.net> - 1.1.1-1
- upstream 1.1.1

* Thu Mar 24 2011 Christof Damian <christof@damian.net> - 1.1.0-1
- upstream 1.1.0

* Tue Feb 15 2011 Christof Damian <christof@damian.net> - 1.0.1-1
- upstream 1.0.1 - bugfixes

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Feb  6 2011 Christof Damian <christof@damian.net> - 1.0.0-1
- upstream stable release 1.0.0

* Sat Oct  2 2010 Christof Damian <christof@damian.net> - 0.2.7-1
- new upstream

* Sun Jul  4 2010 Christof Damian <christof@damian.net> - 0.2.6-1
- upstream 0.2.6

* Sun Apr  4 2010 Christof Damian <christof@damian.net> - 0.2.5-1
- upsteam 0.2.5: bugfixes

* Tue Mar  9 2010 Christof Damian <christof@damian.net> - 0.2.4-1
- upstream 0.2.4 : Small bugfix release which closes an E_NOTICE issue introduced with release 0.2.3

* Thu Mar  4 2010 Christof Damian <christof@damian.net> - 0.2.3-1
- upstream 0.2.3
- increased php and pdepend requirements 

* Sun Jan 31 2010 Christof Damian <christof@damian.net> - 0.2.2-2
- use pear_datadir in filesection

* Sat Jan 30 2010 Christof Damian <christof@damian.net> 0.2.2-1
- upstream 0.2.2
- changed define to global
- moved docs to /usr/share/doc
- use channel macro in postun

* Tue Jan 12 2010 Christof Damian <christof@damian.net> - 0.2.1-1
- upstream 0.2.1

* Fri Jan 1 2010 Christof Damian <christof@damian.net> 0.2.0-1
- initial release