Help building an rpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need some help building an rpm from and installed source.  I have all
the steps I took to build and install but I need help creating a proper
.spec file.  The rpmbuild gets to the point where it validates the files
then fails.  Could someone take a look a my .spec file and tell me what
I absolutely need to include and how the %files section should look. 
This is an adaptation of the mod_perl-1.26-5 .spec file from RH7.3.  I
will remove/modify the lines containing '$RPM_BUILD_ROOT' because I
didn't it.  Do I need to include them?  I did use it for the 'make
pure_install ...'.  I built it in /usr/src/redhat/SOURCES/mod_perl-1.29

This is for use with apache 1.3 becuase I can't use 2.0

%define defperlver 5.8.1
%define perlver %(rpm -q perl --queryformat '%%{version}' 2> /dev/null
|| echo %{defperlver})
%define perlmajor %(echo %{perlver} | cut -f1 -d.)
%define contentdir /var/www

Summary: An embedded Perl interpreter for the Apache Web server.
Name: mod_perl
Version: 1.29
Release: current
Group: System Environment/Daemons
Source: http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz
License: GPL
URL: http://perl.apache.org/
BuildRoot: %{_tmppath}/%{name}-root
Requires: httpd >= 1.3.27-4, perl >= %{perlver}
BuildPrereq: httpd-devel >= 1.3.27-4, perl
Prereq: perl

%description
Mod_perl incorporates a Perl interpreter into the Apache web server,
so that the Apache web server can directly execute Perl code.
Mod_perl links the Perl runtime library into the Apache web server and
provides an object-oriented Perl interface for Apache's C language
API.  The end result is a quicker CGI script turnaround process, since
no external Perl interpreter has to be started.

Install mod_perl if you're installing the Apache web server and you'd
like for it to directly incorporate a Perl interpreter.

%prep
%setup -q

%build
# Compile the module.
perl Makefile.PL \
        USE_APXS=1 WITH_APXS=/usr/sbin/apxs PERL_USELARGEFILES=0 \
        EVERYTHING=1 USE_EAPI=0 CCFLAGS="$RPM_OPT_FLAGS -fPIC -DEAPI"
make

make test

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make pure_install INSTALLDIRS=vendor PREFIX=$RPM_BUILD_ROOT%{_prefix}

# Install the module
install -c -m 755 apaci/libperl.so /usr/lib/apache/


#Install its manual
mkdir -p /var/www/html/manual/mod/mod_perl
install -c -m 644 htdocs/manual/mod/mod_perl.html \
        /var/www/html/manual/mod

make -C faq
rm faq/pod2htm*
install -m644 faq/*.html /var/www/html/manual/mod/mod_perl/


# Remove the temporary files.
find $RPM_BUILD_ROOT%{_libdir}/perl?/vendor_perl/*/*/auto -name "*.bs" |
xargs rm

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc Changes INSTALL LICENSE README docs
#%{contentdir}/manual/mod/*
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
%{_libdir}/httpd/modules/mod_perl.so
%{_libdir}/perl?/vendor_perl/*/*/auto/*
%{_libdir}/perl?/vendor_perl/*/*/Apache
%{_libdir}/perl?/vendor_perl/*/*/Apache2
%{_libdir}/perl?/vendor_perl/*/*/Bundle/*
%{_libdir}/perl?/vendor_perl/*/*/APR
%{_libdir}/perl?/vendor_perl/*/*/ModPerl
%{_libdir}/perl?/vendor_perl/*/*/*.pm
%{_mandir}/*/*.3*




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux