[php-pear-Net-DNS2] New package: import from review

Remi Collet remi at fedoraproject.org
Fri Sep 14 13:51:20 UTC 2012


commit 73710c13d7f03fcb9e1a8546e3a425755061faf9
Author: remi <fedora at famillecollet.com>
Date:   Fri Sep 14 15:50:16 2012 +0200

    New package: import from review

 .gitignore             |    1 +
 php-pear-Net-DNS2.spec |  123 ++++++++++++++++++++++++++++++++++++++++++++++++
 sources                |    1 +
 3 files changed, 125 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a007ff0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Net_DNS2-1.2.3.tgz
diff --git a/php-pear-Net-DNS2.spec b/php-pear-Net-DNS2.spec
new file mode 100644
index 0000000..5aded76
--- /dev/null
+++ b/php-pear-Net-DNS2.spec
@@ -0,0 +1,123 @@
+%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%global pear_name Net_DNS2
+
+Name:           php-pear-Net-DNS2
+Version:        1.2.3
+Release:        1%{?dist}
+Summary:        PHP Resolver library used to communicate with a DNS server
+
+Group:          Development/Libraries
+License:        BSD
+URL:            http://pear.php.net/package/Net_DNS2
+Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
+
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+BuildRequires:  php-pear(PEAR)
+# for tests
+BuildRequires:  php-pear(pear.phpunit.de/PHPUnit)
+
+Requires(post): %{__pear}
+Requires(postun): %{__pear}
+Requires:       php-pear(PEAR)
+# extensions detected by phpci (+ php-filter, not yet available in EL)
+Requires:       php-ctype, php-date, php-json, php-openssl, php-mhash
+Requires:       php-pcre, php-shmop, php-sockets, php-spl
+
+Provides:       php-pear(%{pear_name}) = %{version}
+
+
+%description
+Net_DNS2 - Native PHP5 DNS Resolver and Updater
+
+The main features for this package include:
+* Increased performance; most requests are 2-10x faster than Net_DNS
+* Near drop-in replacement for Net_DNS
+* Uses PHP5 style classes and exceptions
+* Support for IPv4 and IPv6, TCP and UDP sockets.
+* Includes a separate, more intuitive Updater class for handling dynamic update
+* Support zone signing using TSIG and SIG(0) for updates and zone transfers
+* Includes a local cache using shared memory or flat file to improve performance
+* includes many more RR's, including DNSSEC RR's. 
+
+
+%prep
+%setup -q -c
+cd %{pear_name}-%{version}
+# Package.xml is V2
+mv ../package.xml %{name}.xml
+
+
+%build
+cd %{pear_name}-%{version}
+# Empty build section, most likely nothing required.
+
+
+%install
+rm -rf %{buildroot}
+
+cd %{pear_name}-%{version}
+%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
+
+# Clean up unnecessary files
+rm -rf %{buildroot}%{pear_phpdir}/.??*
+
+# Install XML package description
+mkdir -p %{buildroot}%{pear_xmldir}
+install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%check
+if ping -c 1 dns.google.com &>/dev/null
+then
+  suite=AllTests.php
+else
+  : Resolver test disabled
+  suite=Net_DNS2_ParserTest.php
+fi
+phpunit \
+   -d date.timezone=UTC \
+   -d include_path=.:%{buildroot}%{pear_phpdir}:%{pear_phpdir} \
+   %{buildroot}%{pear_testdir}/%{pear_name}/tests/$suite
+
+
+%post
+%{__pear} install --nodeps --soft --force --register-only \
+    %{pear_xmldir}/%{name}.xml >/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    %{__pear} uninstall --nodeps --ignore-errors --register-only \
+        pear.php.net/%{pear_name} >/dev/null || :
+fi
+
+
+%files
+%defattr(-,root,root,-)
+%doc %{pear_docdir}/%{pear_name}
+%{pear_xmldir}/%{name}.xml
+%dir %{pear_phpdir}/Net
+%{pear_phpdir}/Net/DNS2
+%{pear_phpdir}/Net/DNS2.php
+%{pear_testdir}/%{pear_name}
+
+
+%changelog
+* Sat Aug 18 2012 Remi Collet <remi at fedoraproject.org> - 1.2.3-1
+- Version 1.2.3 (stable), API 1.2.3 (stable)
+- upstream now provides LICENSE and tests
+- run all tests if network available, else only parser
+
+* Wed Aug 15 2012 Remi Collet <remi at fedoraproject.org> - 1.2.2-2
+- rebuilt for new pear_testdir
+- use php-pear(PEAR) in BR/R
+
+* Sun Aug 12 2012 Remi Collet <remi at fedoraproject.org> - 1.2.2-1
+- Version 1.2.2 (stable), API 1.2.2 (stable)
+- Initial package
+
diff --git a/sources b/sources
index e69de29..6277233 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+32564d2c936a006afc2d649391df0e8f  Net_DNS2-1.2.3.tgz


More information about the scm-commits mailing list