Changes between Version 31 and Version 32 of RpmHowToPackagers


Ignore:
Timestamp:
Feb 13, 2015, 7:51:18 PM (10 years ago)
Author:
dmik
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RpmHowToPackagers

    v31 v32  
    165165All output files will be written in the %HOME%\rpmbuild tree, regardless of current directory and drive.
    166166
     167== Handling documentation in Info format ==
     168
     169Many packages provide extended documentation in Info format (`.info` files in `/@unixroot/usr/share/info`). These `.info` files need special processing when the package is installed (and removed) so that the Info reader could properly find them. Many `.spec` files already contain the required commands but they need tailoring to OS/2. This tailoring is rather easy and consists of 3 steps.
     170
     1711. Fix the `Requires:` statements. You will usually find this in a `.spec` file:
     172{{{
     173#Requires(post): /sbin/install-info
     174#Requires(preun): /sbin/install-info
     175}}}
     176 Replace this block with these lines:
     177{{{
     178# @todo Replace with `%info_requires` when it's available.
     179Requires(post): %{_sbindir}/install-info.exe
     180Requires(preun): %{_sbindir}/install-info.exe
     181}}}
     182
     1832. Fix the post-install script. Replace lines looking like this:
     184{{{
     185%post
     186/sbin/install-info %{_infodir}/foobar.info %{_infodir}/dir 2>/dev/null || :
     187}}}
     188 with this:
     189{{{
     190%post
     191# @todo Replace with `%info_post foobar.info` when it's available.
     192if [ -f %{_infodir}/foobar.info ]; then
     193    %{_sbindir}/install-info.exe %{_infodir}/foobar.info %{_infodir}/dir || :
     194fi
     195}}}
     196
     1973. Fix the pre-uninstall script. Replace lines looking like this:
     198{{{
     199%preun
     200if [ $1 -eq 0 ]; then
     201  /sbin/install-info --delete %{_infodir}/help2man.info \
     202    %{_infodir}/dir 2>/dev/null || :
     203fi
     204}}}
     205 with this:
     206{{{
     207%preun
     208# @todo Replace with `%info_preun foobar.info` when it's available.
     209if [ $1 -eq 0 ]; then
     210    if [ -f %{_infodir}/foobar.info ]; then
     211        %{_sbindir}/install-info.exe --delete %{_infodir}/foobar.info %{_infodir}/dir || :
     212    fi
     213fi
     214}}}
     215
     216Note that the lines you insert contain a `@todo` block which you should leave in. It is to remind to replace these lines with simpler constructs when #119 is fixed.
     217
    167218== OS/2 specific notes ==
    168219While the syntax of .spec files is the same used under Unix, not everything is currently working in the OS/2 port. Also many packages are already built and manually installed: this means RPM is not aware of their presence.