9983e6c
# spec file for php-phpunit-PHPUnit
9983e6c
#
9fd9975
# Copyright (c) 2010-2015 Remi Collet
9983e6c
# Copyright (c) 2006-2009 Christopher Stone
9983e6c
#
9983e6c
# License: MIT
9983e6c
# http://opensource.org/licenses/MIT
9983e6c
#
9983e6c
# Please, preserve the changelog entries
9983e6c
#
Remi Collet 963e906
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
9983e6c
%{!?__pear:       %global __pear       %{_bindir}/pear}
20f7afd
%global pear_name DB_DataObject
xulchris ca5f8f7
xulchris ca5f8f7
Name:           php-pear-DB-DataObject
9fd9975
Version:        1.11.4
9fd9975
Release:        1%{?dist}
xulchris ca5f8f7
Summary:        An SQL Builder, Object Interface to Database Tables
xulchris ca5f8f7
xulchris ca5f8f7
Group:          Development/Libraries
45e28d3
License:        PHP
xulchris ca5f8f7
URL:            http://pear.php.net/package/DB_DataObject
xulchris ca5f8f7
Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
xulchris ca5f8f7
20f7afd
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
xulchris ca5f8f7
BuildArch:      noarch
39c379f
BuildRequires:  php-pear
20f7afd
xulchris ca5f8f7
Requires:       php-pear(PEAR)
20f7afd
Requires:       php-pear(Date) >= 1.4.3
6671d5d
# Optional
20f7afd
Requires:       php-pear(Validate) >= 0.1.1
6671d5d
# MDB2 and DB are now optional dependancies, although one of them is required.
6671d5d
Requires:       php-pear(DB) >= 1.7.0
6671d5d
Requires:       php-pear(MDB2) >= 2.0.0
xulchris ca5f8f7
Requires(post): %{__pear}
xulchris ca5f8f7
Requires(postun): %{__pear}
39c379f
# extensions detected by phpci
6671d5d
Requires:       php-date
6671d5d
Requires:       php-pcre
6671d5d
Requires:       php-reflection
6671d5d
Requires:       php-session
39c379f
# still optional, according to used driver: sqlite, mysql, pgsql
39c379f
xulchris ca5f8f7
Provides:       php-pear(%{pear_name}) = %{version}
xulchris ca5f8f7
20f7afd
xulchris ca5f8f7
%description
xulchris ca5f8f7
DataObject performs 2 tasks:
xulchris ca5f8f7
1. Builds SQL statements based on the objects vars and the builder methods.
xulchris ca5f8f7
2. acts as a datastore for a table row.
xulchris ca5f8f7
xulchris ca5f8f7
The core class is designed to be extended for each of your tables so that you
xulchris ca5f8f7
put the data logic inside the data classes. Included is a Generator to make
xulchris ca5f8f7
your configuration files and your base classes.
xulchris ca5f8f7
xulchris ca5f8f7
xulchris ca5f8f7
%prep
e8ab95b
%setup -qc
6671d5d
xulchris ca5f8f7
cd %{pear_name}-%{version}
20f7afd
# package.xml is V2
20f7afd
mv ../package.xml %{name}.xml
xulchris ca5f8f7
xulchris ca5f8f7
xulchris ca5f8f7
%build
xulchris ca5f8f7
cd %{pear_name}-%{version}
xulchris ca5f8f7
# Empty build section, most likely nothing required.
xulchris ca5f8f7
xulchris ca5f8f7
xulchris ca5f8f7
%install
6671d5d
rm -rf %{buildroot}
df664f4
cd %{pear_name}-%{version}
6671d5d
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
xulchris ca5f8f7
xulchris ca5f8f7
# Clean up unnecessary files
6671d5d
rm -rf %{buildroot}%{pear_metadir}/.??*
xulchris ca5f8f7
xulchris ca5f8f7
# Install XML package description
6671d5d
install -d %{buildroot}%{pear_xmldir}
6671d5d
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
xulchris ca5f8f7
20f7afd
# Move createTables script to /usr/bin
6671d5d
chmod +x %{buildroot}%{pear_phpdir}/DB/DataObject/createTables.php
ca742c7
ln -s ../..%{pear_phpdir}/DB/DataObject/createTables.php \
6671d5d
      %{buildroot}%{_bindir}/createTables
xulchris ca5f8f7
39c379f
xulchris ca5f8f7
%clean
6671d5d
rm -rf %{buildroot}
xulchris ca5f8f7
xulchris ca5f8f7
xulchris ca5f8f7
%post
xulchris ca5f8f7
%{__pear} install --nodeps --soft --force --register-only \
20f7afd
    %{pear_xmldir}/%{name}.xml >/dev/null || :
xulchris ca5f8f7
xulchris ca5f8f7
%postun
xulchris ca5f8f7
if [ $1 -eq 0 ] ; then
xulchris ca5f8f7
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
xulchris ca5f8f7
        %{pear_name} >/dev/null || :
