[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Beginner (me) needs help with specfile...



Hi all! :)
 I've written a small game for GNOME, and I'm trying to make a RPM of it.
I'm just a beginner with auto[make|conf] and RPM, and I have a problem I'm
not able to solve.

In my game I use some pixmaps, and I want them to be installed in
${prefix}/share/gnomermind/themes/. Well, I entered this in my
src/Makefile.am:

INCLUDES = -I$(top_srcdir) -I$(includedir) $(GNOME_INCLUDEDIR) \
         -DG_LOG_DOMAIN=\"GnomerMind\" -DGNOMELOCALEDIR=\""$(prefix)/share/l
ocale"\" \
 -DTHEMESPATH=\""$(prefix)/share/gnomermind/themes/"\" \
 -I../intl -I$(top_srcdir)/intl

and then, in the program, I use the variable THEMESPATH to retrieve the
files. All ok. But, when I make an RPM, somehow the variable ${prefix} is
passed to the compiler as relative to the temporary dir; so the RPM'd
program searchs for the pixmaps in
/var/tmp/gnomermind-0.5.0-root/usr/share/gnomermind/themes/; BUT they're
correctly installed  in /usr/share/gnomermind/themes... I just can't figure
why this difference! Or, better, I see that line

make prefix=$RPM_BUILD_ROOT/usr

but if I change it, nothing works!! how can I correct this? This is my
specfile.
 Thank you very much in advance,
  Mano :))

Summary:   [...]
Name:      gnomermind
Version:   0.5.0
Release:   1
Copyright: GPL
Group:     Amusements/Games
Source:
http://download.sourceforge.net/gnomermind/%{name}-%{version}.tar.bz2
URL:       http://gnomermind.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires:  gdk-pixbuf >= 0.7.0
Prefix:    /usr
Packager:  Mano <mano78@users.sourceforge.net>

%description
[...]

%prep
%setup
if [ ! -f configure ]; then
   CFLAGS="$RPM_OPT_FLAGS" ./configure  \
        $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir}
else
   CFLAGS="$RPM_OPT_FLAGS" ./configure    \
        $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir}
fi

%build

%install
rm -rf $RPM_BUILD_ROOT

make prefix=$RPM_BUILD_ROOT/usr

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc README ChangeLog AUTHORS NEWS TODO COPYING

%attr( 0755, root, root ) %{prefix}/bin/*
%attr( 0644, root, root ) %{prefix}/share/locale/??/LC_MESSAGES/*
%attr( 0644, root, root ) %{prefix}/share/pixmaps/gnomermind.png
%attr( 0644, root, root ) %{prefix}/share/gnomermind/themes/classic/*
%attr( 0644, root, root )
%{prefix}/share/gnome/apps/Games/gnomermind.desktop

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Questa non è una lettera da mettere da
 parte con leggerezza.Bisogna scagliarla
 via con grande forza.
        --Dorothy Parker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Germano Rizzo - mano@ciaoweb.it
http://mano.interfree.it
http://www.bdp.it/~veee0001/
http://gnomermind.sourceforge.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []