houghi wrote:
On Fri, May 05, 2006 at 01:11:40AM +0200, Carlos E. R. wrote:
It might be overkill if you just want to check out a program. I only use it for programs that I want to distribute to others. I never wrote a spec file, don't know how. Maybe I will one day if I intent to provide rpms for other people, but for my own use checkinstall is just perfect.
Sure. checkinstall is nice for just building RPMs to keep track of files, for your very own use. But don't, never, ever build RPMs with checkinstall if you plan to distribute them to other people. It will just lack the needed quality to be rebuildable on other architectures or other distribution versions (no BuildRequires, amongst others). Note that it's not worth much when you package a daemon, because you have to write SUSE-specific .init scripts, possibly a /etc/sysconfig file, a logrotate configuration, an rc-symlink in /usr/sbin, %pre/%post macros for stopping the service before removal or upgrade, etc... Also, you quite often have to patch sources (autotools or Makefile files) to make them work properly on 64bit installations: - use lib64 instead of lib, - use intptr_t instead of int for pointer arithmetics, - use CFLAGS/CXXFLAGS appropriately to be able to pass target specific flags and optimizations (including security stuff like -D_FORTIFY_SOURCE=2 with GCC 4.x on SUSE 10.0 upwards) - explicitely include headers like string.h for explicit memcpy, strcpy, etc.. prototypes (for having -D_FORTIFY_SOURCE actually verify allocations and access) instead of implicit prototyping With GNOME applications, you quite often have to provide %post hooks to inject gconf configurations at package installation time. With KDE you should use unsermake instead of make. And of course, you should always install files into the correct directories, which is not always trivial on SUSE as it uses e.g. /opt/gnome and /opt/kde3 instead of /usr like almost every other distribution does. So there are quite some gotchas involved to write good .spec files and good RPM packages that work on 32bit and 64bit, that are consistently rebuildable, integrate properly into the distribution, play nice with other packages, etc... That being said, it's definitely better to have software built from source in an RPM with checkinstall than just doing "make install" as root without tracking it. Just don't distribute those RPMs to others ;)
I was 'forced' with making the makeSUSEdvd rpm. Took me a while to get it right. Most likely it still is full of mistakes, but sofar no complaints.
If you need help or advice or would like an experienced packager to
have a look at it, just submit the spec to opensuse-packaging@opensuse.org
cheers
--
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\