mingw32-physfs.spec

Richard W.M. Jones rjones at redhat.com
Tue Mar 10 12:25:04 UTC 2009


On Mon, Mar 09, 2009 at 08:34:46PM -0400, Michael [Plouj] Ploujnikov wrote:
> I'd like to show you guys my mingw32-physfs.spec file that I created
> for cross-compiling a game which uses PhysicsFS
> (http://icculus.org/physfs/). The main reason for this e-mail is to
> that I would get some comments about whether I'm on the right track
> and suggestions as to what I should do next to get physfs included
> with the other mingw32 packages. First of all, I have to say that I
> was successful in compiling and playing the game using physfs built
> from my .spec file.

Thanks for posting this.

> Here are some specific questions I have already:
> Should I deal with file-not-utf8 warnings from rpmlint? How?

The easiest thing is usually to do something like this in the %prep
stage:

  mv PROBLEM-FILE PROBLEM-FILE.old
  iconv -f ISO-8859-1 -t UTF-8 < PROBLEM-FILE.old > PROBLEM-FILE

You'll probably want to read the manpage for iconv to understand what
that is doing.

> Which .spec file should I base mine off of? I based mine on the
> processed version of
> http://hg.icculus.org/icculus/physfs/file/8badfbbb3b27/physfs.spec.in
> . However, I found slightly different versions of this in official
> Fedora repositories:
> http://cvs.fedoraproject.org/viewvc/rpms/physfs/F-10/physfs.spec?revision=1.7
> and http://cvs.fedoraproject.org/viewvc/rpms/physfs/devel/physfs.spec?revision=1.9
> .

Whatever works for you.  In general we aim to keep in synch with the
versions and patches that are in the Fedora native package.
(Assuming, as in this case, that there is a Fedora native package).
The reason for this is just in case there are security errata which
turn up for the native package, it's far easier to apply them to the
mingw32 package.  Also it means that bugs and QA will be applicable.

> How should the description be changed?
> 
> What exactly should I put in the changelog?

In the %description, put some English text that describes the package.
Copy it from the native Fedora package if you want.  Current
description looks fine to me.

Create a new %changelog entry every time you update the spec file.

> Is it OK to hardcode the platform in this part of the spec:
> %{_mingw32_bindir}/i686-pc-mingw32-test_physfs.exe ?

Yes, that's fine.

> Again, please feel free to give me any other comments suggestions.

In general, there are no problems at all.  I'll give some specific
issues below.

> Source:		physfs-%{version}.tar.gz

This should be the URL of the source file, if there is one.

> BuildRoot:	%{_tmppath}/physfs-%{version}

This should be:

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

> %{_mingw32_configure} --prefix=/usr

You don't need '--prefix=/usr'.  The _mingw32_configure macro already
includes that.

> %changelog
> * Thu Mar 5 2008 Michael Ploujnikov <ploujj at gmail.com>
> - initial attempt at mingw32 cross-compilation in Fedora10

2009, not 2008!

Next step is to create a review request for this package, so that it
can be included in the next release of Fedora.  See the instructions
here:

http://fedoraproject.org/wiki/PackageMaintainers/Join

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/



More information about the mingw mailing list