Sun Feb 15 18:50:04 2015 UTC ()
Document GEENRATE_PLIST, based on an email by Hauke Fath.
While here, mention OWN_DIRS and MAKE_DIRS in directory section.


(wiz)
diff -r1.19 -r1.20 pkgsrc/doc/guide/files/plist.xml

cvs diff -r1.19 -r1.20 pkgsrc/doc/guide/files/plist.xml (expand / switch to unified diff)

--- pkgsrc/doc/guide/files/plist.xml 2009/08/25 13:19:50 1.19
+++ pkgsrc/doc/guide/files/plist.xml 2015/02/15 18:50:04 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1<!-- $NetBSD: plist.xml,v 1.19 2009/08/25 13:19:50 wiz Exp $ --> 1<!-- $NetBSD: plist.xml,v 1.20 2015/02/15 18:50:04 wiz Exp $ -->
2 2
3<chapter id="plist"> 3<chapter id="plist">
4 <title>PLIST issues</title> 4 <title>PLIST issues</title>
5 5
6 <para>The <filename>PLIST</filename> file contains a package's 6 <para>The <filename>PLIST</filename> file contains a package's
7 <quote>packing list</quote>, i.e. a list of files that belong to 7 <quote>packing list</quote>, i.e. a list of files that belong to
8 the package (relative to the <filename>${PREFIX}</filename> 8 the package (relative to the <filename>${PREFIX}</filename>
9 directory it's been installed in) plus some additional statements 9 directory it's been installed in) plus some additional statements
10 - see the &man.pkg.create.1; man page for a full list. 10 - see the &man.pkg.create.1; man page for a full list.
11 This chapter addresses some issues that need attention when 11 This chapter addresses some issues that need attention when
12 dealing with the <filename>PLIST</filename> file (or files, see 12 dealing with the <filename>PLIST</filename> file (or files, see
13 below!).</para> 13 below!).</para>
14 14
@@ -230,38 +230,58 @@ ${PLIST.foo}@dirrm share/bar @@ -230,38 +230,58 @@ ${PLIST.foo}@dirrm share/bar
230 <para><filename>PLIST.${MACHINE_ARCH}</filename></para> 230 <para><filename>PLIST.${MACHINE_ARCH}</filename></para>
231 </listitem> 231 </listitem>
232 232
233 <listitem> 233 <listitem>
234 <para><filename>PLIST.${OPSYS}-${MACHINE_ARCH}</filename></para> 234 <para><filename>PLIST.${OPSYS}-${MACHINE_ARCH}</filename></para>
235 </listitem> 235 </listitem>
236 236
237 <listitem> 237 <listitem>
238 <para><filename>PLIST.common_end</filename></para> 238 <para><filename>PLIST.common_end</filename></para>
239 </listitem> 239 </listitem>
240 </itemizedlist> 240 </itemizedlist>
241 </sect1> 241 </sect1>
242 242
 243 <sect1 id="build-plist">
 244 <title>Build-specific PLISTs</title>
 245
 246 <para>Some packages decide to generate hard-to-guess file names
 247 during installation that are hard to wire down.</para>
 248 <para>In such cases, you can set the
 249 <varname>GENERATE_PLIST</varname> variable to shell code
 250 terminated (with a semicolon) that will output PLIST entries which
 251 will be appended to the PLIST</para>
 252 <para>You can find one example in editors/xemacs:</para>
 253 <programlisting>
 254 GENERATE_PLIST+= ${ECHO} bin/${DISTNAME}-`${WRKSRC}/src/xemacs -sd`.dmp ;
 255 </programlisting>
 256 <para>which will append something like
 257 <filename>bin/xemacs-21.4.23-54e8ea71.dmp</filename> to the
 258 <filename>PLIST</filename>.
 259 </para>
 260 </sect1>
243 261
244 <sect1 id="faq.common-dirs"> 262 <sect1 id="faq.common-dirs">
245 <title>Sharing directories between packages</title> 263 <title>Sharing directories between packages</title>
246 264
247 <para>A <quote>shared directory</quote> is a directory where 265 <para>A <quote>shared directory</quote> is a directory where
248 multiple (and unrelated) packages install files. These 266 multiple (and unrelated) packages install files. These
249 directories were problematic because you had to add special 267 directories were problematic because you had to add special
250 tricks in the PLIST to conditionally remove them, or have some 268 tricks in the PLIST to conditionally remove them, or have some
251 centralized package handle them.</para> 269 centralized package handle them.</para>
252 270
253 <para>In pkgsrc, it is now easy: Each package should create 271 <para>In pkgsrc, it is now easy: Each package should create
254 directories and install files as needed; <command>pkg_delete</command> 272 directories and install files as needed; <command>pkg_delete</command>
255 will remove any directories left empty after uninstalling a 273 will remove any directories left empty after uninstalling a
256 package.</para> 274 package.</para>
257 275
258 <para>If a package needs an empty directory to work, create 276 <para>If a package needs an empty directory to work, create
259 the directory during installation as usual, and also add an 277 the directory during installation as usual, and also add an
260 entry to the PLIST: 278 entry to the PLIST:
261 <programlisting> 279 <programlisting>
262@pkgdir path/to/empty/directory 280@pkgdir path/to/empty/directory
263 </programlisting> 281 </programlisting>
 282 or take a look at <varname>MAKE_DIRS</varname> and
 283 <varname>OWN_DIRS</varname>.
264 </para> 284 </para>
265 </sect1> 285 </sect1>
266 286
267</chapter> 287</chapter>