[php-phpunit-Text-Template] initial import

Remi Collet remi at fedoraproject.org
Fri Nov 5 18:05:30 UTC 2010


commit 9f7e0a774ed59b19b87d2b1950a819a684a06f28
Author: remi <fedora at famillecollet.com>
Date:   Fri Nov 5 19:03:44 2010 +0100

    initial import

 .gitignore                     |    2 +
 README.markdown                |   23 +++++++++++
 php-phpunit-Text-Template.spec |   86 ++++++++++++++++++++++++++++++++++++++++
 sources                        |    1 +
 4 files changed, 112 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..81d5aaa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/Text_Template-1.0.0.tgz
+package.xml
diff --git a/README.markdown b/README.markdown
new file mode 100644
index 0000000..0d60da9
--- /dev/null
+++ b/README.markdown
@@ -0,0 +1,23 @@
+Text_Template
+=============
+
+Installation
+------------
+
+Text_Template should be installed using the [PEAR Installer](http://pear.php.net/). This installer is the backbone of PEAR, which provides a distribution system for PHP packages, and is shipped with every release of PHP since version 4.3.0.
+
+The PEAR channel (`pear.phpunit.de`) that is used to distribute Text_Template needs to be registered with the local PEAR environment:
+
+    sb at ubuntu ~ % pear channel-discover pear.phpunit.de
+    Adding Channel "pear.phpunit.de" succeeded
+    Discovery of channel "pear.phpunit.de" succeeded
+
+This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel:
+
+    sb at vmware ~ % pear install phpunit/Text_Template
+    downloading Text_Template-1.0.0.tgz ...
+    Starting to download Text_Template-1.0.0.tgz (2,493 bytes)
+    ....done: 2,493 bytes
+    install ok: channel://pear.phpunit.de/Text_Template-1.0.0
+
+After the installation you can find the Text_Template source files inside your local PEAR directory; the path is usually `/usr/lib/php/Text`.
diff --git a/php-phpunit-Text-Template.spec b/php-phpunit-Text-Template.spec
new file mode 100644
index 0000000..148e3e0
--- /dev/null
+++ b/php-phpunit-Text-Template.spec
@@ -0,0 +1,86 @@
+%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%global pear_name Text_Template
+%global channel pear.phpunit.de
+
+Name:           php-phpunit-Text-Template
+Version:        1.0.0
+Release:        1%{?dist}
+Summary:        Simple template engine
+
+Group:          Development/Libraries
+License:        BSD
+URL:            http://pear.phpunit.de/
+Source0:        http://pear.phpunit.de/get/%{pear_name}-%{version}.tgz
+Source1:        http://github.com/sebastianbergmann/php-text-template/raw/master/README.markdown
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+BuildRequires:  php-pear(PEAR) >= 1.8.1
+BuildRequires:  php-channel(%{channel})
+
+Requires(post): %{__pear}
+Requires(postun): %{__pear}
+Requires:       php-channel(%{channel})
+Requires:       php-common >= 5.1.4
+
+Provides:       php-pear(%{channel}/%{pear_name}) = %{version}
+
+%description
+Simple template engine.
+
+%prep
+%setup -q -c
+# Create a "localized" php.ini to avoid build warning
+cp /etc/php.ini .
+echo "date.timezone=UTC" >>php.ini
+
+cp %{SOURCE1} README.markdown
+
+cd %{pear_name}-%{version}
+# package.xml is V2
+mv ../package.xml %{name}.xml
+
+
+%build
+cd %{pear_name}-%{version}
+# Empty build section, most likely nothing required.
+
+
+%install
+cd %{pear_name}-%{version}
+rm -rf $RPM_BUILD_ROOT docdir
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+
+# 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 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%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
+
+
+%files
+%defattr(-,root,root,-)
+%doc README.markdown
+%{pear_xmldir}/%{name}.xml
+%{pear_phpdir}/Text
+
+%changelog
+* Sun Sep 26 2010 Remi Collet <Fedora at famillecollet.com> - 1.0.0-1
+- initial generated spec + clean
+
diff --git a/sources b/sources
index e69de29..7cfdffb 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+de7b8f04dce1bf5bf404594c843f539a  Text_Template-1.0.0.tgz


More information about the scm-commits mailing list