[php-when] Initial import

brummbq brummbq at fedoraproject.org
Sun Dec 16 13:32:15 UTC 2012


commit 3ca461f67cad483a05dbfe5b62e04b34bd018375
Author: Gregor Tätzner <gregor at freenet.de>
Date:   Sun Dec 16 14:31:16 2012 +0100

    Initial import

 .gitignore    |    1 +
 php-when.spec |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources       |    1 +
 3 files changed, 74 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c4fa89f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/When-0.3.tar.gz
diff --git a/php-when.spec b/php-when.spec
new file mode 100644
index 0000000..3bfd887
--- /dev/null
+++ b/php-when.spec
@@ -0,0 +1,72 @@
+Name:           php-when
+Version:        0.3
+Release:        2%{?dist}
+Summary:        Date/Calendar recursion library for PHP
+
+License:        MIT
+URL:            https://github.com/tplaner/When
+# Download from
+# https://github.com/tplaner/When/archive/v0.3.tar.gz
+Source0:        When-%{version}.tar.gz
+
+BuildArch:      noarch
+
+Requires:       php-date php-spl
+
+%description
+PHP library that handles recursive dates: It determines the next date of
+recursion given an iCalendar "rrule" like pattern.
+
+%package tests
+Summary:        Test files for %{name}
+
+Requires:       %{name} = %{version}-%{release}
+# phpunit tests
+Requires:       php-phpunit-PHPUnit
+BuildRequires:  php-phpunit-PHPUnit
+
+%description tests
+PHPUnit tests for %{name}.
+
+%prep
+%setup -q -n When-%{version}
+
+# remove deprecated include and set prefix
+sed -e '/Framework.php/d' \
+    -e '/When.php/s:./:when/:' \
+    -e '/When_Iterator.php/s:./:when/:' \
+    -i Tests/*php
+
+%build
+
+%install
+mkdir -p %{buildroot}%{_datadir}/php/when
+install -pm 644 When.php %{buildroot}%{_datadir}/php/when
+install -pm 644 When_Iterator.php %{buildroot}%{_datadir}/php/when
+
+mkdir -p %{buildroot}%{_datadir}/tests/%{name}
+install -pm 644 Tests/*.php %{buildroot}%{_datadir}/tests/%{name}/
+
+%check
+cd Tests
+phpunit -d include_path=%{buildroot}%{_datadir}/php:.:%{_datadir}/php:%{_datadir}/pear -d date.timezone=UTC .
+
+
+%files
+%doc README.md
+%{_datadir}/php/when
+
+
+%files tests
+%dir %{_datadir}/tests
+%{_datadir}/tests/%{name}
+
+
+%changelog
+* Sat Dec 15 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 0.3-2
+- enabled phpunit tests
+- moved tests to %%{_datadir}/tests/%%{name}
+
+* Tue Dec 11 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 0.3-1
+- Initial package
+
diff --git a/sources b/sources
index e69de29..101282b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2ee21dea85e85aa58b288ea0fefaf84c  When-0.3.tar.gz


More information about the scm-commits mailing list