Sun Feb 9 19:06:12 2020 UTC ()
doc/guide: don't suggest patch files against /dev/null

These patches would be much harder to edit and read than ordinary files.
Also recommend to copy these files in post-extract instead of
pre-configure, since extract is used for putting all files in place.


(rillig)
diff -r1.57 -r1.58 pkgsrc/doc/guide/files/components.xml

cvs diff -r1.57 -r1.58 pkgsrc/doc/guide/files/components.xml (expand / switch to unified diff)

--- pkgsrc/doc/guide/files/components.xml 2019/08/18 16:35:16 1.57
+++ pkgsrc/doc/guide/files/components.xml 2020/02/09 19:06:12 1.58
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1<!-- $NetBSD: components.xml,v 1.57 2019/08/18 16:35:16 rillig Exp $ --> 1<!-- $NetBSD: components.xml,v 1.58 2020/02/09 19:06:12 rillig Exp $ -->
2 2
3<chapter id="components"> <?dbhtml filename="components.html"?> 3<chapter id="components"> <?dbhtml filename="components.html"?>
4<title>Package components - files, directories and contents</title> 4<title>Package components - files, directories and contents</title>
5 5
6<para>Whenever you're preparing a package, there are a number of 6<para>Whenever you're preparing a package, there are a number of
7files involved which are described in the following 7files involved which are described in the following
8sections.</para> 8sections.</para>
9 9
10<sect1 id="components.Makefile"> 10<sect1 id="components.Makefile">
11 <title><filename>Makefile</filename></title> 11 <title><filename>Makefile</filename></title>
12 12
13 <para>Building, installation and creation of a binary package are all 13 <para>Building, installation and creation of a binary package are all
14 controlled by the package's <filename>Makefile</filename>. 14 controlled by the package's <filename>Makefile</filename>.
@@ -681,30 +681,27 @@ MESSAGE_SUBST+= SOMEVAR="somevalue" @@ -681,30 +681,27 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
681 unpacked into the directory denoted by 681 unpacked into the directory denoted by
682 <varname>WRKDIR</varname>. It can be removed by running 682 <varname>WRKDIR</varname>. It can be removed by running
683 <command>make clean</command>. Besides the sources, this 683 <command>make clean</command>. Besides the sources, this
684 directory is also used to keep various timestamp files. 684 directory is also used to keep various timestamp files.
685 The directory gets <emphasis>removed completely</emphasis> on clean. 685 The directory gets <emphasis>removed completely</emphasis> on clean.
686 The default is <filename>${.CURDIR}/work</filename> 686 The default is <filename>${.CURDIR}/work</filename>
687 or <filename>${.CURDIR}/work.${MACHINE_ARCH}</filename> 687 or <filename>${.CURDIR}/work.${MACHINE_ARCH}</filename>
688 if <varname>OBJMACHINE</varname> is set.</para> 688 if <varname>OBJMACHINE</varname> is set.</para>
689 </sect1> 689 </sect1>
690 690
691 <sect1 id="files-dir"> 691 <sect1 id="files-dir">
692 <title><filename>files/*</filename></title> 692 <title><filename>files/*</filename></title>
693 693
694 <para>If you have any files that you wish to be placed in the package prior 694 <para>If you have any files that you wish to be placed in the package
695 to configuration or building, you could place these files here and use 695 prior to configuration or building, you can place these files here
696 a <command>${CP}</command> command in the 696 and use a <command>${CP}</command> command in the
697 <quote>pre-configure</quote> target to achieve 697 <quote>post-extract</quote> target to achieve this.</para>
698 this. Alternatively, you could simply diff the file against 
699 <filename>/dev/null</filename> and use the patch mechanism to manage 
700 the creation of this file.</para> 
701 698
702 <para>If you want to share files in this way with other 699 <para>If you want to share files in this way with other
703 packages, set the <varname>FILESDIR</varname> variable to point 700 packages, set the <varname>FILESDIR</varname> variable to point
704 to the other package's <filename>files</filename> directory, 701 to the other package's <filename>files</filename> directory,
705 e.g.:</para> 702 e.g.:</para>
706<programlisting> 703<programlisting>
707FILESDIR= ../../editors/xemacs/files 704FILESDIR= ../../editors/xemacs/files
708</programlisting> 705</programlisting>
709 </sect1> 706 </sect1>
710</chapter> 707</chapter>