[5913] | 1 | %{!?__pear: %{expand: %%global __pear %{_bindir}/pear5}} |
---|
| 2 | %global pear_name Net_Socket |
---|
| 3 | |
---|
| 4 | Name: php-pear-Net-Socket |
---|
| 5 | Version: 1.0.10 |
---|
| 6 | Release: 4%{?_dist_release} |
---|
| 7 | Summary: Network Socket Interface |
---|
| 8 | |
---|
| 9 | Group: Development/Libraries |
---|
| 10 | License: PHP |
---|
| 11 | URL: http://pear.php.net/package/Net_Socket |
---|
| 12 | Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz |
---|
| 13 | Source2: xml2changelog |
---|
| 14 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
| 15 | |
---|
| 16 | BuildArch: noarch |
---|
| 17 | BuildRequires: php-pear(PEAR) >= 1.9.1 |
---|
| 18 | Requires(post): %{__pear} |
---|
| 19 | Requires(postun): %{__pear} |
---|
| 20 | Provides: php-pear(%{pear_name}) = %{version} |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | %description |
---|
| 24 | Net_Socket is a class interface to TCP sockets. It provides blocking |
---|
| 25 | and non-blocking operation, with different reading and writing modes |
---|
| 26 | (byte-wise, block-wise, line-wise and special formats like network |
---|
| 27 | byte-order ip addresses). |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | %prep |
---|
| 31 | %setup -q -c |
---|
| 32 | %{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10 |
---|
| 33 | |
---|
| 34 | # Create a "localized" php.ini to avoid build warning |
---|
| 35 | cp /etc/php5/php.ini . |
---|
| 36 | echo "date.timezone=UTC" >>php.ini |
---|
| 37 | |
---|
| 38 | cd %{pear_name}-%{version} |
---|
| 39 | # package.xml is V2 |
---|
| 40 | mv ../package.xml %{name}.xml |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | %build |
---|
| 44 | cd %{pear_name}-%{version} |
---|
| 45 | # Empty build section, most likely nothing required. |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | %install |
---|
| 49 | rm -rf %{buildroot} |
---|
| 50 | |
---|
| 51 | cd Net_Socket-%{version} |
---|
| 52 | PHPRC=../php.ini %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml |
---|
| 53 | |
---|
| 54 | # Clean up unnecessary files |
---|
| 55 | rm -rf %{buildroot}%{pear_phpdir}/.??* |
---|
| 56 | |
---|
| 57 | %{__mkdir_p} %{buildroot}%{pear_xmldir} |
---|
| 58 | %{__install} -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | %check |
---|
| 62 | # Sanity check |
---|
| 63 | lst=$(find %{buildroot}%{pear_phpdir} -exec grep -q %{buildroot} {} \; -print) |
---|
| 64 | [ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1; |
---|
| 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 CHANGELOG |
---|
| 85 | %{pear_phpdir}/Net |
---|
| 86 | %{pear_xmldir}/%{name}.xml |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | %changelog |
---|
| 90 | * Tue Mar 14 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.0.10-4 |
---|
| 91 | - initial build for Vine Linux |
---|
| 92 | |
---|
| 93 | * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-3 |
---|
| 94 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
| 95 | |
---|
| 96 | * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-2 |
---|
| 97 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
| 98 | |
---|
| 99 | * Sat Oct 16 2010 Remi Collet <Fedora@FamilleCollet.com> 1.0.10-1 |
---|
| 100 | - Version 1.0.10 (stable) - API 1.0.9 (stable) - QA release |
---|
| 101 | - set timezone during build |
---|
| 102 | |
---|
| 103 | * Sat May 22 2010 Remi Collet <Fedora@FamilleCollet.com> 1.0.9-4 |
---|
| 104 | - spec cleanup |
---|
| 105 | - rename Net_Socket.xml to php-pear-Net-Socket.xml |
---|
| 106 | |
---|
| 107 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-3 |
---|
| 108 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
| 109 | |
---|
| 110 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2 |
---|
| 111 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
| 112 | |
---|
| 113 | * Sat Jul 12 2008 Remi Collet <Fedora@FamilleCollet.com> 1.0.9-1 |
---|
| 114 | - update to 1.0.9 |
---|
| 115 | |
---|
| 116 | * Fri Jun 13 2008 Jon Stanley <jonstanley@gmail.com> - 1.0.8-2 |
---|
| 117 | - Rebuild |
---|
| 118 | |
---|
| 119 | * Tue May 08 2007 Remi Collet <Fedora@FamilleCollet.com> 1.0.8-1 |
---|
| 120 | - update to 1.0.8 |
---|
| 121 | |
---|
| 122 | * Sat Mar 31 2007 Remi Collet <Fedora@FamilleCollet.com> 1.0.7-1 |
---|
| 123 | - remove PEAR from sumnary |
---|
| 124 | - update to 1.0.7 |
---|
| 125 | - spec cleanup |
---|
| 126 | - add generated CHANGELOG |
---|
| 127 | |
---|
| 128 | * Fri Sep 08 2006 Remi Collet <Fedora@FamilleCollet.com> 1.0.6-5 |
---|
| 129 | - last template.spec |
---|
| 130 | |
---|
| 131 | * Sun Sep 03 2006 Remi Collet <Fedora@FamilleCollet.com> 1.0.6-4 |
---|
| 132 | - new and simpler %%prep and %%install |
---|
| 133 | |
---|
| 134 | * Sat Sep 02 2006 Remi Collet <Fedora@FamilleCollet.com> 1.0.6-3 |
---|
| 135 | - install Licence in prep |
---|
| 136 | - use new macros from /etc/rpm/macros.pear |
---|
| 137 | - own /usr/share/pear/Net |
---|
| 138 | - require php >= 4.3.0 (info from PHP_CompatInfo) |
---|
| 139 | |
---|
| 140 | * Sat May 20 2006 Remi Collet <Fedora@FamilleCollet.com> 1.0.6-2 |
---|
| 141 | - Require pear >= 1.4.9 |
---|
| 142 | - bundle the v3.01 PHP LICENSE file |
---|
| 143 | - use --packagingroot (instead of -R) |
---|
| 144 | - check from install to check (as in php-pear) |
---|
| 145 | |
---|
| 146 | * Sat May 06 2006 Remi Collet <Fedora@FamilleCollet.com> 1.0.6-1 |
---|
| 147 | - spec for extras |
---|
| 148 | - use %%{_datadir}/pear/.pkgxml for XML (Bug #190252) |
---|
| 149 | |
---|
| 150 | * Thu Apr 06 2006 Remi Collet <rpms@FamilleCollet.com> 1.0.6-2.fc{3,4,5}.remi |
---|
| 151 | - change /var/lib/pear to %%{_libdir}/php/pear for XML (as in extras for FC5) |
---|
| 152 | - spec cleanning |
---|
| 153 | |
---|
| 154 | * Sat Jan 7 2006 Remi Collet <remi.collet@univ-reims.fr> 1.0.6-1.fc{3,4}.remi |
---|
| 155 | - initial RPM |
---|