On Tue, 16 Jun 2009 02:03:57 +0300
Manuel Wolfshant <wolfy(a)nobugconsulting.ro> wrote:
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.
>
> 1. 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
> 2. 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.
> 3. 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
Orcan and Manuel,
Thank you both for the excellent suggestions. I have incorporated all
of your suggestions on the macros, timestamp preservation, and reworked
the patch for MANDIR so it's something I can send upstream.
Many thanks again for the helpful advice.
--
Chess Griffin