summaryrefslogtreecommitdiffstats
path: root/php-irodsphp.spec
blob: f47327660b8c61b8611b05cd285442fc9ede7932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
%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

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
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
rm -rf %{buildroot}

# 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


%clean
rm -rf %{buildroot}


%check
# Needs a reference iRODS instance to test sensibly, which we don't
# have

%files
%defattr(-,root,root,-)
%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
* Fri Jan 10 2014 Remi Collet <rrpms@fedoraproject.org> - 3.3.0-0.3.beta1
- backport for remi repo.

* Sat Jan  4 2014 Adam Williamson <awilliam@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@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@redhat.com> - 3.3.0-0.1.beta1
- Initial package