[TRANSLATE] web/xml/packaging packaging.en.xml,1.71,1.72

Daniel Macks <[email protected]> Mon, 25 Jul 2005 13:04:27 -0400
Newsgroups gmane.os.apple.fink.i18n
Message-ID <[email protected]>
Modified Files:
	packaging.en.xml 
Log Message:
New perl-module policy: versioned pkg must not conflict, new manpage locations.


RCS file: /cvsroot/fink/web/xml/packaging/packaging.en.xml,v
--- packaging.en.xml	22 Jul 2005 16:18:48 -0000	1.71
+++ packaging.en.xml	25 Jul 2005 05:51:10 -0000	1.72
@@ -999,6 +999,95 @@
 the fink package is an XS module which has been installed in a non-versioned 
 directory, and will issue a warning if so.
 </p>
+<p>
+Users may have more than one version of perl installed at a time, so
+any perl-versioned module packages must be written to allow more than
+one version of themselves to be installed concurrently. One must use
+care when installing manpages and binary or other script executables
+in these packages in order to prevent installation conflicts due to
+filename collisions. As a simple solution for manpages, starting in
+March 2005, Fink has defined alternate locations in MANPATH:
+<filename>%p/lib/perl5/X.Y.Z/man</filename> for each perl-X.Y.Z. For
+example, to avoid conflicts between uri-pm581 and uri-pm586, the
+same-named <filename>URI.3pm</filename> manpage is installed
+as <filename>%p/lib/perl5/5.8.1/man/man3/URI.3pm</filename> and
+<filename>%p/lib/perl5/5.8.6/man/man3/URI.3pm</filename>,
+respectively. Note that the default scripts provided by <code>Type:
+perl X.Y.Z</code> have not changed, so you will have to locate the
+manpages here manually in your <code>InstallScript</code>. If you
+don't have a highly customized script, you can still use the default
+one, and then simply move the files manually:
+</p>
+<codeblock>
+%{default_script}
+mv %i/share/man %i/lib/perl5/5.8.1
+</codeblock>
+<p>
+That will move all manpages. If you wish to move only one section of
+manpages (for example, only section 3, the module manpages, not script
+manpages in section 1), a similar approach works:
+</p>
+<codeblock>
+%{default_script}
+mkdir -p %i/lib/perl5/5.8.1/man
+mv %i/share/man/man3 %i/lib/perl5/5.8.1/man
+</codeblock>
+<p>
+If you have executables, for example, demo or utility scripts
+in <filename>%p/bin</filename>, you have several options. One example
+is to put these files (and their associated manpages and/or other
+related files) in a %N-bin splitoff package. Use of
+<code>Conflicts</code> and <code>Replaces</code> fields ensures that
+installation of different perl-version forms of these packages, which
+contain files of the same name, is mutually excluve. The user can
+install many different perl-versions of the runtime modules, and then
+choose whichever one perl-version of the scripts he wants at a given
+time. For example, Tk.pm comes with an
+executable <filename>ptksh</filename>, so the set of tk-pm* packages
+could be constructed as follows:
+</p>
+<codeblock>
+Info2: &lt;&lt;
+Package: tk-pm%type_pkg[perl]
+Type: perl (5.8.1 5.8.4 5.8.6)
+InstallScript: &lt;&lt;
+  %{default_script}
+  mkdir -p %i/lib/perl5/%type_raw[perl]/man
+  mv %i/share/man/man3 %i/lib/perl5/%type_raw[perl]/man
+&lt;&lt;
+SplitOff: &lt;&lt;
+  Package: %N-bin
+  Depends: %N
+  Conflicts: %{Ni}5.8.1, %{Ni}5.8.4, %{Ni}5.8.6
+  Replaces: %{Ni}5.8.1, %{Ni}5.8.4, %{Ni}5.8.6
+  Files: bin share/man/man1
+&lt;&lt;
+&lt;&lt;
+</codeblock>
+<p>
+An alternative arrangement is to rename the scripts and their manpages
+to include perl-version information. This method means there is no
+naming conflict at all, so one does not need the mutually-exclusive
+%N-bin splitoffs:
+</p>
+<codeblock>
+Info2: &lt;&lt;
+Package: tk-pm%type_pkg[perl]
+Type: perl (5.8.1 5.8.4 5.8.6)
+InstallScript: &lt;&lt;
+  %{default_script}
+  mkdir -p %i/lib/perl5/%type_raw[perl]/man
+  mv %i/share/man/man3 %i/lib/perl5/%type_raw[perl]/man
+  mv %i/bin/ptksh %i/bin/ptksh%type_raw[perl]
+  mv %i/share/man/man1/ptksh.1 %i/share/man/man1/ptksh%type_raw[perl].1
+&lt;&lt;
+&lt;&lt;
+</codeblock>
+<p>
+The user accesses ptksh for whichever perl she wants. For convenience,
+one could use <code>update-alternatives</code> to allow users to be
+able to access these by their generic (no perl-version) names as well.
+</p>
 
 
 </section>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click