OpenTTD

Tasklist

FS#3375 - rpm spec: rewrite

Attached to Project: OpenTTD
Opened by Ammler (Ammler) - Tuesday, 15 December 2009, 12:12 GMT
Last edited by Remko Bijker (Rubidium) - Thursday, 17 March 2011, 20:47 GMT
Type Work in progress
Category Build system
Status Closed
Assigned To No-one
Operating System Linux
Severity Low
Priority Normal
Reported Version other
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Versin 0.7.4 and further...

After a little chat with skidd, I rewrote the most of the spec
- splitted into binary and data package
- removed distor specific destop file creation
- added support for dedicated binary

This spec does build at OBS for all distos:
http://download.opensuse.org/repositories/home:/openttdcoop/

One little glitch remains:
-The KDE Menu Icon seems not to update, but it could be KDE bug itself, happens also with other rpms. I have some open discussion in this matter...

Anyway, here is what I have so far.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Thursday, 17 March 2011, 20:47 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r22256
Comment by Ammler (Ammler) - Tuesday, 15 December 2009, 12:50 GMT
The sizes of the 256er Icon don't match the specs, here is a fixed one, but the filesize is half from the original, so you might make it self...

comment from rpmlint:
openttd-nightly.x86_64: W: wrong-icon-size /usr/share/icons/hicolor/256x256/apps/openttd-nightly.png expected: 256x256 actual: 256x248
Your icon file is installed in a fixed-size directory, but has a largely
incorrect size. Some desktop environments (e.g. GNOME) display them
incorrectly.
Comment by Ammler (Ammler) - Tuesday, 15 December 2009, 13:47 GMT
Explaination to removal of tag version:
> desktop-file-validate openttd.desktop
openttd.desktop: error: value "1.1" for key "Version" in group "Desktop Entry" is not a known version

also quote from spec:
"Note that the version field is not required to be present."

The Suse Translation tag doesn't hurt other distros and is needed by some suse versions. (It does tell the translator group, if they need to translate the file)

the Icon tag could also be changed to
Icon=!!TTD!!
Comment by Ammler (Ammler) - Wednesday, 16 December 2009, 23:25 GMT
The KDE Menu glitch is a "feature" because there was only one Entry in the category strategy it showed it directly there, if you have more games there it works as it should.
Comment by Benedikt Brüggemeier (skidd13) - Thursday, 17 December 2009, 15:36 GMT
Hi Ammler,

let me see...

openttd.desktop:
- remove of Version is ok IMO
- suse stuff is a bit fishy to me. I wanted a clean thing, when I wrote the desktop file generation.
But it seems that standards between the distros even with X.org standards will be hard to achive.
Again you got my go ;) ... Maybe there is a better solution in the future.

openttd.256.png:
- I agree

openttd.spec:
- The dedicated thing needs a bit rework. It's hard to see where it works. IMO a bit hackish solution!
Maybe there is a way to place the if's better and intent the code a bit nicer. ;)

- "# for 0.8.0
#Recommends: openttd-data-opensfx"
<- We don't need it ATM

- "Patch0: desktop-fix.diff"
"%patch0"
"rm %{buildroot}/%{_datadir}/icons/hicolor/256x256/apps/%{binname}.png"
"#%{_datadir}/icons/hicolor/256x256/apps/%{binname}.png"
<- Remove the patch thing it's not needed when the fix is applied

- "%setup -qn openttd-%{srcver}·"
"- upstream update·"
"- disable libicu for RHEL4·"
<- a space at the EOL

- "--doc-dir="share/doc/%{binname}" \"
and
"--menu-group="Game;StrategyGame;" \"
<- Why intention with space not tab like all others?

- "%define »·······do_makedepend»··0"
<- mixed intention

The file needs a some further work... mainly fine tuning ;)
After all I prefer spaces instead of tabs for intention.
Clarify the dedicated switch and remove the patch.

Nice work after all ;)
Comment by Ammler (Ammler) - Thursday, 17 December 2009, 21:23 GMT
Thanks skidd for the fast feedback, did you check my link ( http://download.opensuse.org/repositories/home:/openttdcoop/ ), it has rpms for

CentOS 5
Fedora 10-12
RHEL 4/5
Mandriva 2009-2010
openSUSE 11.0-11.2 and Factory
SLE(S) 9-11

I fully agree for the "fine tuning", didn't really care for white spaces, yet.
The patch of course are there because as said, I have it already working on the mentioned Distros.

Greets
Ammler

Edit: the current running versions are here: http://obs.openttdcoop.org/specs/
Comment by Ammler (Ammler) - Thursday, 17 December 2009, 23:09 GMT
I wonder, if it would also make sense to support testing releases and nightlies...
Comment by Ammler (Ammler) - Friday, 18 December 2009, 17:35 GMT
desktop-fix.diff updated and the spec should now also easy work with branches and trunk.
http://obs.openttdcoop.org/specs/openttd/openttd.spec
http://obs.openttdcoop.org/specs/openttd/desktop-fix.diff
Comment by Remko Bijker (Rubidium) - Monday, 04 January 2010, 11:11 GMT
Sorry, but... removing a field that is described in the spec and adding one that isn't is just wrong. Especially because the spec says that unsupported items should be ignored, so there is absolutely no reason to remove a field.

Furthermore applying such a pointless diff in the specs feels wrong. Either use OpenTTD as it is, or don't provide the RPM spec.

Also it's only mentioning OpenGFX, not OpenSFX. The spec seems to become quite complex now. Makedepend isn't needed, so let it autodetect.

Maybe it works, but it doesn't look pretty at all.
Comment by Ammler (Ammler) - Monday, 04 January 2010, 11:23 GMT
Yeah, I guess, it isn't very useful to make a generic spec, applying patches and disto specific install scripts is just the way it works...
Comment by Ammler (Ammler) - Tuesday, 23 February 2010, 11:55 GMT
- changed the desktop-fix.diff and removed distro specific things
- removed the Makedepend detection, seems fixed now

Comment by Ammler (Ammler) - Tuesday, 02 March 2010, 16:55 GMT
I add the spec files to the ticket to end the WIP :-)

The whole project consist of a bit more than that, e.g. lzo2 for old distros or all the sub packages for development and data.

You are very well welcome to join the project at OBS, it does build for all better known rpm or debian based distros. (debian isn't prepared by me)
https://build.opensuse.org/project/show?project=home%3Aopenttdcoop
Repos: http://download.opensuse.org/repositories/home:/openttdcoop/
A checkout is available at our vserver: http://obs.openttdcoop.org/specs/
Comment by Ammler (Ammler) - Thursday, 18 March 2010, 19:35 GMT
Suse isn't the only distro not knowing about version 1.1, also Fedora does patch that part.
Comment by Ammler (Ammler) - Thursday, 27 May 2010, 14:08 GMT
Data here is quite soon outdated, please visit https://build.opensuse.org/project/show?project=home%3Aopenttdcoop
it allows anonymously public access now.
Comment by Ammler (Ammler) - Sunday, 06 March 2011, 10:46 GMT
a diff to make your live easier, please update the very ugly current version
this is for branch 1.1
Comment by Ammler (Ammler) - Sunday, 06 March 2011, 11:22 GMT
little typo

Loading...