Menu

#7 Some things are installed to the wrong places

open
nobody
None
5
2008-07-04
2008-07-04
Paul Wise
No

Please make this:

./configure --prefix=/usr

Install to the following locations:

/usr/games/xgalaga
/usr/games/xgalaga-hyperspace
/usr/lib/games/xgalaga/xgal.sndsrv.oss
/usr/share/games/xgalaga/CREDITS
/usr/share/games/xgalaga/levels
/usr/share/games/xgalaga/sounds
/usr/share/pixmaps/xgalaga-icon.xpm
/usr/share/applications/xgalaga.desktop
/usr/share/applications/xgalaga-hyperspace.desktop
/usr/share/man/man6/xgalaga.6x.gz
/usr/share/man/man6/xgalaga-hyperspace.6x.gz (symlink)

Switching to automake will give you some of this, most of the rest would be done by these few lines:

configure.in:

AC_SUBST([bindir], ['${exec_prefix}/games'])
AC_SUBST([datadir], ['${datarootdir}/games'])

Makefile.am:

dist_man_MANS = xgalaga.6

dist_icon_DATA = xgalaga.xpm
icondir = $(datarootdir)/pixmaps

dist_menu_DATA = xgalaga.desktop
menudir = $(datarootdir)/applications

Discussion

  • Paul Wise

    Paul Wise - 2009-08-23

    Please note that the AC_SUBST lines should not be used because they prevent customisation with ./configure --bindir --datadir.

     
  • Göran Uddeborg

    Göran Uddeborg - 2009-09-15

    And /usr/games is not very standard, is it? I would place the binaries in $(bindir), i.e. $(prefix)/bin by default. (Probably makes the conversion to automake simpler too.)

     
  • Paul Wise

    Paul Wise - 2009-09-16

    Yeah, I found that out the hard way, see my earlier comment. As long as bindir etc can be customised it is all good.

     

Log in to post a comment.