First, you need to install the files to the buildroot when doing make install
, since you don't want the files to be installed in the actual filesystem root when building the package.
This means that you have to replace the make install
with make install DESTDIR=%{buildroot}
, which you can also write simply as %make_install
(to see what a macro expands to, you can do rpm -E <macro>
, i.e.
$ rpm -E %make_install
/usr/bin/make install DESTDIR=$HOME/rpmbuild/BUILDROOT/%{name}-%{version}-%{release}.x86_64
).
Then, as Ignacio Vazquez-Abrams said, you will need to populate the %files
section. To find out what you have to write there, just do a build from the tarball, install it in some temporary directory (using DESTDIR
when calling make install
), and then list the installed files. Read i.e. [1] for more on this.
Other notes:
%doc
actually belongs to the%files
section (judging from the extra spacing you added around%doc
, it is not clear whether you are aware of this).%clean
is not necessary anymore if you are targeting a recent rpm distro (i.e. Fedora > F13, RHEL >= 6).
[1] http://fedoraproject.org/wiki/How_to_create_an_RPM_package#.25files_section