diff --git a/.cvsignore b/.cvsignore index e69de29..7da28fa 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +PHP_Depend-0.9.9.tgz diff --git a/import.log b/import.log new file mode 100644 index 0000000..5505f59 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +php-pdepend-PHP-Depend-0_9_9-2_fc12:HEAD:php-pdepend-PHP-Depend-0.9.9-2.fc12.src.rpm:1264969105 diff --git a/php-pdepend-PHP-Depend.spec b/php-pdepend-PHP-Depend.spec new file mode 100644 index 0000000..79d6309 --- /dev/null +++ b/php-pdepend-PHP-Depend.spec @@ -0,0 +1,96 @@ +%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} +%define pear_name PHP_Depend +%define channel pear.pdepend.org + +Name: php-pdepend-PHP-Depend +Version: 0.9.9 +Release: 2%{?dist} +Summary: PHP_Depend design quality metrics for PHP package + +Group: Development/Libraries +License: BSD +URL: http://www.pdepend.org/ +Source0: http://pear.pdepend.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.2 +Requires: php-xml +Requires: php-pecl(imagick) >= 2.2.0b2 +Requires(post): %{__pear} +Requires(postun): %{__pear} + +Provides: php-pear(%{channel}/%{pear_name}) = %{version} + + +%description +PHP_Depend is an adaption of the Java design quality metrics software JDepend +and the NDepend metric tool. + +%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 $RPM_BUILD_ROOT%{pear_phpdir}/.??* + +# 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 +%{_bindir}/pdepend +%{pear_testdir}/%{pear_name} + +# +# the tests currently don't work because of a missing _run directory. If you +# you would like to run them you have to copy them to a writeable directory +# and create the PHP_Depend/tests/PHP/Depend/_run directory +# + +%changelog +* Tue Jan 26 2010 Christof Damian 0.9.9-2 +- require pecl imagick, which is an optional requirement +- require php-xml for dom +- change postun to use channel macro for consistency +- own /usr/share/pear/PHP +- include test files (which currently don't work) + +* Fri Jan 1 2010 Christof Damian 0.9.9-1 +- initial release diff --git a/sources b/sources index e69de29..6436f99 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d1e686b555f62f39cfce830a40d5d675 PHP_Depend-0.9.9.tgz