[php-pecl-cairo/el6] first fedora release

Nathanael Noblet gnat at fedoraproject.org
Thu Aug 9 16:32:50 UTC 2012


commit 047422984c0780fcfb628808c3b4536ed681c12a
Author: Nathanael D. Noblet <nathanael at gnat.ca>
Date:   Thu Aug 9 10:31:56 2012 -0600

    first fedora release

 .gitignore          |    1 +
 php-pecl-cairo.spec |  131 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sources             |    1 +
 3 files changed, 133 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..6a13a43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Cairo-0.3.2.tgz
diff --git a/php-pecl-cairo.spec b/php-pecl-cairo.spec
new file mode 100644
index 0000000..a41f1d1
--- /dev/null
+++ b/php-pecl-cairo.spec
@@ -0,0 +1,131 @@
+%{!?__pecl:     %{expand: %%global __pecl     %{_bindir}/pecl}}
+
+%global pecl_name cairo
+
+Name:           php-pecl-cairo
+Summary:        PECL package for drawing using cairo via PHP scripts
+Version:        0.3.2
+Release:        1%{?dist}
+Source0:        http://pecl.php.net/get/Cairo-%{version}%{?prever}.tgz
+
+#fixes a bug that affects i386 versions? https://bugs.php.net/bug.php?id=61882&edit=2
+Patch0:         pecl-cairo-php_streams.patch
+
+# The PHP License", version 3.0.1
+License:        PHP
+Group:          Development/Languages
+URL:            http://www.cairographics.org/cairo-php/
+
+BuildRequires:  php-pear
+BuildRequires:  php-devel >= 5.2
+BuildRequires:  cairo-devel >= 1.4
+BuildRequires:  freetype-devel
+
+Requires:       php(zend-abi) = %{php_zend_api}
+Requires:       php(api) = %{php_core_api}
+Requires(post): %{__pecl}
+Requires(postun): %{__pecl}
+
+Provides:       php-pecl(cairo) = %{version}
+Provides:       php-pecl(cairo)%{?_isa} = %{version}
+
+
+# RPM 4.8
+%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
+%{?filter_setup}
+# RPM 4.9
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{_libdir}/.*\\.so$
+
+
+%description
+PECL cairo is the official Cairo Graphics Library binding. It provides an 
+object oriented and procedural interface for the cairo library. Support is 
+currently provided for 1.4 to 1.8 versions of the library 
+(1.10 is partially supported).
+
+%package devel
+Summary:       Header files for php cairo package
+Group:         Development/Libraries
+Requires:      php-pecl-cairo%{?_isa} = %{version}-%{release}
+Requires:      php-devel%{?_isa} >= 5.2
+
+%description devel
+These are the files needed to compile programs using php cairo extension.
+
+%prep
+%setup -q -c
+cat > %{pecl_name}.ini << 'EOF'
+; Enable cairo extension module
+extension=%{php_extdir}/%{pecl_name}.so
+
+EOF
+
+%patch0 -p0
+
+%build
+cd Cairo-%{version}
+%{_bindir}/phpize
+%configure --with-php-config=%{_bindir}/php-config
+make %{?_smp_mflags}
+
+%install
+cd Cairo-%{version}
+make install INSTALL_ROOT=%{buildroot}
+
+# install config file
+cd ..
+install -Dpm 0644 %{pecl_name}.ini %{buildroot}%{_sysconfdir}/php.d/%{pecl_name}.ini
+install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+
+%check
+cd Cairo-%{version}
+# only check if build extension can be loaded
+%{_bindir}/php \
+    --no-php-ini \
+    --define extension=modules/%{pecl_name}.so \
+    --modules | grep cairo
+
+TEST_PHP_EXECUTABLE=%{_bindir}/php \
+REPORT_EXIT_STATUS=1 \
+NO_INTERACTION=1 \
+%{_bindir}/php run-tests.php \
+    -n -q \
+    -d extension_dir=modules \
+    -d extension=%{pecl_name}.so
+
+%post
+%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    %{pecl_uninstall} %{pecl_name} >/dev/null || :
+fi
+
+%files
+%doc Cairo-%{version}/CREDITS Cairo-%{version}/LICENSE Cairo-%{version}/README
+%config(noreplace) %{_sysconfdir}/php.d/%{pecl_name}.ini
+%{php_extdir}/%{pecl_name}.so
+%{pecl_xmldir}/%{name}.xml
+
+%files devel
+%{_includedir}/php/ext/%{pecl_name}
+
+%changelog
+* Thu Aug 9 2012 Nathanael Noblet <nathanael at gnat.ca> - 0.3.2-1
+- Initial release
+
+* Wed Aug 8 2012 Nathanael Noblet <nathanael at gnat.ca> - 0.3.2-0.4
+- Removed defattr
+- Bump min required php to 5.2 due to unclear deps
+- Own php/ext/cairo dir in devel
+- Added freetype-devel BR
+- Added a patch to fix test failures in i386 arches
+
+* Tue Aug 7 2012 Nathanael Noblet <nathanael at gnat.ca> - 0.3.2-0.3
+- Own php/etc/cairo dir
+- Fix php build requirement inconsistencies
+- Run test suite
+- Remove EL5isms 
+
+* Wed Jul 18 2012 Nathanael Noblet <nathanael at gnat.ca> - 0.3.2-0.2
+- Initial Package
diff --git a/sources b/sources
index e69de29..8ba254f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+e89d0842eef2b3111b4579b4a4753dda  Cairo-0.3.2.tgz


More information about the scm-commits mailing list