I'm kinda anal about spec tidiness. That's one of things.
First in the header I like to order things like so:
Summary:
Name:
Epoch:
Version:
Release:
License:
Group:
Url:
Source0:
.
Patch0:
.
BuildRequires: always alphabetically ordered and I start with non devel
pkgs first, then foo-devel, pkgconfig(foo). Also, I always try to find out
if there is a pkgconfig provides for a foo-devel because this will save us
from a ton of headaches in the future. I saw that you have
BuildRequires:typelib(CDesktopEnums), this seems wrong, but I'm not
entirely sure.
whatever srpm produces that typelib, in the devel pkg it should have a
requirement for its own gir pkg. So correcting the problem there and not as
a BuildRequires.
.
Requires:
Suggests:
Obsoletes: By the way, AFB needs versioned obsoletes otherwise it could
possible remove the currently produced rpms.
If all the patches are at patch level 1, use %apply_patches instead of
listing all the patches to be applied individually.
Use %configure2_5x instead of %configure. I'm not entirely sure at the
moment, but I think --disable-static is already included in %configure2_5x,
you could check by running rpm --showrc and grepping for configure2_5x. I
know --disable-rpath is already included.
Use %make instead of make %{?_smp_mflags}, the V=1 is just for extra
verbosity.
I wonder if %makeinstall_std would work instead but you shouldn't use { }
on predefined macros in rpm.
$RPM_BUILD_ROOT should be replaced by %{buildroot}
this is unnecessary too, rpm automatically removes these for us.
# Remove .la file
rm -rf $RPM_BUILD_ROOT/%{_libdir}/cinnamon/libcinnamon.la
As far as I remember these are handled by filetriggers in rpm as well.
%postun
if [ $1 -eq 0 ] ; then
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi
%posttrans
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
and lastly,
this is fugly:
/usr/lib/ should be %{_prefix}/lib
You might wanna look at our originally spec too.
If this is a lot of info to digest, I can try to be more specific and clear.
Regards,
Matt
On Thu, Jan 23, 2014 at 1:53 PM, Roelof Wobben <[email protected]> wrote:
>
>
> ------------------------------
> Date: Thu, 23 Jan 2014 13:49:29 -0700
>
> From: [email protected]
> To: [email protected]
> Subject: Re: [OM Cooker] ask for revieuw
>
> There's a lot of messiness in that spec and old things that we wouldn't do
> in a more modern spec.
>
> So, the files listed twice means you need to specifically break out some
> directories in the %files section. I also see other problems like the
> Requires: foobar%, Idk what the % is for, nor have I ever seen it used like
> that.
> Oke,
>
> I can do that.
>
> I know my specs files are not up to standard.
> That is why I asked here and on bugzilla on someone who can help me and
> teach me how
> to make them wel.
>
> But appereantly no one wants to do the job of learning someone to make
> good spec files.
>
> Roelof
>
>
>
>
>