diff --git a/.cvsignore b/.cvsignore index e69de29..d68032b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +File-1.2.tgz diff --git a/import.log b/import.log new file mode 100644 index 0000000..d9438f9 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +php-ezc-File-1_2-2_fc10:F-9:php-ezc-File-1.2-2.fc10.src.rpm:1240811919 diff --git a/php-ezc-File.spec b/php-ezc-File.spec new file mode 100644 index 0000000..d16fe1d --- /dev/null +++ b/php-ezc-File.spec @@ -0,0 +1,91 @@ +%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} +%define pear_name File +%define channel components.ez.no + +Name: php-ezc-File +Version: 1.2 +Release: 2%{?dist} +Summary: Provides support for file operations which are not covered by PHP + +Group: Development/Libraries +License: BSD +URL: http://ezcomponents.org/ +Source0: http://components.ez.no/get/%{pear_name}-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: php-pear >= 1:1.4.9-1.2 +BuildRequires: php-channel(%{channel}) +Requires: php-common >= 5.1.1 +Requires: php-pear(%{channel}/Base) >= 1.4 +Requires(post): %{__pear} +Requires(postun): %{__pear} + +Provides: php-pear(%{channel}/%{pear_name}) = %{version} + + +%description +Provides support for file operations which are not covered by PHP or are just +missing. + + +%prep +%setup -q -c +[ -f package2.xml ] || mv package.xml package2.xml +mv package2.xml %{pear_name}-%{version}/%{name}.xml +cd %{pear_name}-%{version} + + +%build +cd %{pear_name}-%{version} +# Empty build section, most likely nothing required. + + +%install +cd %{pear_name}-%{version} +rm -rf %{buildroot} docdir +%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml + +# Move documentation +mv %{buildroot}%{pear_docdir}/%{pear_name}/docs ./docdir +rm -rf %{buildroot}%{pear_docdir} + +# 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} + + +%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 \ + %{channel}/%{pear_name} >/dev/null || : +fi + + +%files +%defattr(-,root,root,-) +%doc %{pear_name}-%{version}/docdir/* +%{pear_xmldir}/%{name}.xml +%{pear_phpdir}/data/%{pear_name} +%{pear_phpdir}/ezc/%{pear_name} +%{pear_phpdir}/ezc/autoload/file_autoload.php + + +%changelog +* Sun Mar 22 2009 Guillaume Kulakowski - 1.2-2 +- Fix requires + +* Sun Feb 08 2009 Guillaume Kulakowski - 1.2-1 +- Initial packaging diff --git a/sources b/sources index e69de29..f98620d 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +36ff7eeb3699b2bf36ccf9b64c224154 File-1.2.tgz