From d50bcfe1daec98aa6ceb64d178175a2ac30be829 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Sun, 24 Mar 2024 21:49:32 -0400 Subject: [PATCH] * Tue Feb 19 2013 Remi Collet - 1.0.0-5 - fix metadata location --- File_Util-1.0.0.tgz | 3 + README.md | 6 +- change-this-to-the-package-name.spec | 55 ------------- php-pear-File-Util.spec | 117 +++++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 58 deletions(-) create mode 100644 File_Util-1.0.0.tgz delete mode 100644 change-this-to-the-package-name.spec create mode 100644 php-pear-File-Util.spec diff --git a/File_Util-1.0.0.tgz b/File_Util-1.0.0.tgz new file mode 100644 index 0000000..79a8614 --- /dev/null +++ b/File_Util-1.0.0.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39e74713100dfd5ed580f5bbc087a1e762ca1d8f0073eb01617a53ae83ef9d74 +size 7657 diff --git a/README.md b/README.md index 0e3f271..65b4f41 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ SMEServer Koozali local git repo for php-pear-File-Util ## Documentation -
https://metacpan.org/pod/php-pear-File-Util +
https://pear.php.net/package/File_Util ## Bugzilla -CPAN bug report are [here](https://rt.cpan.org/Public/Dist/Display.html?Name=php-pear-File-Util) +CPAN bug report are [here](https://pear.php.net/bugs/search.php?cmd=display&package_name[]=File_Util&status=OpenFeedback&bug_type=Bugs) Show list of Koozali outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=php-pear-File-Util&product=SME%20Server%2011.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) ## Description - +Common file and directory utility functions diff --git a/change-this-to-the-package-name.spec b/change-this-to-the-package-name.spec deleted file mode 100644 index 598f4bf..0000000 --- a/change-this-to-the-package-name.spec +++ /dev/null @@ -1,55 +0,0 @@ -%define name php-pear-File-Util -%define version 1.0 -%define release 1 -Summary: This is what php-pear-File-Util does. -Name: %{name} -Version: %{version} -Release: %{release}%{?dist} -Source: %{name}-%{version}.tar.gz -License: GNU GPL version 2 -Group: SMEserver/addon -BuildRoot: %{_tmppath}/%{name}-buildroot -Prefix: %{_prefix} -BuildArchitectures: noarch -BuildRequires: e-smith-devtools -Requires: e-smith-release >= 10.0 -AutoReqProv: no - -%description - - -%changelog -* Day MMMM DD YYYY 1.0-1.sme -- Initial code - create RPM [SME:99999] - -%prep - -%setup -q - -%build -perl createlinks - -%install -rm -rf $RPM_BUILD_ROOT -(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) -rm -f %{name}-%{version}-filelist -/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ -> %{name}-%{version}-filelist -#echo "%doc COPYING" >> %{name}-%{version}-filelist -#--dir 'attr(755,user,grp)' \ -#--file 'attr(755,root,root)' \ - -%clean -cd .. -rm -rf %{name}-%{version} - -%pre - -%preun - -%post - -%postun -#uninstall -%files -f %{name}-%{version}-filelist -%defattr(-,root,root) diff --git a/php-pear-File-Util.spec b/php-pear-File-Util.spec new file mode 100644 index 0000000..9e2311d --- /dev/null +++ b/php-pear-File-Util.spec @@ -0,0 +1,117 @@ +%{!?pear_metadir: %global pear_metadir %{pear_phpdir}} +%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} +%global pear_name File_Util + +# Tests are only run with rpmbuild --with tests +# Can't be run in mock because of circular dependencies +%global with_tests %{?_with_tests:1}%{!?_with_tests:0} + +Name: php-pear-File-Util +Version: 1.0.0 +Release: 6%{?dist} +Summary: Common file and directory utility functions + +Group: Development/Libraries +License: PHP +URL: http://pear.php.net/package/File_Util +Source0: http://pear.php.net/get/File_Util-%{version}.tgz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: php-pear(PEAR) >= 1.7.0 +%if %{with_tests} +BuildRequires: php-pear(File) >= 1.4.0 +%endif + +Requires(post): %{__pear} +Requires(postun): %{__pear} +Requires: php-pear(PEAR) >= 1.7.0 +Requires: php-pear(File) >= 1.4.0 +Provides: php-pear(%{pear_name}) = %{version} + + +%description +Common file and directory utility functions. Path handling, temp dir/file, +sorting of files, listDirs, isIncludable and more. + +%prep +%setup -q -c + +cd %{pear_name}-%{version} +# Package 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_metadir}/.??* + +# Install XML package description +mkdir -p %{buildroot}%{pear_xmldir} +install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} + + +%check +cd %{pear_name}-%{version} +%if %{with_tests} +%{__pear} \ + run-tests \ + --recur \ + --ini "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \ + tests | tee ../tests.log +grep "FAILED TESTS" ../tests.log && exit 1 +%else +echo 'Test suite disabled (missing "--with test" option)' +%endif + + +%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,-) +%{pear_xmldir}/%{name}.xml +%{pear_phpdir}/File/Util.php +%{pear_testdir}/File_Util + + +%changelog +* Tue Feb 19 2013 Remi Collet - 1.0.0-5 +- fix metadata location + +* Thu Feb 14 2013 Fedora Release Engineering - 1.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Aug 14 2012 Remi Collet - 1.0.0-4 +- rebuilt for new pear_testdir + +* Fri Jul 20 2012 Fedora Release Engineering - 1.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Mar 05 2012 Remi Collet - 1.0.0-2 +- spec cleanups + +* Sat Mar 19 2011 Remi Collet - 1.0.0-1 +- initial package +