apache - Building custom RPM but the package is empty? -


i trying build rpm compiled version of apache. want rpm build in /opt/apache.... able create rpm file when rpm -qpl on file shows empty.

here spec file:

name:           custom-http version:        2.2.25 release:        1%{?dist} summary:        custom build of apache  license:        na url:            http://x.x.x.x:/repo2 source0:        http://x.x.x.x:/repo2/httpd-2.2.25.tar.gz  buildrequires:  xfce4-dev-tools apr-util openssl-devel  %description custom compiled version of apache version 2.2.25  %prep %setup -n httpd-2.2.25  %build ./configure --disable-rpaths --with-included-apr --enable-mods-shared=all --with-mpm=prefork --enable-ssl --prefix=/opt/apache --enable-so  make %{?_smp_mflags}  %install make install  %clean  %files  %doc  %changelog * thu jan 30 2014 name <email address> - first attempt 

~

first, need install files buildroot when doing make install, since don't want files installed in actual filesystem root when building package. means have replace make install make install destdir=%{buildroot}, can write %make_install (to see macro expands to, can rpm -e <macro>, i.e.

$ rpm -e %make_install /usr/bin/make install destdir=$home/rpmbuild/buildroot/%{name}-%{version}-%{release}.x86_64 

).

then, ignacio vazquez-abrams said, need populate %files section. find out have write there, build tarball, install in temporary directory (using destdir when calling make install), , list installed files. read i.e. [1] more on this.

other notes:

  • %doc belongs %files section (judging spacing added around %doc, not clear whether aware of this).
  • %clean not necessary anymore if targeting recent rpm distro (i.e. fedora > f13, rhel >= 6).

[1] http://fedoraproject.org/wiki/how_to_create_an_rpm_package#.25files_section


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -