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