On 06/16/2009 01:35 AM, Chess Griffin wrote:
Hello-
I am familiar with packaging for other *nixes but this is my first RPM attempt and I have a couple of questions. I have read the various packaging docs on the Fedora Project site, but have been unable to find a precise answer. If there is another document to read or another list where I should be directing these questions, please let me know.
- The Makefile sets PREFIX to /usr/local. In %install, is it ok
to use:
make install PREFIX=/usr DESTDIR=$RPM_BUILD_ROOT
yes, it is perfect
- The Makefile also attempts to install and set user/group ownership
and permissions, i.e. it does 'INSTALLBIN= install -g bin -o root -m 555'. Is it ok to address this by patching the line so it reads 'INSTALLBIN= install' seeing as how ownership and permissions are later set in %files?
Better option is to use "install -p", in order to preserve any timestamps that might be otherwise affected.
- Similarly, the Makefile also hardcodes the manpage directory, i.e.
in install, it has: '$(INSTALLDIR) $(DESTDIR)$(PREFIX)/man/man1. Again, is it ok to patch this line so it reads '$(INSTALLDIR) $(DESTDIR)$PREFIX/share/man/man1'?
rpm defines a macro named %_mandir: [wolfy@wolfy2 ~]$ rpm -E "%_mandir" /usr/share/man In your case the patch should insert $(DESTDIR)/%_mandir/man1