<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    05.09.2011 19:17, TASAKA Mamoru wrote:
    <blockquote cite="mid:4E64E81D.5090008@fedoraproject.org"
      type="cite">(Well, as you posted your first mail to fedora devel
      list, please
      <br>
      &nbsp;keep sending your reply also to devel list. This type of private
      <br>
      &nbsp;mails will be very confusing to many people who are also watching
      mailing
      <br>
      &nbsp;list because they cannot know what is currently discussed.
      <br>
      <br>
      &nbsp;Would you tell me why you replied to my mail privately, although
      <br>
      &nbsp;I posted to devel list? This time I will mail to you privately,
      however
      <br>
      &nbsp;unless you have some special reason next
      <br>
      &nbsp;time I will want to post my mail also to devel list so that
      people can
      <br>
      &nbsp;see current discussion)
      <br>
    </blockquote>
    Mamoru, thank you very much for the answers. And excuse me - it was
    mistake. Now I answer in list.<br>
    <blockquote cite="mid:4E64E81D.5090008@fedoraproject.org"
      type="cite">
      <br>
      First:
      <br>
      * php-devel is not installed when trying to package srpm from spec
      and sources. This is
      <br>
      &nbsp; what koji (build server) always does. i.e. koji tries to package
      srpm first, at that time
      <br>
      &nbsp; only minimum buildroot packages are installed. Then after srpm
      is successfully packaged,
      <br>
      &nbsp; koji (yum) installs additional packages specified by
      BuildRequires. After that koji will
      <br>
      &nbsp; actually try to build binary rpms from the spec file.
      <br>
      <br>
    </blockquote>
    No, in this case it was scratch build, so initially srpm was
    submitted.<br>
    <blockquote cite="mid:4E64E81D.5090008@fedoraproject.org"
      type="cite">&nbsp; So you must ensure that your srpm can successfully
      packaged even if none of packages
      <br>
      &nbsp; in BuildRequires are installed (and only minimum buildroot
      packages are installed).
      <br>
      <br>
      * Then looking at your spec file, there are actually two issues
      which prevents srpm
      <br>
      &nbsp; from being properly packaged.
      <br>
      <br>
      1. The line 63
      <br>
      <br>
      &nbsp;&nbsp; %if %( php -r 'echo version_compare(PHP_VERSION, "5.3.0",
      "&gt;=") ? 1 : 0;' )
      <br>
      <br>
      &nbsp;&nbsp; cannot be parsed when php is not installed (again, when koji
      first tries to package
      <br>
      &nbsp;&nbsp; srpm, BuildRequires rpms are not installed yet). The correct
      line would be something
      <br>
      &nbsp;&nbsp; like:
      <br>
      <br>
      &nbsp;&nbsp; %if %( which php &amp;&gt;/dev/null &amp;&amp; php -r 'echo
      version_compare(PHP_VERSION, "5.3.0", "&gt;=") ? 1 : 0'|| echo -n
      0 )
      <br>
      <br>
      &nbsp;&nbsp; However please reconsider if you really want this complicated
      line.
      <br>
    </blockquote>
    This line needed and I don't see any problems with it:<br>
    which php &amp;&gt;/dev/null &amp;&amp; php -r 'echo
    version_compare(PHP_VERSION, "5.3.0", "&gt;=") ? 1 : 0'|| echo -n 0<br>
    <br>
    always should return with 0 exit status and produce only 0 or 1 as
    result, even if php not installed.<br>
    <br>
    <blockquote cite="mid:4E64E81D.5090008@fedoraproject.org"
      type="cite">
      <br>
      2. The line 28
      <br>
      <br>
      &nbsp;&nbsp; %if %{?php_zend_api}0
      <br>
      <br>
      &nbsp;&nbsp; cannot be parsed when %php_zend_api is not integer (and this is
      actually happening
      <br>
      &nbsp;&nbsp; currently). The correct line would be something like
      <br>
      <br>
      &nbsp;&nbsp; %if 0%{?php_zend_api?1:0}
      <br>
      <br>
      &nbsp;&nbsp; however it seems this line is no longer needed on Fedora:
      <br>
      &nbsp;&nbsp;
<a class="moz-txt-link-freetext" href="http://fedoraproject.org/wiki/Packaging:PHP#C_extensions_.28PECL_and_others.29">http://fedoraproject.org/wiki/Packaging:PHP#C_extensions_.28PECL_and_others.29</a><br>
    </blockquote>
    It stil needed for EPEL
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a
href="http://fedoraproject.org/wiki/Packaging:EPEL#PHP_ABI_Check_Handling">http://fedoraproject.org/wiki/Packaging:EPEL#PHP_ABI_Check_Handling</a>
    and exactly in this form<br>
    <blockquote cite="mid:4E64E81D.5090008@fedoraproject.org"
      type="cite">
      <br>
      Regards,
      <br>
      Mamoru
      <br>
      <br>
      &nbsp; <br>
      &nbsp;&nbsp; <br>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>