[Fedora-packaging] Makefile questions

Chess Griffin chess at chessgriffin.com
Tue Jun 16 00:57:19 UTC 2009


On Tue, 16 Jun 2009 02:03:57 +0300
Manuel Wolfshant <wolfy at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20090615/6a222aef/attachment.sig>


More information about the Fedora-packaging mailing list