%define upstream_name System_ProcWatch %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 0.4.3 Release: %mkrel 2 Summary: Monitor Processes License: PHP Group: Development/PHP Source0: http://pear.php.net/get/System_ProcWatch-%{version}.tgz URL: http://pear.php.net/package/System_ProcWatch BuildRequires: php-pear >= 1.4.7 Requires: php-pear >= 1.4.0b1 BuildArch: noarch %description With this package you can monitor running processes based upon an XML configuration file, XML string, INI file or an array where you define patterns, conditions and actions. XML::Parser must be installed to configure System::ProcWatch by XML, additionally Console::Getopt and XML::DTD must be installed if you want to use the shipped shell scripts 'procwatch' and 'procwatch-lint'. A simple 'ps' fake for WinNT can be found at http://dev.iworks.at/ps/ps.zip %prep %setup -c -T pear -v -c pearrc \ -d php_dir=%{peardir} \ -d doc_dir=/docs \ -d bin_dir=%{_bindir} \ -d data_dir=%{peardir}/data \ -d test_dir=%{peardir}/tests \ -d ext_dir=%{_libdir} \ -s %build %install rm -rf %{buildroot} pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} # Clean up unnecessary files rm pearrc rm %{buildroot}/%{peardir}/.filemap rm %{buildroot}/%{peardir}/.lock rm -rf %{buildroot}/%{peardir}/.registry rm -rf %{buildroot}%{peardir}/.channels rm %{buildroot}%{peardir}/.depdb rm %{buildroot}%{peardir}/.depdblock mv %{buildroot}/docs . # Install XML package description mkdir -p %{buildroot}%{xmldir} tar -xzf %{SOURCE0} package.xml cp -p package.xml %{buildroot}%{xmldir}/System_ProcWatch.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/System_ProcWatch.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.php.net/System_ProcWatch fi %files %defattr(-,root,root) %doc docs/System_ProcWatch/* %{peardir}/* %{_bindir}/procwatch %{_bindir}/procwatch-lint %{_bindir}/system-procwatch.cmd %{_bindir}/system-procwatch_lint.cmd %{xmldir}/System_ProcWatch.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.4.3-2.mga3 + Revision: 377299 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Jan 14 2012 spuhler <spuhler> 0.4.3-1.mga2 + Revision: 196083 - upgrade to 0.4.3 pearized spec * Sat Jan 29 2011 spuhler <spuhler> 0.4.2-12.mga1 + Revision: 44328 - removed buildroot definition from .spec removed the if mdkversion lines - imported package php-pear-System_ProcWatch