php-pear-MDB2-vl.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. %{!?__pear: %{expand: %%global __pear %{_bindir}/pear5}}
  2. %global pear_name MDB2
  3. %global prever b3
  4. Name: php-pear-MDB2
  5. Version: 2.5.0
  6. %if 0%{?prever:1}
  7. Release: 0.4.%{?prever}%{?_dist_release}
  8. %else
  9. Release: 4%{?_dist_release}
  10. %endif
  11. Summary: Database Abstraction Layer
  12. Group: Development/Libraries
  13. License: BSD
  14. URL: http://pear.php.net/package/MDB2
  15. Source0: http://pear.php.net/get/%{pear_name}-%{version}%{?prever}.tgz
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  17. BuildArch: noarch
  18. BuildRequires: php-pear(PEAR) >= 1.9.1
  19. Requires: php >= 5.3.0
  20. Requires: php-pear(PEAR)
  21. Requires(post): %{__pear}
  22. Requires(postun): %{__pear}
  23. Provides: php-pear(%{pear_name}) = %{version}%{?prever}
  24. %description
  25. PEAR::MDB2 is a merge of the PEAR::DB and Metabase php database abstraction
  26. layers.
  27. It provides a common API for all supported RDBMS. The main difference to most
  28. other DB abstraction packages is that MDB2 goes much further to ensure
  29. portability.
  30. %prep
  31. %setup -qc
  32. # Create a "localized" php.ini to avoid build warning
  33. cp /etc/php5/php.ini .
  34. echo "date.timezone=UTC" >>php.ini
  35. cd %{pear_name}-%{version}%{?prever}
  36. # package.xml is V2
  37. sed -e '/LICENSE/s/role="data"/role="doc"/' <../package.xml >%{name}.xml
  38. %build
  39. cd %{pear_name}-%{version}%{?prever}
  40. # Empty build section, most likely nothing required.
  41. %install
  42. rm -rf %{buildroot}
  43. cd %{pear_name}-%{version}%{?prever}
  44. PHPRC=../php.ini %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
  45. # Clean up unnecessary files
  46. rm -rf %{buildroot}%{pear_phpdir}/.??*
  47. # Install XML package description
  48. install -d %{buildroot}%{pear_xmldir}
  49. install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
  50. %clean
  51. rm -rf %{buildroot}
  52. %post
  53. %{__pear} install --nodeps --soft --force --register-only \
  54. %{pear_xmldir}/%{name}.xml >/dev/null ||:
  55. %postun
  56. if [ "$1" -eq "0" ]; then
  57. %{__pear} uninstall --nodeps --ignore-errors --register-only \
  58. %{pear_name} >/dev/null ||:
  59. fi
  60. %files
  61. %defattr(-,root,root,-)
  62. %doc %{pear_docdir}/%{pear_name}
  63. %{pear_xmldir}/%{name}.xml
  64. %{pear_testdir}/%{pear_name}
  65. %{pear_phpdir}/%{pear_name}
  66. %{pear_phpdir}/MDB2.php
  67. %changelog
  68. * Tue Mar 13 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.5.0-0.4.b3
  69. - initial build for Vine Linux
  70. * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-0.4.b3
  71. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  72. * Sun Apr 17 2011 Remi Collet <Fedora@FamilleCollet.com> 2.5.0-0.3.b3
  73. - doc in /usr/share/doc/pear
  74. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-0.2.b3
  75. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  76. * Fri Dec 31 2010 Remi Collet <Fedora@FamilleCollet.com> - 2.5.0-0.1.b3
  77. - update to 2.5.0b3
  78. - move MDB2.xml to php-pear-MDB2.xml
  79. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-4
  80. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  81. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-3
  82. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  83. * Tue Nov 13 2007 Christopher Stone <chris.stone@gmail.com> 2.4.1-2
  84. - Add LOB security patch (bz #379081)
  85. * Sat May 05 2007 Christopher Stone <chris.stone@gmail.com> 2.4.1-1
  86. - Upstream sync
  87. * Tue Mar 13 2007 Christopher Stone <chris.stone@gmail.com> 2.4.0-1
  88. - Upstream sync
  89. * Tue Nov 21 2006 Christopher Stone <chris.stone@gmail.com> 2.3.0-1
  90. - Upstream sync
  91. - Move LICENSE file from %%{pear_datadir} to %%doc
  92. * Thu Sep 07 2006 Christopher Stone <chris.stone@gmail.com> 2.2.2-2
  93. - Sync up with latest pear template
  94. * Wed Sep 06 2006 Christopher Stone <chris.stone@gmail.com> 2.2.2-1
  95. - Upstream sync
  96. - Update spec to latest template
  97. * Sun Sep 03 2006 Christopher Stone <chris.stone@gmail.com> 2.1.0-4
  98. - Update to latest template
  99. * Thu Jun 29 2006 Christopher Stone <chris.stone@gmail.com> 2.1.0-3
  100. - Remove some hacks, clean up spec file
  101. * Wed Jun 28 2006 Christopher Stone <chris.stone@gmail.com> 2.1.0-2
  102. - Remove %%build section since it is not used
  103. * Mon Jun 26 2006 Christopher Stone <chris.stone@gmail.com> 2.1.0-1
  104. - Initial Release