1 Summary: PEAR: @summary@
5 License: @release_license@
6 Group: Development/Libraries
7 Source: http://@master_server@/get/@package@-%{version}.tgz
8 BuildRoot: %{_tmppath}/%{name}-root
9 URL: http://@master_server@/package/@package@
11 BuildArchitectures: @arch@
20 # XXX Source files location is missing here in pear cmd
21 pear -v -c %{buildroot}/pearrc \
22 -d php_dir=%{_libdir}/php/pear \
24 -d bin_dir=%{_bindir} \
25 -d data_dir=%{_libdir}/php/pear/data \
26 -d test_dir=%{_libdir}/php/pear/tests \
27 -d ext_dir=%{_libdir} \@extra_config@
31 echo BuildRoot=%{buildroot}
34 # if refcount = 0 then package has been removed (not upgraded)
35 if [ "$1" -eq "0" ]; then
36 pear uninstall --nodeps -r @possible_channel@@package@
37 rm @rpm_xml_dir@/@package@.xml
42 # if refcount = 2 then package has been upgraded
43 if [ "$1" -ge "2" ]; then
44 pear upgrade --nodeps -r @rpm_xml_dir@/@package@.xml
46 pear install --nodeps -r @rpm_xml_dir@/@package@.xml
50 pear -c %{buildroot}/pearrc install --nodeps -R %{buildroot} \
51 $RPM_SOURCE_DIR/@package@-%{version}.tgz
52 rm %{buildroot}/pearrc
53 rm %{buildroot}/%{_libdir}/php/pear/.filemap
54 rm %{buildroot}/%{_libdir}/php/pear/.lock
55 rm -rf %{buildroot}/%{_libdir}/php/pear/.registry
56 if [ "@doc_files@" != "" ]; then
57 mv %{buildroot}/docs/@package@/* .
58 rm -rf %{buildroot}/docs
60 mkdir -p %{buildroot}@rpm_xml_dir@
61 tar -xzf $RPM_SOURCE_DIR/@package@-%{version}.tgz package@package2xml@.xml
62 cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
64 #rm -rf %{buildroot}/*
65 #pear -q install -R %{buildroot} -n package@package2xml@.xml
66 #mkdir -p %{buildroot}@rpm_xml_dir@
67 #cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml