Paul Smith wrote:
On 6/11/06, Thomas Cameron <thomas.cameron@xxxxxxxxxxxxxxx> wrote:
> I am trying to learn how to build a rpm from the tarball without
> checkinstall, and I am wondering whether there is already a program to
> produce a tentative spec file to be afterwards changed and corrected
> by the packager. Maybe a program like the one that I describe here
> would increase the productivity of packager. Is there such a program?
Many times I just use the template at http://www.rpm.org/howto/thefight/
and go from there. It has worked for pretty much every RPM I've ever
had to build.
To find out what the list of files is, I usually do the standard dance
of:
./configure --prefix=/usr
make
make install DESTDIR /var/tmp/foo
then I do
cd /var/tmp/foo
find . -type f | sed "s/^\.//" >> /path/to/specfile
Go back and move the files into the right section of the spec file you
are creating and then go to town.
Thanks to all. I have just done the following:
./configure --prefix=/usr
make
su
make install DESTDIR=/var/tmp/videotrans
cd /var/tmp/videotrans
but the directory /var/tmp/videotrans is empty!
Strange, is not it?
Not really. Perhaps the package you're building does not support DESTDIR
in the Makefile. You shouldn't do "su" before the "make install" by the
way. One of the points of installing the files into a buildroot such as
/var/tmp/videotrans is that you don't need to be root to do it, and in
the event of there being an issue with the install process, such as it
not supporting DESTDIR properly, running it as non-root means you won't
clobber any existing root-owned files when you try the install. It is
unfortunately too late in this case.
You shouldn't need to bother using find etc. to create the files list.
Just leave it empty and try the rpm build. By default, rpmbuild will
complain about installed files not included in the files list, and will
tell you the path to each one of them, which saves you the trouble of
having to do it yourself. You shouldn't just append this list of files
as the files list either, as you'll end up with "unowned directories" -
the files list should include any directory that is not part of the
filesystem package or is not included in any of the packages that your
package requires. Otherwise you'll get directories left behind if the
package is erased.
Paul.