From b15f79e0d2a4ce2750ae11acdb4d7e338f138f81 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 4 Nov 2012 16:56:28 +0100 Subject: php-pear-XML-SVG: new package --- Makefile | 4 +++ php-pear-XML-SVG.spec | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 Makefile create mode 100644 php-pear-XML-SVG.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/php-pear-XML-SVG.spec b/php-pear-XML-SVG.spec new file mode 100644 index 0000000..4bf3674 --- /dev/null +++ b/php-pear-XML-SVG.spec @@ -0,0 +1,80 @@ +%{!?pear_metadir: %global pear_metadir %{pear_phpdir}} +%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} +%global pear_name XML_SVG + +Name: php-pear-XML-SVG +Version: 1.1.0 +Release: 1%{?dist} +Summary: API for building SVG documents + +Group: Development/Libraries +# https://pear.php.net/bugs/19690 - Please Provides LICENSE file +License: LGPLv3 +URL: http://pear.php.net/package/%{pear_name} +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) + +Requires(post): %{__pear} +Requires(postun): %{__pear} +Requires: php-pear(PEAR) + +Provides: php-pear(%{pear_name}) = %{version} + + +%description +This package provides an object-oriented API for building SVG documents. + + +%prep +%setup -q -c +cd %{pear_name}-%{version} +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_metadir}/.??* + +# Install XML package description +install -Dpm 644 %{name}.xml %{buildroot}%{pear_xmldir}/%{name}.xml + + +%clean +rm -rf %{buildroot} + + +%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 +%{pear_phpdir}/XML +%{pear_datadir}/%{pear_name} + + +%changelog +* Sun Nov 4 2012 Remi Collet - 1.1.0-1 +- Initial package -- cgit