|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
|
|
|
|
|
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
|
|
|
|
|
%global pear_name PHP_CodeSniffer
|
|
|
|
|
%global pear_version 1.4.0
|
|
|
|
|
%global pear_version 1.4.3
|
|
|
|
|
|
|
|
|
|
Name: php-pear-PHP-CodeSniffer
|
|
|
|
|
Version: %{pear_version}
|
|
|
|
@ -46,14 +47,10 @@ echo "date.timezone=UTC" >>php.ini
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
cd %{pear_name}-%{pear_version}
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT docdir
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
PHPRC=./php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
|
|
|
|
|
|
|
|
|
|
# Move documentation
|
|
|
|
|
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
|
|
|
|
@ -62,7 +59,7 @@ rm -rf $RPM_BUILD_ROOT%{_bindir}/scripts
|
|
|
|
|
cp %{SOURCE1} .
|
|
|
|
|
|
|
|
|
|
# Clean up unnecessary files
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
|
|
|
|
|
rm -rf %{buildroot}/%{pear_metadir}/.??*
|
|
|
|
|
|
|
|
|
|
# Install XML package description
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
|
|
|
|
@ -87,14 +84,16 @@ fi
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc %{pear_name}-%{pear_version}/PHP_CodeSniffer-licence.txt
|
|
|
|
|
%doc %{pear_name}-%{pear_version}/phpcs-svn-pre-commit
|
|
|
|
|
%doc %{pear_name}-%{pear_version}/docdir/*
|
|
|
|
|
%{pear_xmldir}/%{pear_name}.xml
|
|
|
|
|
%{pear_testdir}/%{pear_name}
|
|
|
|
|
%{pear_datadir}/%{pear_name}
|
|
|
|
|
%{pear_phpdir}/PHP
|
|
|
|
|
%{_bindir}/phpcs
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sat Jan 12 2013 Christof Damian <christof@damian.net> - 1.4.3-1
|
|
|
|
|
- upstream 1.4.3
|
|
|
|
|
- use php_metadir
|
|
|
|
|
|
|
|
|
|
* Fri Oct 12 2012 Christof Damian <christof@damian.net> - 1.4.0-1
|
|
|
|
|
- upstream 1.4.0
|
|
|
|
|
|
|
|
|
|