|
|
|
@ -1,15 +1,16 @@
|
|
|
|
|
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
|
|
|
|
|
%define pear_name PHP_CodeSniffer
|
|
|
|
|
%define rctag RC2
|
|
|
|
|
|
|
|
|
|
Name: php-pear-PHP-CodeSniffer
|
|
|
|
|
Version: 1.0.1
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Version: 1.1.0
|
|
|
|
|
Release: 0.1.%{rctag}%{?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
|
|
|
|
|
Source0: http://pear.php.net/get/PHP_CodeSniffer-%{version}%{rctag}.tgz
|
|
|
|
|
Source1: PHP_CodeSniffer-licence.txt
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
|
|
|
@ -38,17 +39,15 @@ 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}
|
|
|
|
|
mv package2.xml %{pear_name}-%{version}%{rctag}/%{pear_name}.xml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
cd %{pear_name}-%{version}
|
|
|
|
|
# Empty build section,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
cd %{pear_name}-%{version}
|
|
|
|
|
cd %{pear_name}-%{version}%{rctag}
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT docdir
|
|
|
|
|
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
|
|
|
|
|
|
|
|
|
@ -56,6 +55,11 @@ rm -rf $RPM_BUILD_ROOT docdir
|
|
|
|
|
mkdir -p docdir
|
|
|
|
|
mv $RPM_BUILD_ROOT%{pear_datadir}/%{pear_name}/*.sample.conf docdir/
|
|
|
|
|
|
|
|
|
|
# Remove phpcs-svn-pre-commit: we'll add it to docs
|
|
|
|
|
mv -f $RPM_BUILD_ROOT%{_bindir}/scripts/phpcs-svn-pre-commit .
|
|
|
|
|
chmod 0644 phpcs-svn-pre-commit
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_bindir}/scripts
|
|
|
|
|
|
|
|
|
|
cp %{SOURCE1} .
|
|
|
|
|
|
|
|
|
|
# Clean up unnecessary files
|
|
|
|
@ -83,8 +87,8 @@ fi
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc %{pear_name}-%{version}/PHP_CodeSniffer-licence.txt
|
|
|
|
|
%doc %{pear_name}-%{version}/docdir/*
|
|
|
|
|
%doc %{pear_name}-%{version}%{rctag}/PHP_CodeSniffer-licence.txt
|
|
|
|
|
%doc %{pear_name}-%{version}%{rctag}/docdir/*
|
|
|
|
|
%{pear_xmldir}/%{pear_name}.xml
|
|
|
|
|
%{pear_testdir}/%{pear_name}
|
|
|
|
|
%dir %{pear_phpdir}/PHP
|
|
|
|
@ -93,11 +97,15 @@ fi
|
|
|
|
|
|
|
|
|
|
%files -n phpcs
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc %{pear_name}-%{version}/PHP_CodeSniffer-licence.txt
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%doc %{pear_name}-%{version}%{rctag}/PHP_CodeSniffer-licence.txt
|
|
|
|
|
%doc %{pear_name}-%{version}%{rctag}/phpcs-svn-pre-commit
|
|
|
|
|
%{_bindir}/phpcs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Jun 30 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.1.0-0.1.RC2
|
|
|
|
|
- Upstream 1.1.0RC2
|
|
|
|
|
|
|
|
|
|
* Sun Feb 17 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.0.1-1
|
|
|
|
|
- Upstream 1.0.1
|
|
|
|
|
- Move sample config into docs
|
|
|
|
|