xulchris ca5f8f7
fi
xulchris ca5f8f7
xulchris ca5f8f7
xulchris ca5f8f7
%files
xulchris ca5f8f7
%defattr(-,root,root,-)
ca742c7
%doc %{pear_docdir}/%{pear_name}
ca742c7
%{_bindir}/createTables
20f7afd
%{pear_xmldir}/%{name}.xml
xulchris ca5f8f7
%{pear_phpdir}/DB/DataObject*
xulchris ca5f8f7
%exclude %{_bindir}/DB/scripts/DB_DataObject_createTables.bat
xulchris ca5f8f7
xulchris ca5f8f7
xulchris ca5f8f7
%changelog
9fd9975
* Wed Apr  8 2015 Remi Collet <remi@fedoraproject.org> - 1.11.4
9fd9975
- update to 1.11.3
9fd9975
018135e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.3-2
018135e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
018135e
9983e6c
* Tue Apr 22 2014 Remi Collet <remi@fedoraproject.org> - 1.11.3
9983e6c
- version 1.11.3
9983e6c
- LICENSE now included in upstream archive
9983e6c
a2cdb27
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.2-2
a2cdb27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a2cdb27
2853bf9
* Fri Apr  5 2013 Remi Collet <remi@fedoraproject.org> - 1.11.2
2853bf9
- Version 1.11.2 (stable) - API 1.9.0 (stable)
2853bf9
- add LICENSE file
2853bf9
e8ab95b
* Fri Apr  5 2013 Remi Collet <remi@fedoraproject.org> - 1.11.1
e8ab95b
- Version 1.11.1 (stable) - API 1.9.0 (stable)
e8ab95b
6671d5d
* Wed Apr  3 2013 Remi Collet <remi@fedoraproject.org> - 1.11.0-1
6671d5d
- Version 1.11.0 (stable) - API 1.9.0 (stable)
6671d5d
Remi Collet 963e906
* Tue Feb 19 2013 Remi Collet <remi@fedoraproject.org> - 1.10.0-3
Remi Collet 963e906
- fix metadata location
Remi Collet 963e906
1d471a0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.0-2
1d471a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1d471a0
39c379f
* Sat Aug 04 2012 Remi Collet <Fedora@FamilleCollet.com> - 1.9.6-1
39c379f
- Version 1.10.0 (stable) - API 1.9.0 (stable)
39c379f
d31ff13
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.6-3
d31ff13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d31ff13
9811ea0
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.6-2
9811ea0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9811ea0
ca742c7
* Mon Aug 29 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.9.6-1
ca742c7
- Version 1.9.6 (stable) - API 1.9.0 (stable)
ca742c7
- upstream doc in /usr/share/doc/pear
ca742c7
- change link for /usr/bin/createTables
ca742c7
e7b056d
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.5-2
e7b056d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e7b056d
df664f4
* Fri Oct 08 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.9.5-1
df664f4
- Version 1.9.5 (stable) - API 1.9.0 (stable)
df664f4
- add generated CHANGELOG
df664f4
20f7afd
* Sat Aug 28 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.8.12-2
20f7afd
- clean define
20f7afd
- remove LICENSE file (not provided by upstream)
20f7afd
- rename DB_DataObject.xml to php-pear-DB-DataObject.xml
20f7afd
- set date.timezone during build
20f7afd
20f7afd
xulchris 13dd192
* Sun Aug 30 2009 Christopher Stone <chris.stone@gmail.com> 1.8.12-1
xulchris 13dd192
- Upstream sync
xulchris 13dd192
a6d9e65
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-4
a6d9e65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a6d9e65
f45b2ce
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-3
f45b2ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f45b2ce
45e28d3
* Thu Aug 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.8.8-2
45e28d3
- fix license tag
45e28d3
xulchris d876d6a
* Thu Feb  7 2008 Christopher Stone <chris.stone@gmail.com> 1.8.8-1
xulchris d876d6a
- Upstream sync
xulchris d876d6a
xulchris 70b5a7d
* Sat Sep  8 2007 Christopher Stone <chris.stone@gmail.com> 1.8.7-1
xulchris 70b5a7d
- Upstream sync
xulchris 70b5a7d
- Update license file
xulchris 70b5a7d
xulchris f7dffed
* Sun Jan 14 2007 Christopher Stone <chris.stone@gmail.com> 1.8.5-2
xulchris f7dffed
- Use correct version of license
xulchris f7dffed
xulchris 9599efe
* Sat Dec 16 2006 Christopher Stone <chris.stone@gmail.com> 1.8.5-1
xulchris 9599efe
- Upstream sync
xulchris 9599efe
- Add LICENSE to %%doc
xulchris 9599efe
xulchris ca5f8f7
* Fri Nov 17 2006 Christohper Stone <chris.stone@gmail.com> 1.8.4-2
xulchris ca5f8f7
- Fix version number in %%changelog
xulchris ca5f8f7
- Add versioned Requires
xulchris ca5f8f7
- Move createTables script to %%{_bindir}
xulchris ca5f8f7
xulchris ca5f8f7
* Sun Oct 29 2006 Christopher Stone <chris.stone@gmail.com> 1.8.4-1
xulchris ca5f8f7
- Initial Release