NYCPHP Meetup

NYPHP.org

[nycphp-talk] pear makerpm

Tom tom at supertom.com
Fri May 21 08:10:44 EDT 2004


I guess I should have included that - here it is below - generated from
PEAR:

In one of the PEAR directories, there template.spec file, and this just gets
the specific values swapped in.


Summary: PEAR: Framework to benchmark PHP scripts or function calls.
Name: PEAR::Benchmark
Version: 1.2.1
Release: 1
License: PHP License
Group: Development/Libraries
Source: http://pear.php.net/get/Benchmark-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-root
URL: http://pear.php.net/
Prefix: %{_prefix}
#Docdir: /usr/share/pear/docs/Benchmark
BuildArchitectures: noarch


%description
Framework to benchmark PHP scripts or function calls.

%prep
rm -rf %{buildroot}/*
# XXX Source files location is missing here in pear cmd
pear -v -c %{buildroot}/pearrc \
        -d php_dir=%{_libdir}/php/pear \
        -d doc_dir=/docs \
        -d bin_dir=%{_bindir} \
        -d data_dir=%{_libdir}/php/pear/data \
        -d test_dir=%{_libdir}/php/pear/tests \
        -d ext_dir=%{_libdir} \
        -s

%build
echo BuildRoot=%{buildroot}

%postun
pear uninstall --nodeps -r Benchmark
rm /var/lib/pear/Benchmark.xml

%post
pear install --nodeps -r /var/lib/pear/Benchmark.xml

%install
pear -c %{buildroot}/pearrc install --nodeps -R %{buildroot} \
        $RPM_SOURCE_DIR/Benchmark-%{version}.tgz
rm %{buildroot}/pearrc
rm %{buildroot}/%{_libdir}/php/pear/.filemap
rm %{buildroot}/%{_libdir}/php/pear/.lock
rm -rf %{buildroot}/%{_libdir}/php/pear/.registry
if [ -d "%{buildroot}/docs/Benchmark/doc" ]; then
    rm -rf $RPM_BUILD_DIR/doc
    mv %{buildroot}/docs/Benchmark/doc $RPM_BUILD_DIR
    rm -rf %{buildroot}/docs
fi
mkdir -p %{buildroot}/var/lib/pear
tar -xzf $RPM_SOURCE_DIR/Benchmark-%{version}.tgz package.xml
cp -p package.xml %{buildroot}/var/lib/pear/Benchmark.xml

#rm -rf %{buildroot}/*
#pear -q install -R %{buildroot} -n package.xml
#mkdir -p %{buildroot}/var/lib/pear
#cp -p package.xml %{buildroot}/var/lib/pear/Benchmark.xml

%files
    %defattr(-,root,root)
    %doc  doc/timer_example.php
    /


 

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of leam
Sent: Friday, May 21, 2004 4:35 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] pear makerpm

Tom wrote:
> Hey folks,
>  
> Anyone have experience with the makerpm option in PEAR?  I can 
> generate the SPEC file just fine, but I can't build the rpm with 
> rpmbuild -bb, as it says in the manual.  I have the source tarball in 
> the SOURCES directory, and the SPEC file in the SPECS directory.  The
error that I receive is:
>  
> error: Bad exit status from /var/tmp/rpm-tmp.31347 (%prep)
>  
> I get a similar error for any of the packages that I try to build.

> Can anyone shed some light on these?
>  
> Thanks,
>  
> Tom
> www.liphp.org

I don't know that much, but can you send the spec file? The (%prep) stanza
may need looking at.

ciao!

leam

_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk






More information about the talk mailing list