gnome-core 1.4.0



The spec file in gnome-core 1.4.0 is still broken. I talked with someone
about this on IRC who said that it was going to be fixed in the next
release, but no it wasn't. I have been doing my own spec files for years
anyways and I have been sending fixes to the gnome-devel list, but must of
the times my fixes have been ignored. So I stoped sending them a year ago
or something.

There is several problems in the spec file.

*** It uses both "%configure" and "make install". Either you should use
"configure" and "make install" or you use "%configure" and "%make install"

I simply changed the %configure to:

./configure --quiet --disable-gtkhtml-help --prefix=%{_prefix} --sysconfdir=%{sysconfdir} --localstatedir=/var/lib

*** The list of files to include in the package are over-engneered (and
VERY broken). There is a whole bunch of functions that are supposed to
find all the files that are going to be installed but it never works. And
when you change the gnome-core and some other files shall be included you
now have to change these functions. For example, one of the functions
looks like:

function BuildFiles() {
  ProcessBin
  ProcessLang
  for i in `find $RPM_BUILD_ROOT%{_prefix}/share -maxdepth 1 -type d -print | \
     sed "s:^$RPM_BUILD_ROOT%{_prefix}/share::g"` ; do
    echo $i
    case $i in
     /applets|/control-center|/gnome|/gnome-about|/mc|/panelrc|/pixmaps)

         ProcessDir $RPM_BUILD_ROOT%{_prefix}/share$i %{name}.files "0444, bin, bin, 0555"
         ;;
     *)
         ;;
   esac
  done
  ProcessDir $RPM_BUILD_ROOT/etc %{name}.files "0444, bin, bin, 0555"
  ProcessLib $RPM_BUILD_ROOT%{_prefix}/lib runtime %{name}.files
  ProcessDir $RPM_BUILD_ROOT%{_prefix}/share/idl %{name}-devel.files "0444, bin, bin, 0555"
  ProcessLib $RPM_BUILD_ROOT%{_prefix}/lib devel %{name}-devel.files
  ProcessDir $RPM_BUILD_ROOT%{_prefix}/include %{name}-devel.files "0444, bin, bin, 0555"
}

See. There is a lot of references to the install tree here. And you have
to change these functions more or less every time something changes. At
least you have to check that it still works. In this case there are many
files missing, the gnome-terminal glade file, the files in
share/omf/gnome-core/ is missing, and so on...

It's much simpler to build build up the file list with globs. I have a
list looking something like below. And this also works in most cases when
you add something, so the functions really dont give you anything new. I
use the user root instead of bin, but that has nothing to do with my
argument.

%files
%defattr(-, root, root)

%doc AUTHORS COPYING ChangeLog NEWS README
%config %{sysconfdir}/CORBA/servers/*.gnorba
%config %{sysconfdir}/sound/events/*.soundlist
%{_prefix}/lib/lib*.so.*
%{_prefix}/bin/*
%{_prefix}/share/applets/*/*
%{_prefix}/share/control-center/*/*
%{_prefix}/share/gnome/apps
%{_prefix}/share/gnome/default.session
%{_prefix}/share/gnome/default.wm
%{_prefix}/share/gnome/help/*
%{_prefix}/share/gnome/hints/*
%{_prefix}/share/gnome/html/*
%{_prefix}/share/gnome-about
%{_prefix}/share/gnome-terminal
%{_prefix}/share/omf/gnome-core
%{_prefix}/share/locale/*/*/*
%{_prefix}/share/mc/*
%{_prefix}/share/pixmaps/*
%{_prefix}/man/*/*

%files devel
%defattr(-, root, root)

%{_prefix}/include/*

%{_prefix}/lib/lib*.so
%{_prefix}/lib/*.la
%{_prefix}/lib/*.a
%{_prefix}/lib/*.sh

%{_prefix}/share/idl/*

-- 
/Dennis


_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




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