[php-phpunit-Text-Template/epel7] sources from github

Remi Collet remi at fedoraproject.org
Tue Apr 29 08:45:25 UTC 2014


commit 40f080e208403db9e56d72f1750fff140df095ee
Author: Remi Collet <remi at fedoraproject.org>
Date:   Tue Apr 29 10:36:48 2014 +0200

    sources from github
    
    (cherry picked from commit b2e1dd9ed2288f8496ad05634bcb1236c389b524)

 .gitignore                     |    1 +
 php-phpunit-Text-Template.spec |   74 +++++++++++++++++----------------------
 sources                        |    2 +-
 3 files changed, 34 insertions(+), 43 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 441c6f3..03839a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ package*xml
 /Text_Template-1.1.3.tgz
 /Text_Template-1.1.4.tgz
 /Text_Template-1.2.0.tgz
+/php-text-template-1.2.0.tar.gz
diff --git a/php-phpunit-Text-Template.spec b/php-phpunit-Text-Template.spec
index 1831da8..879bdc3 100644
--- a/php-phpunit-Text-Template.spec
+++ b/php-phpunit-Text-Template.spec
@@ -6,82 +6,72 @@
 #
 # Please, preserve the changelog entries
 #
-%{!?__pear:       %global __pear       %{_bindir}/pear}
-%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%global pear_name Text_Template
-%global channel pear.phpunit.de
+%global gh_commit    206dfefc0ffe9cebf65c413e3d0e809c82fbf00a
+%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner     sebastianbergmann
+%global gh_project   php-text-template
+%global php_home     %{_datadir}/php
+%global pear_name    Text_Template
+%global pear_channel pear.phpunit.de
+# Circular dependency with phpunit
+%global with_tests   %{?_with_tests:1}%{!?_with_tests:0}
 
 Name:           php-phpunit-Text-Template
 Version:        1.2.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Simple template engine
 
 Group:          Development/Libraries
 License:        BSD
-URL:            https://github.com/sebastianbergmann/php-text-template
-Source0:        http://pear.phpunit.de/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
 
 BuildArch:      noarch
 BuildRequires:  php(language) >= 5.3.3
-BuildRequires:  php-pear(PEAR) >= 1.9.4
-BuildRequires:  php-channel(%{channel})
 
-Requires(post): %{__pear}
-Requires(postun): %{__pear}
-# From package.xml
+# From composer.json
 Requires:       php(language) >= 5.3.3
-Requires:       php-pear(PEAR) >= 1.9.4
-Requires:       php-channel(%{channel})
 # From phpcompatinfo report for version 1.2.0
 Requires:       php-spl
 
-Provides:       php-pear(%{channel}/%{pear_name}) = %{version}
+# For compatibility with PEAR mode
+Provides:       php-pear(%{pear_channel}/%{pear_name}) = %{version}
+
 
 %description
 Simple template engine.
 
 
 %prep
-%setup -q -c
-cd %{pear_name}-%{version}
-# package.xml is V2
-mv ../package.xml %{name}.xml
+%setup -q -n %{gh_project}-%{gh_commit}
+
+rm Text/Template/Autoload.php.in
 
 
 %build
-cd %{pear_name}-%{version}
 # Empty build section, most likely nothing required.
 
+# If upstream drop Autoload.php, command to generate it
+#phpab \
+#  --output   Text/Template/Autoload.php \
+#  --template Text/Template/Autoload.php.in \
+#  Text
 
-%install
-cd %{pear_name}-%{version}
-%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
-
-# Clean up unnecessary files
-rm -rf %{buildroot}%{pear_metadir}/.??*
-
-# Install XML package description
-install -Dpm 644 %{name}.xml %{buildroot}%{pear_xmldir}/%{name}.xml
 
-
-%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
+%install
+mkdir -p    %{buildroot}%{php_home}
+cp -pr Text %{buildroot}%{php_home}
 
 
 %files
-%doc %{pear_docdir}/%{pear_name}
-%{pear_xmldir}/%{name}.xml
-%{pear_phpdir}/Text
+%doc ChangeLog.md README.md LICENSE composer.json
+%{php_home}/*
 
 
 %changelog
+* Tue Apr 29 2014 Remi Collet <remi at fedoraproject.org> - 1.2.0-2
+- sources from github
+
 * Thu Jan 30 2014 Remi Collet <remi at fedoraproject.org> - 1.2.0-1
 - Update to 1.2.0
 
diff --git a/sources b/sources
index 2fab0fb..fb517cc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-481577612222928eca4c80cd696be41a  Text_Template-1.2.0.tgz
+f7130225cf176699afed181a2d4d273e  php-text-template-1.2.0.tar.gz


More information about the scm-commits mailing list