Stuart Children wrote:
I do have some improvements to the current spec file which are generic - I'll post a patch against CVS later today.
Unified diff attached. Some explanation and some questions:
a) Is there a reason name, version, and release were being set with %define rather than just setting the tags themselves? The cvs log doesn't offer any clues that I could spot. I can see some people prefering it visibility, but it seems pointless to me. My diff removes this.
b) I've removed the Packager tag. It's not a good idea to have this in the CVS version as people might download e and create their own packages with that information in there - which may lead to confusion (obviously if they want to do this deliberately you can't stop them, though signing packages helps). People actually creating packages should set this tag in their ~/.rpmmacros.
c) ftp.enlightenment.org is dead - so I've updated the source URL to point to sourceforge.
d) I've added required build dependencies.
e) I've stopped the INSTALL file being installed with the other docs - it's a bit pointless for people using binary RPMs. Those who do want to see that information can look at the SRPM which obviously contains it in the original tarball. I've made the ChangeLog file be installed. [1]
[1] On that note, CVS contains a file called "COMPLIANCE". This has the tag-e16_7-pre1 tag but is not in the enlightenment-0.16.7-0.56.tar.gz that's on sourceforge. Should it be? If so then that file also needs to be added to the docs.
f) I've removed the Docroot tag. I don't think it's needed, but it's possible that it's there for some other distro/old rpm version - can anyone confirm?
g) I've moved %changelog to the end - so that as it grows it doesn't obscure other parts of the spec file.
h) I've changed BuildRoot to use %{_tmppath} and %(%{__id_u} -n) - the latter prints out your username. This is a recommendation in the packaging guidelines for fedora.us. However, I'm not sure whether all distros have the _tmppath macro, or which versions of rpm support the latter bit. So I'd appreciate it if anyone can point out any distributions this fails on. My version allows packages to specify where packages get built (ie: it doesn't have to be /tmp) and adds protection against clashes simultaneously building different releases of the same package.
I hope that all makes sense. Please feel free to reject any parts of the changes. Some of these things may well be deemed too specific and I don't mind keeping them in a custom spec file. However, if they are of general benefit then they should go back into CVS.
If you want to be very cautious about anything which may stop this compiling on old rpms etc, then I would nominate f) and h) as being the risky parts. However, unless anyone objects then I'd say make the changes and if problems are discovered later they can easily be fixed. It would only be an issue for people who are compiling RPMs themselves.
One other issue - someone can install the enlightenment RPM and not have a working WM because they don't have a theme installed. I don't like this very much. My prefered solution would be to create a very lightweight (in terms of size) and visually simple theme, include this with enlightenment itself, and make it the default theme. Any artists up for this?
Alternatively from a packaging perspective we could either add the default theme (currently BrushedMetal-Tigert) to the enlightenment package (ie: include both tarballs within the SRPM), or make the enlightenment package depend on the default theme package.
That will do for now. :) Comments welcome. Once I've got feedback on the above then I'll provide patches against the other spec files as appropriate.
I have a session file around that will add enlightenment to the gdm session menu (though this is actually disabled in favour of switchdesk in Fedora at the moment - the "proper" functionality is enabled in RH9 IIRC). I'll post that later too.
Run out of time for this and my sister's coming round for dinner tonight so I'll do that tomorrow.
Cheers
-- Stuart
spec.diff.gz
Description: GNU Zip compressed data