From 5627ef21dc9738281fac89a3dcad07b6f56701cc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 30 Apr 2014 15:02:11 +0200 Subject: php-phpunit-git: sources from github --- php-phpunit-git.spec | 70 ++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/php-phpunit-git.spec b/php-phpunit-git.spec index 6068221..babdb80 100644 --- a/php-phpunit-git.spec +++ b/php-phpunit-git.spec @@ -6,39 +6,40 @@ # # Please, preserve the changelog entries # -%{!?pear_metadir: %global pear_metadir %{pear_phpdir}} -%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} +%global gh_commit a99fbc102e982c1404041ef3e4d431562b29bcba +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner sebastianbergmann +%global gh_project git +%global php_home %{_datadir}/php/SebastianBergmann %global pear_name Git %global pear_channel pear.phpunit.de +%global with_tests %{?_without_tests:1}%{!?_without_tests:0} Name: php-phpunit-git Version: 1.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Simple wrapper for Git Group: Development/Libraries License: BSD -URL: https://github.com/sebastianbergmann/git -Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz +URL: https://github.com/%{gh_owner}/%{gh_project} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3.3 -BuildRequires: php-pear(PEAR) >= 1.9.4 -BuildRequires: php-channel(%{pear_channel}) -Requires(post): %{__pear} -Requires(postun): %{__pear} Requires: git +# From composer.json Requires: php(language) >= 5.3.3 +# From phpcompatinfo report for 1.2.0 Requires: php-spl -Requires: php-pear(PEAR) >= 1.9.4 -Requires: php-channel(%{pear_channel}) +# For compatibility with pear mode Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} # Package have be renamed Obsoletes: php-phpunit-Git < 1.2.0-3 -Provides: php-phpunit-Git = %{name}-%{version} +Provides: php-phpunit-Git = %{version}-%{release} %description @@ -46,27 +47,20 @@ Simple PHP wrapper for Git. %prep -%setup -q -c -cd %{pear_name}-%{version} -mv ../package.xml %{name}.xml +%setup -q -n %{gh_project}-%{gh_commit} %build -cd %{pear_name}-%{version} -# Empty build section, most likely nothing required. +# If upstream drop autoload +#phpab \ +# --output src/autoload.php \ +# src %install -rm -rf %{buildroot} -cd %{pear_name}-%{version} -%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml - -# Clean up unnecessary files -rm -rf %{buildroot}%{pear_metadir}/.??* - -# Install XML package description -mkdir -p %{buildroot}%{pear_xmldir} -install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} +rm -rf %{buildroot} +mkdir -p %{buildroot}%{php_home} +cp -pr src %{buildroot}%{php_home}/%{pear_name} %clean @@ -74,25 +68,25 @@ rm -rf %{buildroot} %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 \ - %{pear_channel}/%{pear_name} >/dev/null || : +if [ -x %{_bindir}/pear ]; then + %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \ + %{pear_channel}/%{pear_name} >/dev/null || : fi %files %defattr(-,root,root,-) -%doc %{pear_docdir}/%{pear_name} -%{pear_xmldir}/%{name}.xml -%dir %{pear_phpdir}/SebastianBergmann -%{pear_phpdir}/SebastianBergmann/%{pear_name} +%doc LICENSE +%doc README.md +%dir %{php_home} + %{php_home}/%{pear_name} %changelog +* Wed Apr 30 2014 Remi Collet - 1.2.0-5 +- sources from github +- cleanup pear registry + * Sun Oct 20 2013 Remi Collet - 1.2.0-4 - properly obsoletes old name -- cgit