[CentOS] Need help with spec file for Apache-2.4.7

Sat Jan 4 01:29:44 UTC 2014
Markus Falb <wnefal at gmail.com>

On 03.Jan.2014, at 21:24, James B. Byrne wrote:

> I am trying to build an RPM for Apache-2.4.7-1 on Centos-6.5-i86_64.  I am
> using mock.
> 
> The are three build dependencies that I am trying to resolve.  One,
> mod_socache_dc / distcache, I have simply removed from the spec file.  The
> other two are arp and apr-utils.  Since httpd-2.4.7 needs arp >= 1.4 I got the
> two latter requirements from
> http://www.apache.org/dist/httpd/httpd-2.4.7-deps.tar.bz2 and extracted them
> into rpmbuild/SOURCES/httpd-2.4.7/srclib intending to use the
> --with-included-arp configuration directive per
> rpmbuild/SOURCES/httpd-2.4.7/INSTALL.

...

> However, the build dies saying that it cannot find arp/arp-utils:
> 
> configure: Configuring Apache Portable Runtime library...
> configure:
> configure: error: Bundled APR requested but not found at ./srclib/. Download
> and unpack the corresponding apr and apr-util packages to ./srclib/.
> RPM build errors:
> error: Bad exit status from /var/tmp/rpm-tmp.pXoIWK (%build)
>    Bad exit status from /var/tmp/rpm-tmp.pXoIWK (%build)
> Child return code was: 1
> 
> Now, I added this in the Sources:
> 
> Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
> Source1: http://www.apache.org/dist/httpd/httpd-%{version}-deps.tar.bz2

You have to extract Source1 into the BUILDDIR...
You can verify if apr directory is present with

$ rpmbuild -bp httpd.spec
$ ls ../BUILD/httpd-2.4.7

> <--- rpmbuild/SPECS/httpd.spec

...

> %prep
> %setup -q

after that %setup macro your working directory should be rpmbuild/BUILD/httpd-2.4.7
now something like

%setup -D -q -b 1

http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html-single/RPM_Guide/index.html#id853841

-- 
Markus