|
|
|
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
|
|
|
|
%define pear_name PHP_CodeSniffer
|
|
|
|
|
|
|
|
Name: php-pear-PHP-CodeSniffer
|
|
|
|
Version: 0.6.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: PHP coding standards enforcement tool
|
|
|
|
|
|
|
|
Group: Development/Tools
|
|
|
|
License: BSD
|
|
|
|
URL: http://pear.php.net/package/PHP_CodeSniffer
|
|
|
|
Source0: http://pear.php.net/get/PHP_CodeSniffer-%{version}.tgz
|
|
|
|
Source1: PHP_CodeSniffer-licence.txt
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: php-pear >= 1:1.4.9-1.2
|
|
|
|
Requires: php-pear(PEAR), php-common > 5.1.0
|
|
|
|
Requires(post): %{__pear}
|
|
|
|
Requires(postun): %{__pear}
|
|
|
|
Provides: php-pear(%{pear_name}) = %{version}
|
|
|
|
|
|
|
|
%description
|
|
|
|
PHP_CodeSniffer provides functionality to verify that code conforms to
|
|
|
|
certain standards, such as PEAR, or user-defined.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n phpcs
|
|
|
|
Summary: Command-line utility for PHP-CodeSniffer
|
|
|
|
Group: Development/Tools
|
|
|
|
Requires: php-pear(%{pear_name}) = %{version}
|
|
|
|
Requires: php-cli
|
|
|
|
|
|
|
|
%description -n phpcs
|
|
|
|
This package includes a utility to run PHP_CodeSniffer from command line.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -c
|
|
|
|
[ -f package2.xml ] || mv package.xml package2.xml
|
|
|
|
mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
|
|
|
|
cd %{pear_name}-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
cd %{pear_name}-%{version}
|
|
|
|
rm -rf $RPM_BUILD_ROOT docdir
|
|
|
|
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
|
|
|
|
|
|
|
|
# Move documentation (none packaged so far)
|
|
|
|
# mkdir -p docdir
|
|
|
|
# mv $RPM_BUILD_ROOT%{pear_docdir}/* docdir
|
|
|
|
cp %{SOURCE1} .
|
|
|
|
|
|
|
|
# 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 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
|
|
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
%{__pear} install --nodeps --soft --force --register-only \
|
|
|
|
%{pear_xmldir}/%{pear_name}.xml >/dev/null || :
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
%{__pear} uninstall --nodeps --ignore-errors --register-only \
|
|
|
|
%{pear_name} >/dev/null || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc %{pear_name}-%{version}/PHP_CodeSniffer-licence.txt
|
|
|
|
%{pear_xmldir}/%{pear_name}.xml
|
|
|
|
%{pear_testdir}/%{pear_name}
|
|
|
|
%dir %{pear_phpdir}/PHP
|
|
|
|
%{pear_phpdir}/PHP/*
|
|
|
|
|
|
|
|
%files -n phpcs
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc %{pear_name}-%{version}/PHP_CodeSniffer-licence.txt
|
|
|
|
%{_bindir}/*
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
* Mon Jun 11 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6.0-1
|
|
|
|
- Upstream 0.6.0
|
|
|
|
- Fix owner on phpcs
|
|
|
|
|
|
|
|
* Tue Apr 17 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.5.0-1
|
|
|
|
- Upstream 0.5.0
|
|
|
|
|
|
|
|
* Tue Feb 20 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.4.0-1
|
|
|
|
- Upstream 0.4.0
|
|
|
|
|
|
|
|
* Mon Jan 29 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.3.0-1
|
|
|
|
- Rename to php-pear-PHP-CodeSniffer
|
|
|
|
- Own all dirs we create
|
|
|
|
- Require php-common > 5.1.0
|
|
|
|
|
|
|
|
* Mon Jan 29 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.3.0-1
|
|
|
|
- Split phpcs into a separate package (so we don't require php-cli)
|
|
|
|
|
|
|
|
* Fri Jan 12 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.3.0-0.1
|
|
|
|
- Upstream 0.3.0
|
|
|
|
|
|
|
|
* Mon Oct 23 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.2.0-0.1
|
|
|
|
- Upstream 0.2.0
|
|
|
|
|
|
|
|
* Mon Sep 25 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.1.1-0.1
|
|
|
|
- Upstream update.
|
|
|
|
|
|
|
|
* Fri Sep 22 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.1.0-0.1
|
|
|
|
- Initial packaging.
|