Excerpts from Alexander Todorov's message of 2014-12-29 19:07 +10:00:
1) Provide a {% end FAMILY OS_MAJOR %} tag which will insert the
closing %end (for %packages or %pre/%post) if needed. This will be
implemented as a Jinja extension.
This is one of the "distro feature variables" already mentioned: end. It
expands to %end if supported or else empty string. In the server
templates we use it like this:
%post
something
{{ end }}
--
Dan Callaghan <dcallagh(a)redhat.com>
Software Engineer, Hosted & Shared Services
Red Hat, Inc.