[php-irodsphp] initial import (#1047478)

Adam Williamson adamwill at fedoraproject.org
Thu Jan 9 21:32:14 UTC 2014


commit 69c93a5954897f6e9629a4f1fa584df7c7ba3653
Author: Adam Williamson <awilliam at redhat.com>
Date:   Thu Jan 9 13:32:09 2014 -0800

    initial import (#1047478)

 .gitignore                          |    1 +
 php-irodsphp-3.3.0-configpath.patch |   18 ++++++++
 php-irodsphp.spec                   |   78 +++++++++++++++++++++++++++++++++++
 sources                             |    1 +
 4 files changed, 98 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..76c6de9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/php-3.3.0-beta1.zip
diff --git a/php-irodsphp-3.3.0-configpath.patch b/php-irodsphp-3.3.0-configpath.patch
new file mode 100644
index 0000000..d815f33
--- /dev/null
+++ b/php-irodsphp-3.3.0-configpath.patch
@@ -0,0 +1,18 @@
+--- irods/prods/src/ProdsConfig.inc.php	2014-01-04 15:06:19.850730474 -0800
++++ irods/prods/src/ProdsConfig.inc.php.new	2014-01-04 15:07:29.058508522 -0800
+@@ -9,11 +9,11 @@
+ 
+ /**#@-*/
+ 
+-if (file_exists(__DIR__ . "/prods.ini")) {
+-  $GLOBALS['PRODS_CONFIG'] = parse_ini_file(__DIR__ . "/prods.ini", true);
++if (file_exists("/etc/php-irodsphp/prods.ini")) {
++  $GLOBALS['PRODS_CONFIG'] = parse_ini_file("/etc/php-irodsphp/prods.ini", true);
+ }
+ else {
+   $GLOBALS['PRODS_CONFIG'] = array();
+ }
+   
+-?>
+\ No newline at end of file
++?>
diff --git a/php-irodsphp.spec b/php-irodsphp.spec
new file mode 100644
index 0000000..097a31f
--- /dev/null
+++ b/php-irodsphp.spec
@@ -0,0 +1,78 @@
+%global packagename irodsphp
+
+Name:      php-%{packagename}
+Version:   3.3.0
+Release:   0.3.beta1%{?dist}
+Summary:   PHP client API for iRODS
+
+Group:     Development/Libraries
+License:   BSD
+URL:       https://code.renci.org/gf/project/irodsphp/
+Source0:   https://code.renci.org/gf/download/frsrelease/167/1674/php-%{version}-beta1.zip
+Patch0:    php-irodsphp-3.3.0-configpath.patch
+
+BuildArch: noarch
+
+Requires:  php(language) >= 5.1.2
+# phpcompatinfo (computed from v3.3.0-beta1)
+Requires:  php-date
+Requires:  php-dom
+Requires:  php-simplexml
+Requires:  php-libxml
+Requires:  php-pcre
+Requires:  php-spl
+
+# Gratefully borrowed from Debian
+%description
+PRODS is a PHP client API for iRODS (http://www.irods.org). It talks to
+an iRODS server directly via sockets with a native iRODS XML protocol.
+
+%prep
+%setup -q -c %{name}
+# wrong-file-end-of-line-encoding just about everywhere
+find -name \*.php | xargs sed -i 's/\r$//'
+find -name \*.txt | xargs sed -i 's/\r$//'
+find -name \*.ini | xargs sed -i 's/\r$//'
+# strip a stray source control dir and docbook source file
+rm -rf prods/tutorials/Prods/.svn
+rm -f prods/tutorials/Prods/Prods.pkg
+%patch0 -p1 -b .configpath
+
+%build
+# no build required
+
+%install
+# For now, just installing the key bit of prods. If anyone sees value
+# in packaging the tests or the webapp...I'm not stopping you.
+
+mkdir -p %{buildroot}%{_datadir}/php/%{packagename}/prods
+mkdir -p %{buildroot}%{_sysconfdir}/%{name}
+cp -pr prods/src %{buildroot}%{_datadir}/php/%{packagename}/prods
+mv %{buildroot}%{_datadir}/php/%{packagename}/prods/src/prods.ini %{buildroot}%{_sysconfdir}/%{name}
+rm -f %{buildroot}%{_datadir}/php/%{packagename}/prods/src/LICENSE.txt %{buildroot}%{_datadir}/php/%{packagename}/prods/src/release_notes.txt
+
+%check
+# Needs a reference iRODS instance to test sensibly, which we don't
+# have
+
+%files
+%doc prods/src/LICENSE.txt prods/release_notes.txt prods/tutorials prods/utilities
+%{_datadir}/php/%{packagename}
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}/prods.ini
+
+%changelog
+* Sat Jan  4 2014 Adam Williamson <awilliam at redhat.com> - 3.3.0-0.3.beta1
+- fix up the requires per review
+- drop the complex naming and just call it php-irodsphp
+- make the naming and paths a bit more consistent
+
+* Sat Jan  4 2014 Adam Williamson <awilliam at redhat.com> - 3.3.0-0.2.beta1
+- package tutorials and utilities as docs
+- relocate configuration file to /etc/irods-prods/prods.ini
+- fix line endings with sed, in prep
+- layout matches upstream (and Debian) more closely
+
+* Tue Dec 31 2013 Adam Williamson <awilliam at redhat.com> - 3.3.0-0.1.beta1
+- Initial package
+
diff --git a/sources b/sources
index e69de29..30392d4 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+4ffef63ec017d53a71593021b397b941  php-3.3.0-beta1.zip


More information about the scm-commits mailing list