> A better approach if you care about readability is to stop trying to use
> one spec across everything. You don't need any
> %if clauses at all if you do that.
Well, I have not yet even written anything new to the spec file. This is a fork
of an official Fedora package, and I'm still trying to
On Wed, Jan 13, 2016 at 06:35:08PM -0600, Jason L Tibbitts III wrote:
> > "AT" == Andrew Toskin writes:
>
> AT> Is there a way to convert tags like "BuildRequires:" into %macros so
> AT> that they *can* be indented?
>
> Sure there is, but please don't actually try to do that in Fedora
>
> "AT" == Andrew Toskin writes:
AT> Is there a way to convert tags like "BuildRequires:" into %macros so
AT> that they *can* be indented?
Sure there is, but please don't actually try to do that in Fedora
packages. There are cases where such things might be easier to read,
but in general
On 13/01/16 23:19 -, Andrew Toskin wrote:
Is there a way to convert tags like "BuildRequires:" into %macros so that they
*can* be indented?
That would be highly unconventional, and so unlikely to make the .spec
file easier to follow.
If it's really a problem you could use comments:
%if %
That's unfortunate. The spec file I've forked has certain tags *inside* of %if
blocks. Things like this:
%if %{?system_cairo}
BuildRequires: pkgconfig(cairo) >= %{cairo_version}
%endif
In some of the longer blocks, no indentation makes it much harder to tell where
the %if begins and ends.
Is
On Wed, 13 Jan 2016 06:18:31 -, Andrew Toskin wrote:
> > error: line 102: Unknown tag: Source1: firefox-45.0a2.tar.bz2
>
> ...and removing the leading whitespace removes the error.
If you test with elemental tags, such as Name, Version and Release, you
can observe that they are not recogni
On 01/13/2016 08:24 AM, Luya Tshimbalanga wrote:
> In general, leading whitespace is only allowed when making conditional
> statement or using backslash like these following examples:
>
> --- Example #1 ---
> %if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
> --vendor="fe
On 12/01/16 10:18 PM, Andrew Toskin wrote:
> I'm new to RPM packaging. I've recently forked a repository, and one of the
> first things I tried to do was clean up formatting of the .spec file.
> Particularly the %if blocks were hard to follow because the previous author
> did not use any indenta
I'm new to RPM packaging. I've recently forked a repository, and one of the
first things I tried to do was clean up formatting of the .spec file.
Particularly the %if blocks were hard to follow because the previous author did
not use any indentation at all. However, it seems like maybe indentati