summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/pkgsrc.html6240
-rw-r--r--doc/pkgsrc.txt1443
2 files changed, 3853 insertions, 3830 deletions
diff --git a/doc/pkgsrc.html b/doc/pkgsrc.html
index b470eea7f98..2554e9655bb 100644
--- a/doc/pkgsrc.html
+++ b/doc/pkgsrc.html
@@ -1,14 +1,14 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
- "HTML Tidy for NetBSD (vers 1st August 2004), see www.w3.org" />
+ "HTML Tidy for NetBSD (vers 1st October 2003), see www.w3.org" />
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<title>The pkgsrc guide</title>
<link rel="stylesheet" href="/NetBSD.css" type="text/css" />
<meta name="generator" content=
- "DocBook XSL Stylesheets V1.67.0" />
+ "DocBook XSL Stylesheets V1.65.0" />
<meta name="description" content=
"Information about using the NetBSD package system (pkgsrc) from both a user view for installing packages as well as from a pkgsrc developers' view for creating new packages." />
</head>
@@ -19,8 +19,8 @@ alink="#0000FF">
<div class="titlepage">
<div>
<div>
- <h1 class="title"><a name="id2458390" id=
- "id2458390"></a>The pkgsrc guide</h1>
+ <h1 class="title"><a name="id2526935" id=
+ "id2526935"></a>The pkgsrc guide</h1>
</div>
<div>
@@ -37,8 +37,8 @@ alink="#0000FF">
<div class="affiliation">
<div class="address">
- <p><code class="email">&lt;<a href=
- "mailto:agc@NetBSD.org">agc@NetBSD.org</a>&gt;</code></p>
+ <p><tt class="email">&lt;<a href=
+ "mailto:agc@NetBSD.org">agc@NetBSD.org</a>&gt;</tt></p>
</div>
</div>
</div>
@@ -50,8 +50,8 @@ alink="#0000FF">
<div class="affiliation">
<div class="address">
- <p><code class="email">&lt;<a href=
- "mailto:hubertf@NetBSD.org">hubertf@NetBSD.org</a>&gt;</code></p>
+ <p><tt class="email">&lt;<a href=
+ "mailto:hubertf@NetBSD.org">hubertf@NetBSD.org</a>&gt;</tt></p>
</div>
</div>
</div>
@@ -93,7 +93,7 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2514273">1.1.
+ <dt><span class="sect1"><a href="#id2494406">1.1.
Introduction</a></span></dt>
<dt><span class="sect1"><a href="#overview">1.2.
@@ -117,13 +117,13 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2514851">2.1.
+ <dt><span class="sect1"><a href="#id2495052">2.1.
As tar file</a></span></dt>
- <dt><span class="sect1"><a href="#id2514867">2.2.
+ <dt><span class="sect1"><a href="#id2495068">2.2.
Via SUP</a></span></dt>
- <dt><span class="sect1"><a href="#id2514967">2.3.
+ <dt><span class="sect1"><a href="#id2495100">2.3.
Via CVS</a></span></dt>
</dl>
</dd>
@@ -133,32 +133,32 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2515077">3.1.
+ <dt><span class="sect1"><a href="#id2495210">3.1.
Bootstrapping pkgsrc</a></span></dt>
- <dt><span class="sect1"><a href="#id2515252">3.2.
+ <dt><span class="sect1"><a href="#id2495317">3.2.
Platform specific notes</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2515258">3.2.1. Darwin (Mac OS
+ "#id2495323">3.2.1. Darwin (Mac OS
X)</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2515489">3.2.2. FreeBSD</a></span></dt>
+ "#id2495622">3.2.2. FreeBSD</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2515659">3.2.3. Interix</a></span></dt>
+ "#id2496270">3.2.3. Interix</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2515750">3.2.4. IRIX</a></span></dt>
+ "#id2496361">3.2.4. IRIX</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516277">3.2.5. OpenBSD</a></span></dt>
+ "#id2496478">3.2.5. OpenBSD</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516389">3.2.6. Solaris</a></span></dt>
+ "#id2496659">3.2.6. Solaris</a></span></dt>
</dl>
</dd>
</dl>
@@ -176,38 +176,38 @@ alink="#0000FF">
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2516525">4.1.1. Where to get binary
+ "#id2496864">4.1.1. Where to get binary
packages</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516566">4.1.2. How to use binary
+ "#id2496904">4.1.2. How to use binary
packages</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516700">4.1.3. A word of
+ "#id2497038">4.1.3. A word of
warning</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2516712">4.2.
+ <dt><span class="sect1"><a href="#id2497050">4.2.
Building packages from source</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2516722">4.2.1.
+ "#id2497128">4.2.1.
Requirements</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516742">4.2.2. Fetching
+ "#id2497148">4.2.2. Fetching
distfiles</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516862">4.2.3. How to build and
+ "#id2497201">4.2.3. How to build and
install</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2517179">4.2.4. Selecting the
+ "#id2498132">4.2.4. Selecting the
compiler</a></span></dt>
</dl>
</dd>
@@ -219,10 +219,10 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2517334">5.1.
+ <dt><span class="sect1"><a href="#id2563003">5.1.
Building a single binary package</a></span></dt>
- <dt><span class="sect1"><a href="#id2517821">5.2.
+ <dt><span class="sect1"><a href="#id2563081">5.2.
Settings for creation of binary
packages</a></span></dt>
@@ -236,38 +236,42 @@ alink="#0000FF">
Configuration</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2517961">5.3.2. Other environmental
+ "#id2563289">5.3.2. Other environmental
considerations</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2518002">5.3.3. Operation</a></span></dt>
+ "#id2563330">5.3.3. Operation</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583267">5.3.4. What it
+ "#id2563467">5.3.4. What it
does</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583392">5.3.5. Disk space
+ "#id2563524">5.3.5. Disk space
requirements</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583418">5.3.6. Setting up a sandbox for
+ "#id2563550">5.3.6. Setting up a sandbox for
chroot'ed builds</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583811">5.3.7. Building a partial set of
+ "#id2563943">5.3.7. Building a partial set of
packages</a></span></dt>
+
+ <dt><span class="sect2"><a href=
+ "#bulk-upload">5.3.8. Uploading results of a
+ bulk build</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2583853">5.4.
+ <dt><span class="sect1"><a href="#id2564359">5.4.
Creating a multiple CD-ROM packages
collection</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2583868">5.4.1. Example of
+ "#id2564442">5.4.1. Example of
cdpack</a></span></dt>
</dl>
</dd>
@@ -279,50 +283,48 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2584196">6.1.
+ <dt><span class="sect1"><a href="#id2564634">6.1.
Is there a mailing list for pkg-related
discussion?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584226">6.2.
+ <dt><span class="sect1"><a href="#id2564801">6.2.
Where's the pkgviews documentation?</a></span></dt>
<dt><span class="sect1"><a href=
"#faq-pkgtools">6.3. Utilities for package
management (pkgtools)</a></span></dt>
- <dt><span class="sect1"><a href="#id2584478">6.4.
+ <dt><span class="sect1"><a href="#id2564985">6.4.
How to use pkgsrc as non-root</a></span></dt>
- <dt><span class="sect1"><a href="#id2584490">6.5.
+ <dt><span class="sect1"><a href="#id2564997">6.5.
How can I install/use XFree86 from
pkgsrc?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584586">6.6.
+ <dt><span class="sect1"><a href="#id2565025">6.6.
How can I install/use X.org from
pkgsrc?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584614">6.7.
+ <dt><span class="sect1"><a href="#id2565121">6.7.
How to fetch files from behind a
firewall</a></span></dt>
- <dt><span class="sect1"><a href="#id2584628">6.8.
- How do I tell <span><strong class="command">make
- fetch</strong></span> to do passive
+ <dt><span class="sect1"><a href="#id2565134">6.8.
+ How do I tell make fetch to do passive
FTP?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584747">6.9.
+ <dt><span class="sect1"><a href="#id2565186">6.9.
How to fetch all distfiles at once</a></span></dt>
- <dt><span class="sect1"><a href="#id2584887">6.10.
- What does &#8220;<span class="quote">Don't know how
- to make /usr/share/tmac/tmac.andoc</span>&#8221;
- mean?</a></span></dt>
+ <dt><span class="sect1"><a href="#id2565325">6.10.
+ What does Don't know how to make
+ /usr/share/tmac/tmac.andoc mean?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584925">6.11.
- What does &#8220;<span class="quote">Could not find
- bsd.own.mk</span>&#8221; mean?</a></span></dt>
+ <dt><span class="sect1"><a href="#id2565364">6.11.
+ What does Could not find bsd.own.mk
+ mean?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584983">6.12.
+ <dt><span class="sect1"><a href="#id2565490">6.12.
Using 'sudo' with pkgsrc</a></span></dt>
<dt><span class="sect1"><a href="#faq.conf">6.13.
@@ -349,30 +351,29 @@ alink="#0000FF">
<dd>
<dl>
<dt><span class="sect1"><a href=
- "#components.Makefile">7.1. <code class=
- "filename">Makefile</code></a></span></dt>
+ "#components.Makefile">7.1.
+ Makefile</a></span></dt>
<dt><span class="sect1"><a href=
- "#components.distinfo">7.2. <code class=
- "filename">distinfo</code></a></span></dt>
+ "#components.distinfo">7.2.
+ distinfo</a></span></dt>
<dt><span class="sect1"><a href=
"#components.patches">7.3.
patches/*</a></span></dt>
- <dt><span class="sect1"><a href="#id2586097">7.4.
+ <dt><span class="sect1"><a href="#id2566535">7.4.
Other mandatory files</a></span></dt>
<dt><span class="sect1"><a href=
"#components.optional">7.5. Optional
files</a></span></dt>
- <dt><span class="sect1"><a href="#id2586222">7.6.
- <code class="filename">work*</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2566729">7.6.
+ work*</a></span></dt>
- <dt><span class="sect1"><a href="#id2586310">7.7.
- <code class=
- "filename">files/*</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2566817">7.7.
+ files/*</a></span></dt>
</dl>
</dd>
@@ -381,29 +382,26 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2586364">8.1.
+ <dt><span class="sect1"><a href="#id2566871">8.1.
RCS ID</a></span></dt>
- <dt><span class="sect1"><a href="#id2586379">8.2.
- Semi-automatic <code class="filename">PLIST</code>
- generation</a></span></dt>
+ <dt><span class="sect1"><a href="#id2566886">8.2.
+ Semi-automatic PLIST generation</a></span></dt>
<dt><span class="sect1"><a href="#print-PLIST">8.3.
- Tweaking output of <span><strong class=
- "command">make
- print-PLIST</strong></span></a></span></dt>
+ Tweaking output of make print-PLIST</a></span></dt>
<dt><span class="sect1"><a href="#plist.misc">8.4.
Variable substitution in PLIST</a></span></dt>
- <dt><span class="sect1"><a href="#id2586769">8.5.
+ <dt><span class="sect1"><a href="#id2567139">8.5.
Manpage-compression</a></span></dt>
- <dt><span class="sect1"><a href="#id2586810">8.6.
- Changing PLIST source with <code class=
- "varname">PLIST_SRC</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2567249">8.6.
+ Changing PLIST source with
+ PLIST_SRC</a></span></dt>
- <dt><span class="sect1"><a href="#id2586827">8.7.
+ <dt><span class="sect1"><a href="#id2567266">8.7.
Platform specific and differing
PLISTs</a></span></dt>
@@ -418,42 +416,37 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2587099">9.1.
+ <dt><span class="sect1"><a href="#id2567742">9.1.
Converting packages to use
buildlink3</a></span></dt>
- <dt><span class="sect1"><a href="#id2587290">9.2.
- Writing <code class="filename">buildlink3.mk</code>
- files</a></span></dt>
+ <dt><span class="sect1"><a href="#id2567933">9.2.
+ Writing buildlink3.mk files</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2587496">9.2.1. Anatomy of a buildlink3.mk
+ "#id2568003">9.2.1. Anatomy of a buildlink3.mk
file</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2588073">9.2.2. Updating <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> in
- <code class="filename">buildlink3.mk</code>
+ "#id2568375">9.2.2. Updating
+ BUILDLINK_DEPENDS.pkg in buildlink3.mk
files</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2588152">9.3.
- Writing <code class="filename">builtin.mk</code>
- files</a></span></dt>
+ <dt><span class="sect1"><a href="#id2568590">9.3.
+ Writing builtin.mk files</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2588233">9.3.1. Anatomy of a <code class=
- "filename">builtin.mk</code>
+ "#id2568672">9.3.1. Anatomy of a builtin.mk
file</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2588392">9.3.2. Global preferences for
+ "#id2568899">9.3.2. Global preferences for
native or pkgsrc software</a></span></dt>
</dl>
</dd>
@@ -465,12 +458,12 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2588533">10.1.
+ <dt><span class="sect1"><a href="#id2568971">10.1.
Global default options</a></span></dt>
- <dt><span class="sect1"><a href="#id2588548">10.2.
- Converting packages to use <code class=
- "filename">bsd.options.mk</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2568986">10.2.
+ Converting packages to use
+ bsd.options.mk</a></span></dt>
</dl>
</dd>
@@ -483,7 +476,7 @@ alink="#0000FF">
"#build.prefix">11.1. Program
location</a></span></dt>
- <dt><span class="sect1"><a href="#id2589156">11.2.
+ <dt><span class="sect1"><a href="#id2569662">11.2.
Main targets</a></span></dt>
<dt><span class="sect1"><a href=
@@ -497,17 +490,17 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2590556">12.1.
+ <dt><span class="sect1"><a href="#id2571063">12.1.
General operation</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2590560">12.1.1. How to pull in variables
+ "#id2571066">12.1.1. How to pull in variables
from /etc/mk.conf</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2590643">12.1.2. Restricted
+ "#id2571149">12.1.2. Restricted
packages</a></span></dt>
<dt><span class="sect2"><a href=
@@ -515,15 +508,15 @@ alink="#0000FF">
dependencies</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591226">12.1.4. Handling conflicts with
+ "#id2571733">12.1.4. Handling conflicts with
other packages</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591276">12.1.5. Packages that cannot or
+ "#id2571851">12.1.5. Packages that cannot or
should not be built</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591302">12.1.6. Packages which should not
+ "#id2571877">12.1.6. Packages which should not
be deleted, once installed</a></span></dt>
<dt><span class="sect2"><a href=
@@ -531,37 +524,37 @@ alink="#0000FF">
with security problems</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591462">12.1.8. How to handle compiler
+ "#id2571969">12.1.8. How to handle compiler
bugs</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591484">12.1.9. How to handle incrementing
+ "#id2571991">12.1.9. How to handle incrementing
versions when fixing an existing
package</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591533">12.1.10. Portability of
+ "#id2572108">12.1.10. Portability of
packages</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2591626">12.2.
+ <dt><span class="sect1"><a href="#id2572133">12.2.
Possible downloading issues</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2591629">12.2.1. Packages whose distfiles
+ "#id2572136">12.2.1. Packages whose distfiles
aren't available for plain
downloading</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591692">12.2.2. How to handle modified
+ "#id2572267">12.2.2. How to handle modified
distfiles with the 'old' name</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2591704">12.3.
+ <dt><span class="sect1"><a href="#id2572279">12.3.
Configuration gotchas</a></span></dt>
<dd>
@@ -571,66 +564,66 @@ alink="#0000FF">
libtool</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592180">12.3.2. Using libtool on GNU
+ "#id2572618">12.3.2. Using libtool on GNU
packages that already support
libtool</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592264">12.3.3. GNU
+ "#id2572702">12.3.3. GNU
Autoconf/Automake</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2592309">12.4.
+ <dt><span class="sect1"><a href="#id2572747">12.4.
Building considerations</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2592312">12.4.1. CPP
+ "#id2572750">12.4.1. CPP
defines</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2592342">12.5.
+ <dt><span class="sect1"><a href="#id2572780">12.5.
Package specific actions</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2592345">12.5.1. Package configuration
+ "#id2572784">12.5.1. Package configuration
files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592516">12.5.2. User
+ "#id2573022">12.5.2. User
interaction</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592561">12.5.3. Handling
+ "#id2573136">12.5.3. Handling
licenses</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592644">12.5.4. Creating an account from a
+ "#id2573287">12.5.4. Creating an account from a
package</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592774">12.5.5. Installing score
+ "#id2573349">12.5.5. Installing score
files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592818">12.5.6. Packages providing login
+ "#id2573393">12.5.6. Packages providing login
shells</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593012">12.5.7. Packages containing perl
+ "#id2573518">12.5.7. Packages containing perl
scripts</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593030">12.5.8. Packages with hardcoded
+ "#id2573537">12.5.8. Packages with hardcoded
paths to other interpreters</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593051">12.5.9. Packages installing perl
+ "#id2573558">12.5.9. Packages installing perl
modules</a></span></dt>
<dt><span class="sect2"><a href=
@@ -638,36 +631,36 @@ alink="#0000FF">
info files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593408">12.5.11. Packages installing
+ "#id2573778">12.5.11. Packages installing
GConf2 data files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593508">12.5.12. Packages installing
+ "#id2573946">12.5.12. Packages installing
scrollkeeper data files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593559">12.5.13. Packages installing X11
+ "#id2573997">12.5.13. Packages installing X11
fonts</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593606">12.5.14. Packages installing GTK2
+ "#id2574044">12.5.14. Packages installing GTK2
modules</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593675">12.5.15. Packages installing SGML
+ "#id2574114">12.5.15. Packages installing SGML
or XML data</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593728">12.5.16. Packages installing
+ "#id2574234">12.5.16. Packages installing
extensions to the MIME database</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593798">12.5.17. Packages using
+ "#id2574305">12.5.17. Packages using
intltool</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2593812">12.6.
+ <dt><span class="sect1"><a href="#id2574318">12.6.
Feedback to the author</a></span></dt>
</dl>
</dd>
@@ -680,18 +673,18 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2594342">14.1.
+ <dt><span class="sect1"><a href="#id2574849">14.1.
Submitting your packages</a></span></dt>
- <dt><span class="sect1"><a href="#id2594389">14.2.
+ <dt><span class="sect1"><a href="#id2575036">14.2.
Committing: Importing a package into
CVS</a></span></dt>
- <dt><span class="sect1"><a href="#id2594520">14.3.
+ <dt><span class="sect1"><a href="#id2575168">14.3.
Updating a package to a newer
version</a></span></dt>
- <dt><span class="sect1"><a href="#id2594539">14.4.
+ <dt><span class="sect1"><a href="#id2575187">14.4.
Moving a package in pkgsrc</a></span></dt>
</dl>
</dd>
@@ -703,27 +696,26 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2594765">A.1.
+ <dt><span class="sect1"><a href="#id2575345">A.1.
files</a></span></dt>
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2594769">A.1.1.
+ <dt><span class="sect2"><a href="#id2575348">A.1.1.
Makefile</a></span></dt>
- <dt><span class="sect2"><a href="#id2594776">A.1.2.
+ <dt><span class="sect2"><a href="#id2575355">A.1.2.
DESCR</a></span></dt>
- <dt><span class="sect2"><a href="#id2594791">A.1.3.
+ <dt><span class="sect2"><a href="#id2575370">A.1.3.
PLIST</a></span></dt>
- <dt><span class="sect2"><a href="#id2594798">A.1.4.
- Checking a package with <span><strong class=
- "command">pkglint</strong></span></a></span></dt>
+ <dt><span class="sect2"><a href="#id2575378">A.1.4.
+ Checking a package with pkglint</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2594839">A.2. Steps
+ <dt><span class="sect1"><a href="#id2575418">A.2. Steps
for building, installing, packaging</a></span></dt>
</dl>
</dd>
@@ -749,10 +741,10 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2595758">D.1.
+ <dt><span class="sect1"><a href="#id2576133">D.1.
Targets</a></span></dt>
- <dt><span class="sect1"><a href="#id2595829">D.2.
+ <dt><span class="sect1"><a href="#id2576408">D.2.
Procedure</a></span></dt>
</dl>
</dd>
@@ -773,7 +765,7 @@ alink="#0000FF">
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2514273">1.1.
+ <dt><span class="sect1"><a href="#id2494406">1.1.
Introduction</a></span></dt>
<dt><span class="sect1"><a href="#overview">1.2.
@@ -792,8 +784,8 @@ alink="#0000FF">
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2514273" id=
- "id2514273"></a>1.1.&nbsp;Introduction</h2>
+ "id2494406" id=
+ "id2494406"></a>1.1.&nbsp;Introduction</h2>
</div>
</div>
</div>
@@ -808,11 +800,10 @@ alink="#0000FF">
single command.</p>
<p>Once the software has been built, it is manipulated with
- the <span><strong class="command">pkg_*</strong></span>
- tools so that installation and de-installation, printing of
- an inventory of all installed packages and retrieval of
- one-line comments or more verbose descriptions are all
- simple.</p>
+ the <span><b class="command">pkg_*</b></span> tools so that
+ installation and de-installation, printing of an inventory
+ of all installed packages and retrieval of one-line
+ comments or more verbose descriptions are all simple.</p>
<p>pkgsrc currently contains several thousand packages,
including:</p>
@@ -823,32 +814,32 @@ alink="#0000FF">
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/apache/README.html"
- class="pkgname">www/apache</a> - The Apache web
- server</p>
+ class="pkgname">www/apache</a> - The Apache web
+ server</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/mozilla/README.html"
- class="pkgname">www/mozilla</a> - The Mozilla web
- browser</p>
+ class="pkgname">www/mozilla</a> - The Mozilla web
+ browser</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/meta-pkgs/gnome/README.html"
- class="pkgname">meta-pkgs/gnome</a> - The GNOME
- Desktop Environment</p>
+ class="pkgname">meta-pkgs/gnome</a> - The GNOME
+ Desktop Environment</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/meta-pkgs/kde3/README.html"
- class="pkgname">meta-pkgs/kde3</a> - The K Desktop
- Environment</p>
+ class="pkgname">meta-pkgs/kde3</a> - The K Desktop
+ Environment</p>
</li>
</ul>
</div>
@@ -987,8 +978,8 @@ alink="#0000FF">
<p>A set of files and building instructions that
describe what's necessary to build a certain piece of
software using pkgsrc. Packages are traditionally
- stored under <code class=
- "filename">/usr/pkgsrc</code>.</p>
+ stored under <tt class=
+ "filename">/usr/pkgsrc</tt>.</p>
</dd>
<dt><span class="term">The NetBSD package
@@ -1012,8 +1003,8 @@ alink="#0000FF">
build on NetBSD are reflected in the corresponding
package. Usually the distfile is in the form of a
compressed tar-archive, but other types are possible,
- too. Distfiles are usually stored below <code class=
- "filename">/usr/pkgsrc/distfiles</code>.</p>
+ too. Distfiles are usually stored below <tt class=
+ "filename">/usr/pkgsrc/distfiles</tt>.</p>
</dd>
<dt><span class="term">Port</span></dt>
@@ -1031,13 +1022,12 @@ alink="#0000FF">
<dd>
<p>A set of binaries built with pkgsrc from a
- distfile and stuffed together in a single
- <code class="filename">.tgz</code> file so it can be
- installed on machines of the same machine
- architecture without the need to recompile. Packages
- are usually generated in <code class=
- "filename">/usr/pkgsrc/packages</code>; there is also
- an archive on <a href=
+ distfile and stuffed together in a single <tt class=
+ "filename">.tgz</tt> file so it can be installed on
+ machines of the same machine architecture without the
+ need to recompile. Packages are usually generated in
+ <tt class="filename">/usr/pkgsrc/packages</tt>; there
+ is also an archive on <a href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/" target=
"_top">ftp.NetBSD.org</a>.</p>
@@ -1072,10 +1062,10 @@ alink="#0000FF">
<p>When giving examples for commands, shell prompts are
used to show if the command should/can be issued as root,
or if &#8220;<span class="quote">normal</span>&#8221; user
- privileges are sufficient. We use a <code class=
- "prompt">#</code> for root's shell prompt, and a
- <code class="prompt">$</code> for users' shell prompt,
- assuming they use the C-shell or tcsh.</p>
+ privileges are sufficient. We use a <tt class=
+ "prompt">#</tt> for root's shell prompt, and a <tt class=
+ "prompt">$</tt> for users' shell prompt, assuming they use
+ the C-shell or tcsh.</p>
</div>
</div>
@@ -1098,13 +1088,13 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2514851">2.1. As
+ <dt><span class="sect1"><a href="#id2495052">2.1. As
tar file</a></span></dt>
- <dt><span class="sect1"><a href="#id2514867">2.2. Via
+ <dt><span class="sect1"><a href="#id2495068">2.2. Via
SUP</a></span></dt>
- <dt><span class="sect1"><a href="#id2514967">2.3. Via
+ <dt><span class="sect1"><a href="#id2495100">2.3. Via
CVS</a></span></dt>
</dl>
</dd>
@@ -1114,32 +1104,32 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2515077">3.1.
+ <dt><span class="sect1"><a href="#id2495210">3.1.
Bootstrapping pkgsrc</a></span></dt>
- <dt><span class="sect1"><a href="#id2515252">3.2.
+ <dt><span class="sect1"><a href="#id2495317">3.2.
Platform specific notes</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2515258">3.2.1. Darwin (Mac OS
+ "#id2495323">3.2.1. Darwin (Mac OS
X)</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2515489">3.2.2. FreeBSD</a></span></dt>
+ "#id2495622">3.2.2. FreeBSD</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2515659">3.2.3. Interix</a></span></dt>
+ "#id2496270">3.2.3. Interix</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2515750">3.2.4. IRIX</a></span></dt>
+ "#id2496361">3.2.4. IRIX</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516277">3.2.5. OpenBSD</a></span></dt>
+ "#id2496478">3.2.5. OpenBSD</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516389">3.2.6. Solaris</a></span></dt>
+ "#id2496659">3.2.6. Solaris</a></span></dt>
</dl>
</dd>
</dl>
@@ -1157,37 +1147,37 @@ alink="#0000FF">
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2516525">4.1.1. Where to get binary
+ "#id2496864">4.1.1. Where to get binary
packages</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516566">4.1.2. How to use binary
+ "#id2496904">4.1.2. How to use binary
packages</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516700">4.1.3. A word of
+ "#id2497038">4.1.3. A word of
warning</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2516712">4.2.
+ <dt><span class="sect1"><a href="#id2497050">4.2.
Building packages from source</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2516722">4.2.1. Requirements</a></span></dt>
+ "#id2497128">4.2.1. Requirements</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516742">4.2.2. Fetching
+ "#id2497148">4.2.2. Fetching
distfiles</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2516862">4.2.3. How to build and
+ "#id2497201">4.2.3. How to build and
install</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2517179">4.2.4. Selecting the
+ "#id2498132">4.2.4. Selecting the
compiler</a></span></dt>
</dl>
</dd>
@@ -1199,10 +1189,10 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2517334">5.1.
+ <dt><span class="sect1"><a href="#id2563003">5.1.
Building a single binary package</a></span></dt>
- <dt><span class="sect1"><a href="#id2517821">5.2.
+ <dt><span class="sect1"><a href="#id2563081">5.2.
Settings for creation of binary
packages</a></span></dt>
@@ -1216,37 +1206,41 @@ alink="#0000FF">
Configuration</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2517961">5.3.2. Other environmental
+ "#id2563289">5.3.2. Other environmental
considerations</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2518002">5.3.3. Operation</a></span></dt>
+ "#id2563330">5.3.3. Operation</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583267">5.3.4. What it does</a></span></dt>
+ "#id2563467">5.3.4. What it does</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583392">5.3.5. Disk space
+ "#id2563524">5.3.5. Disk space
requirements</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583418">5.3.6. Setting up a sandbox for
+ "#id2563550">5.3.6. Setting up a sandbox for
chroot'ed builds</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2583811">5.3.7. Building a partial set of
+ "#id2563943">5.3.7. Building a partial set of
packages</a></span></dt>
+
+ <dt><span class="sect2"><a href=
+ "#bulk-upload">5.3.8. Uploading results of a bulk
+ build</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2583853">5.4.
+ <dt><span class="sect1"><a href="#id2564359">5.4.
Creating a multiple CD-ROM packages
collection</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2583868">5.4.1. Example of
+ "#id2564442">5.4.1. Example of
cdpack</a></span></dt>
</dl>
</dd>
@@ -1258,48 +1252,46 @@ alink="#0000FF">
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2584196">6.1. Is
+ <dt><span class="sect1"><a href="#id2564634">6.1. Is
there a mailing list for pkg-related
discussion?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584226">6.2.
+ <dt><span class="sect1"><a href="#id2564801">6.2.
Where's the pkgviews documentation?</a></span></dt>
<dt><span class="sect1"><a href="#faq-pkgtools">6.3.
Utilities for package management
(pkgtools)</a></span></dt>
- <dt><span class="sect1"><a href="#id2584478">6.4. How
+ <dt><span class="sect1"><a href="#id2564985">6.4. How
to use pkgsrc as non-root</a></span></dt>
- <dt><span class="sect1"><a href="#id2584490">6.5. How
+ <dt><span class="sect1"><a href="#id2564997">6.5. How
can I install/use XFree86 from
pkgsrc?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584586">6.6. How
+ <dt><span class="sect1"><a href="#id2565025">6.6. How
can I install/use X.org from pkgsrc?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584614">6.7. How
+ <dt><span class="sect1"><a href="#id2565121">6.7. How
to fetch files from behind a firewall</a></span></dt>
- <dt><span class="sect1"><a href="#id2584628">6.8. How
- do I tell <span><strong class="command">make
- fetch</strong></span> to do passive
+ <dt><span class="sect1"><a href="#id2565134">6.8. How
+ do I tell make fetch to do passive
FTP?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584747">6.9. How
+ <dt><span class="sect1"><a href="#id2565186">6.9. How
to fetch all distfiles at once</a></span></dt>
- <dt><span class="sect1"><a href="#id2584887">6.10.
- What does &#8220;<span class="quote">Don't know how
- to make /usr/share/tmac/tmac.andoc</span>&#8221;
- mean?</a></span></dt>
+ <dt><span class="sect1"><a href="#id2565325">6.10.
+ What does Don't know how to make
+ /usr/share/tmac/tmac.andoc mean?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584925">6.11.
- What does &#8220;<span class="quote">Could not find
- bsd.own.mk</span>&#8221; mean?</a></span></dt>
+ <dt><span class="sect1"><a href="#id2565364">6.11.
+ What does Could not find bsd.own.mk
+ mean?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584983">6.12.
+ <dt><span class="sect1"><a href="#id2565490">6.12.
Using 'sudo' with pkgsrc</a></span></dt>
<dt><span class="sect1"><a href="#faq.conf">6.13.
@@ -1329,13 +1321,13 @@ alink="#0000FF">
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2514851">2.1. As
+ <dt><span class="sect1"><a href="#id2495052">2.1. As
tar file</a></span></dt>
- <dt><span class="sect1"><a href="#id2514867">2.2. Via
+ <dt><span class="sect1"><a href="#id2495068">2.2. Via
SUP</a></span></dt>
- <dt><span class="sect1"><a href="#id2514967">2.3. Via
+ <dt><span class="sect1"><a href="#id2495100">2.3. Via
CVS</a></span></dt>
</dl>
</div>
@@ -1349,7 +1341,7 @@ alink="#0000FF">
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2514851" id="id2514851"></a>2.1.&nbsp;As tar
+ "id2495052" id="id2495052"></a>2.1.&nbsp;As tar
file</h2>
</div>
</div>
@@ -1358,8 +1350,8 @@ alink="#0000FF">
<p>To get pkgsrc going, you need to get the pkgsrc.tar.gz
file from <a href=
"ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/tar_files/pkgsrc.tar.gz"
- target="_top">ftp.NetBSD.org</a> and unpack it into
- <code class="filename">/usr/pkgsrc</code>.</p>
+ target="_top">ftp.NetBSD.org</a> and unpack it into
+ <tt class="filename">/usr/pkgsrc</tt>.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -1367,7 +1359,7 @@ alink="#0000FF">
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2514867" id="id2514867"></a>2.2.&nbsp;Via
+ "id2495068" id="id2495068"></a>2.2.&nbsp;Via
SUP</h2>
</div>
</div>
@@ -1380,12 +1372,12 @@ alink="#0000FF">
release=pkgsrc
</pre>
- <p>in it, see the examples in <code class=
- "filename">/usr/share/examples/supfiles</code>, and that
- the <code class="filename">/usr/pkgsrc</code> directory
- exists. Then, simply run <span><strong class=
- "command">sup -v <em class=
- "replaceable"><code>/path/to/your/supfile</code></em></strong></span>.</p>
+ <p>in it, see the examples in <tt class=
+ "filename">/usr/share/examples/supfiles</tt>, and that
+ the <tt class="filename">/usr/pkgsrc</tt> directory
+ exists. Then, simply run <span><b class="command">sup -v
+ <i class=
+ "replaceable"><tt>/path/to/your/supfile</tt></i></b></span>.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -1393,7 +1385,7 @@ release=pkgsrc
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2514967" id="id2514967"></a>2.3.&nbsp;Via
+ "id2495100" id="id2495100"></a>2.3.&nbsp;Via
CVS</h2>
</div>
</div>
@@ -1405,28 +1397,26 @@ release=pkgsrc
precompiled binary on ftp.NetBSD.org. To do an initial
(full) checkout of pkgsrc, do the following steps:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>setenv CVSROOT anoncvs@anoncvs.NetBSD.org:/cvsroot</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>setenv CVS_RSH ssh</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cd /usr</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cvs checkout -P pkgsrc</code></strong>
-</pre>
-
- <p>This will create the <code class=
- "filename">pkgsrc</code> directory in your <code class=
- "filename">/usr</code>, and all the package source will
- be stored under <code class=
- "filename">/usr/pkgsrc</code>. To update pkgsrc after the
- initial checkout, make sure you have <code class=
- "varname">CVS_RSH</code> set as above, then do:</p>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>setenv CVSROOT anoncvs@anoncvs.NetBSD.org:/cvsroot</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>setenv CVS_RSH ssh</tt></b>
+<tt class="prompt">%</tt> <b class="userinput"><tt>cd /usr</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cvs checkout -P pkgsrc</tt></b>
+</pre>
+
+ <p>This will create the <tt class="filename">pkgsrc</tt>
+ directory in your <tt class="filename">/usr</tt>, and all
+ the package source will be stored under <tt class=
+ "filename">/usr/pkgsrc</tt>. To update pkgsrc after the
+ initial checkout, make sure you have <tt class=
+ "varname">CVS_RSH</tt> set as above, then do:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cd /usr/pkgsrc</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cvs -q update -dP</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cd /usr/pkgsrc</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cvs -q update -dP</tt></b>
</pre>
<p>Please also note that it is possible to have multiple
@@ -1450,30 +1440,30 @@ release=pkgsrc
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2515077">3.1.
+ <dt><span class="sect1"><a href="#id2495210">3.1.
Bootstrapping pkgsrc</a></span></dt>
- <dt><span class="sect1"><a href="#id2515252">3.2.
+ <dt><span class="sect1"><a href="#id2495317">3.2.
Platform specific notes</a></span></dt>
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2515258">3.2.1.
+ <dt><span class="sect2"><a href="#id2495323">3.2.1.
Darwin (Mac OS X)</a></span></dt>
- <dt><span class="sect2"><a href="#id2515489">3.2.2.
+ <dt><span class="sect2"><a href="#id2495622">3.2.2.
FreeBSD</a></span></dt>
- <dt><span class="sect2"><a href="#id2515659">3.2.3.
+ <dt><span class="sect2"><a href="#id2496270">3.2.3.
Interix</a></span></dt>
- <dt><span class="sect2"><a href="#id2515750">3.2.4.
+ <dt><span class="sect2"><a href="#id2496361">3.2.4.
IRIX</a></span></dt>
- <dt><span class="sect2"><a href="#id2516277">3.2.5.
+ <dt><span class="sect2"><a href="#id2496478">3.2.5.
OpenBSD</a></span></dt>
- <dt><span class="sect2"><a href="#id2516389">3.2.6.
+ <dt><span class="sect2"><a href="#id2496659">3.2.6.
Solaris</a></span></dt>
</dl>
</dd>
@@ -1485,8 +1475,8 @@ release=pkgsrc
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2515077" id=
- "id2515077"></a>3.1.&nbsp;Bootstrapping pkgsrc</h2>
+ "id2495210" id=
+ "id2495210"></a>3.1.&nbsp;Bootstrapping pkgsrc</h2>
</div>
</div>
</div>
@@ -1534,24 +1524,23 @@ release=pkgsrc
<p>Installing the bootstrap kit should be as simple
as:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>env CVS_RSH=ssh cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout pkgsrc</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd pkgsrc/bootstrap</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>./bootstrap</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>env CVS_RSH=ssh cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout pkgsrc</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd pkgsrc/bootstrap</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>./bootstrap</tt></b>
</pre>
<p>See <a href="#getting" title=
"Chapter&nbsp;2.&nbsp;Where to get pkgsrc">Chapter 2,
<i>Where to get pkgsrc</i></a> for other ways to get
- pkgsrc before bootstrapping. The given
- <span><strong class="command">bootstrap</strong></span>
- command will use the defaults of <code class=
- "filename">/usr/pkg</code> for the <span class=
- "emphasis"><em>prefix</em></span> where programs will be
- installed in, and <code class=
- "filename">/var/db/pkg</code> for the package database
+ pkgsrc before bootstrapping. The given <span><b class=
+ "command">bootstrap</b></span> command will use the
+ defaults of <tt class="filename">/usr/pkg</tt> for the
+ <span class="emphasis"><em>prefix</em></span> where
+ programs will be installed in, and <tt class=
+ "filename">/var/db/pkg</tt> for the package database
directory where pkgsrc will do it's internal bookkeeping.
However, these can also be set using command-line
parameters.</p>
@@ -1568,7 +1557,7 @@ release=pkgsrc
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2515252" id="id2515252"></a>3.2.&nbsp;Platform
+ "id2495317" id="id2495317"></a>3.2.&nbsp;Platform
specific notes</h2>
</div>
</div>
@@ -1581,8 +1570,8 @@ release=pkgsrc
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2515258" id=
- "id2515258"></a>3.2.1.&nbsp;Darwin (Mac OS
+ <h3 class="title"><a name="id2495323" id=
+ "id2495323"></a>3.2.1.&nbsp;Darwin (Mac OS
X)</h3>
</div>
</div>
@@ -1636,14 +1625,14 @@ release=pkgsrc
<p>Create the disk image:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd pkgsrc/bootstrap</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>./ufsdiskimage create ~/Documents/NetBSD 512</code></strong> # megabytes - season to taste
-<code class="prompt">#</code> <strong class=
-"userinput"><code>./ufsdiskimage mount ~/Documents/NetBSD</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>sudo chown `id -u`:`id -g` /Volumes/NetBSD</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd pkgsrc/bootstrap</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>./ufsdiskimage create ~/Documents/NetBSD 512</tt></b> # megabytes - season to taste
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>./ufsdiskimage mount ~/Documents/NetBSD</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>sudo chown `id -u`:`id -g` /Volumes/NetBSD</tt></b>
</pre>
<p>That's it!</p>
@@ -1660,26 +1649,26 @@ release=pkgsrc
</div>
</div>
- <p>By default, <code class="filename">/usr</code>
- will be on your root file system, normally HFS+. It
- is possible to use the default <span class=
- "emphasis"><em>prefix</em></span> of <code class=
- "filename">/usr/pkg</code> by symlinking <code class=
- "filename">/usr/pkg</code> to a directory on a UFS
- file system. Obviously, another symlink is required
- if you want to place the package database directory
- outside the <span class=
- "emphasis"><em>prefix</em></span>. e.g.</p>
+ <p>By default, <tt class="filename">/usr</tt> will be
+ on your root file system, normally HFS+. It is
+ possible to use the default <span class=
+ "emphasis"><em>prefix</em></span> of <tt class=
+ "filename">/usr/pkg</tt> by symlinking <tt class=
+ "filename">/usr/pkg</tt> to a directory on a UFS file
+ system. Obviously, another symlink is required if you
+ want to place the package database directory outside
+ the <span class="emphasis"><em>prefix</em></span>.
+ e.g.</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>./bootstrap --pkgdbdir=/usr/pkg/pkgdb --pkgsrcdir=/Volumes/ufs/pkgsrc</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>./bootstrap --pkgdbdir=/usr/pkg/pkgdb --pkgsrcdir=/Volumes/ufs/pkgsrc</tt></b>
</pre>
<p>If you created your partitions at the time of
installing Mac OS X and formatted the target
partition as UFS, it should automatically mount on
- <code class="filename">/Volumes/&lt;volume
- name&gt;</code> when the machine boots. If you are
+ <tt class="filename">/Volumes/&lt;volume
+ name&gt;</tt> when the machine boots. If you are
(re)formatting a partition as UFS, you need to ensure
that the partition map correctly reflects
&#8220;<span class="quote">Apple_UFS</span>&#8221;
@@ -1714,8 +1703,8 @@ release=pkgsrc
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2515489" id=
- "id2515489"></a>3.2.2.&nbsp;FreeBSD</h3>
+ <h3 class="title"><a name="id2495622" id=
+ "id2495622"></a>3.2.2.&nbsp;FreeBSD</h3>
</div>
</div>
</div>
@@ -1731,10 +1720,10 @@ release=pkgsrc
<ol type="1">
<li>
<p>FreeBSD stores its ports pkg database in
- <code class="filename">/var/db/pkg</code>. It is
+ <tt class="filename">/var/db/pkg</tt>. It is
therefore recommended that you choose a different
- location (e.g. <code class=
- "filename">/usr/pkgdb</code>) by using the
+ location (e.g. <tt class=
+ "filename">/usr/pkgdb</tt>) by using the
--pkgdbdir option to the bootstrap script.</p>
</li>
@@ -1743,25 +1732,24 @@ release=pkgsrc
tools, it's probably a good idea to move them out
of the way to avoid confusion, e.g.</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /usr/sbin</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_add pkg_add.orig</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_create pkg_create.orig</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_delete pkg_delete.orig</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_info pkg_info.orig</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/sbin</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_add pkg_add.orig</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_create pkg_create.orig</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_delete pkg_delete.orig</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_info pkg_info.orig</tt></b>
</pre>
</li>
<li>
- <p>An example <code class=
- "filename">/etc/mk.conf</code> file will be
- placed in <code class=
- "filename">/etc/mk.conf.example</code> file when
- you use the bootstrap script.</p>
+ <p>An example <tt class=
+ "filename">/etc/mk.conf</tt> file will be placed
+ in <tt class="filename">/etc/mk.conf.example</tt>
+ file when you use the bootstrap script.</p>
</li>
</ol>
</div>
@@ -1771,8 +1759,8 @@ release=pkgsrc
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2515659" id=
- "id2515659"></a>3.2.3.&nbsp;Interix</h3>
+ <h3 class="title"><a name="id2496270" id=
+ "id2496270"></a>3.2.3.&nbsp;Interix</h3>
</div>
</div>
</div>
@@ -1942,17 +1930,17 @@ release=pkgsrc
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2515750" id=
- "id2515750"></a>3.2.4.&nbsp;IRIX</h3>
+ <h3 class="title"><a name="id2496361" id=
+ "id2496361"></a>3.2.4.&nbsp;IRIX</h3>
</div>
</div>
</div>
<p>You will need a working C compiler, either gcc or
SGI's MIPS and MIPSpro compiler (cc/c89). Please set
- the <code class="varname">CC</code> environment
- variable according to your preference. If you do not
- have a license for the MIPSpro compiler suite, you can
+ the <tt class="varname">CC</tt> environment variable
+ according to your preference. If you do not have a
+ license for the MIPSpro compiler suite, you can
download a gcc tardist file from <a href=
"http://freeware.sgi.com/" target=
"_top">http://freeware.sgi.com/</a>.</p>
@@ -1969,16 +1957,16 @@ release=pkgsrc
built with.</p>
<p>Therefore, please make sure that you have no
- conflicting <code class="varname">CFLAGS</code> in your
- environment or the <code class=
- "filename">/etc/mk.conf</code>. Particularly, make sure
+ conflicting <tt class="varname">CFLAGS</tt> in your
+ environment or the <tt class=
+ "filename">/etc/mk.conf</tt>. Particularly, make sure
that you do not try to link n32 object files with lib64
- or vice versa. Check your <code class=
- "filename">/etc/compiler.defaults</code>!</p>
+ or vice versa. Check your <tt class=
+ "filename">/etc/compiler.defaults</tt>!</p>
<p>If you have the actual pkgsrc tree mounted via NFS
from a different host, please make sure to set
- <code class="varname">WRKOBJDIR</code> to a local
+ <tt class="varname">WRKOBJDIR</tt> to a local
directory, as it appears that IRIX linker occasionally
runs into issues when trying to link over a network
mounted filesystem.</p>
@@ -1986,8 +1974,8 @@ release=pkgsrc
<p>The bootstrapping process should set all the right
options for programs such as imake(1), but you may want
to set some options depending on your local setup.
- Please see <code class=
- "filename">pkgsrc/mk/defaults/mk.conf</code> and, of
+ Please see <tt class=
+ "filename">pkgsrc/mk/defaults/mk.conf</tt> and, of
course, your compilers man pages for details.</p>
</div>
@@ -1995,8 +1983,8 @@ release=pkgsrc
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516277" id=
- "id2516277"></a>3.2.5.&nbsp;OpenBSD</h3>
+ <h3 class="title"><a name="id2496478" id=
+ "id2496478"></a>3.2.5.&nbsp;OpenBSD</h3>
</div>
</div>
</div>
@@ -2011,10 +1999,10 @@ release=pkgsrc
<ol type="1">
<li>
<p>OpenBSD stores its ports pkg database in
- <code class="filename">/var/db/pkg</code>. It is
+ <tt class="filename">/var/db/pkg</tt>. It is
therefore recommended that you choose a different
- location (e.g. <code class=
- "filename">/usr/pkgdb</code>) by using the
+ location (e.g. <tt class=
+ "filename">/usr/pkgdb</tt>) by using the
--pkgdbdir option to the bootstrap script.</p>
</li>
@@ -2023,27 +2011,26 @@ release=pkgsrc
tools, it's probably a good idea to move them out
of the way to avoid confusion, e.g.</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /usr/sbin</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_add pkg_add.orig</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_create pkg_create.orig</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_delete pkg_delete.orig</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mv pkg_info pkg_info.orig</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/sbin</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_add pkg_add.orig</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_create pkg_create.orig</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_delete pkg_delete.orig</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mv pkg_info pkg_info.orig</tt></b>
</pre>
</li>
<li>
- <p>An example <code class=
- "filename">/etc/mk.conf</code> file will be
- placed in <code class=
- "filename">/etc/mk.conf.example</code> file when
- you use the bootstrap script. OpenBSD's make
- program uses <code class=
- "filename">/etc/mk.conf</code> as well. You can
+ <p>An example <tt class=
+ "filename">/etc/mk.conf</tt> file will be placed
+ in <tt class="filename">/etc/mk.conf.example</tt>
+ file when you use the bootstrap script. OpenBSD's
+ make program uses <tt class=
+ "filename">/etc/mk.conf</tt> as well. You can
work around this by enclosing all the pkgsrc
specific parts of the file with:</p>
<pre class="programlisting">
@@ -2062,8 +2049,8 @@ release=pkgsrc
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516389" id=
- "id2516389"></a>3.2.6.&nbsp;Solaris</h3>
+ <h3 class="title"><a name="id2496659" id=
+ "id2496659"></a>3.2.6.&nbsp;Solaris</h3>
</div>
</div>
</div>
@@ -2107,8 +2094,8 @@ release=pkgsrc
<div class="titlepage">
<div>
<div>
- <h4 class="title"><a name="id2516420" id=
- "id2516420"></a>3.2.6.1.&nbsp;If you are using
+ <h4 class="title"><a name="id2496690" id=
+ "id2496690"></a>3.2.6.1.&nbsp;If you are using
gcc</h4>
</div>
</div>
@@ -2122,23 +2109,23 @@ release=pkgsrc
<a xmlns="http://www.w3.org/TR/xhtml1/transitional"
href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/lang/gcc/README.html"
- class="pkgname">lang/gcc</a> or install a binary gcc
- package, then remove gcc used during
- bootstrapping.</p>
+ class="pkgname">lang/gcc</a> or install a binary
+ gcc package, then remove gcc used during
+ bootstrapping.</p>
<p>Binary packages of gcc can be found through
<a href=
"http://www.sun.com/bigadmin/common/freewareSearch.html"
- target=
- "_top">http://www.sun.com/bigadmin/common/freewareSearch.html</a>.</p>
+ target=
+ "_top">http://www.sun.com/bigadmin/common/freewareSearch.html</a>.</p>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h4 class="title"><a name="id2516441" id=
- "id2516441"></a>3.2.6.2.&nbsp;If you are using
+ <h4 class="title"><a name="id2496711" id=
+ "id2496711"></a>3.2.6.2.&nbsp;If you are using
Sun WorkShop</h4>
</div>
</div>
@@ -2169,10 +2156,10 @@ release=pkgsrc
</ul>
</div>
- <p>You should set <code class="varname">CC</code>,
- <code class="varname">CXX</code> and optionally,
- <code class="varname">CPP</code> in <code class=
- "filename">/etc/mk.conf</code>, eg.</p>
+ <p>You should set <tt class="varname">CC</tt>,
+ <tt class="varname">CXX</tt> and optionally,
+ <tt class="varname">CPP</tt> in <tt class=
+ "filename">/etc/mk.conf</tt>, eg.</p>
<pre class="programlisting">
CC= cc
CXX= CC
@@ -2187,10 +2174,9 @@ CFLAGS= -xtarget=ultra -xarch=v9
<p>Whichever compiler you use, please ensure the
compiler tools and your $prefix are in your
- <code class="varname">PATH</code>. This includes
- <code class="filename">/usr/ccs/{bin,lib}</code> and
- eg. <code class=
- "filename">/usr/pkg/{bin,sbin}</code>.</p>
+ <tt class="varname">PATH</tt>. This includes
+ <tt class="filename">/usr/ccs/{bin,lib}</tt> and eg.
+ <tt class="filename">/usr/pkg/{bin,sbin}</tt>.</p>
</div>
</div>
</div>
@@ -2215,32 +2201,32 @@ CFLAGS= -xtarget=ultra -xarch=v9
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2516525">4.1.1.
+ <dt><span class="sect2"><a href="#id2496864">4.1.1.
Where to get binary packages</a></span></dt>
- <dt><span class="sect2"><a href="#id2516566">4.1.2.
+ <dt><span class="sect2"><a href="#id2496904">4.1.2.
How to use binary packages</a></span></dt>
- <dt><span class="sect2"><a href="#id2516700">4.1.3.
+ <dt><span class="sect2"><a href="#id2497038">4.1.3.
A word of warning</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2516712">4.2.
+ <dt><span class="sect1"><a href="#id2497050">4.2.
Building packages from source</a></span></dt>
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2516722">4.2.1.
+ <dt><span class="sect2"><a href="#id2497128">4.2.1.
Requirements</a></span></dt>
- <dt><span class="sect2"><a href="#id2516742">4.2.2.
+ <dt><span class="sect2"><a href="#id2497148">4.2.2.
Fetching distfiles</a></span></dt>
- <dt><span class="sect2"><a href="#id2516862">4.2.3.
+ <dt><span class="sect2"><a href="#id2497201">4.2.3.
How to build and install</a></span></dt>
- <dt><span class="sect2"><a href="#id2517179">4.2.4.
+ <dt><span class="sect2"><a href="#id2498132">4.2.4.
Selecting the compiler</a></span></dt>
</dl>
</dd>
@@ -2267,31 +2253,30 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516525" id=
- "id2516525"></a>4.1.1.&nbsp;Where to get binary
+ <h3 class="title"><a name="id2496864" id=
+ "id2496864"></a>4.1.1.&nbsp;Where to get binary
packages</h3>
</div>
</div>
</div>
<p>Precompiled packages are stored on ftp.NetBSD.org
- and its mirrors in the directory <code class=
- "filename">/pub/NetBSD/packages</code> for anonymous
- FTP access. Please pick the right subdirectory there as
- indicated by <span><strong class="command">uname
- -p</strong></span>. In that directory, there is a
+ and its mirrors in the directory <tt class=
+ "filename">/pub/NetBSD/packages</tt> for anonymous FTP
+ access. Please pick the right subdirectory there as
+ indicated by <span><b class="command">uname
+ -p</b></span>. In that directory, there is a
subdirectory for each category plus a subdirectory
- <code class="filename">All</code> which includes the
- actual binaries in <code class="filename">.tgz</code>
- files. The category subdirectories use symbolic links
- to those files (this is the same directory layout as in
- <code class=
- "filename">/usr/pkgsrc/packages</code>).</p>
+ <tt class="filename">All</tt> which includes the actual
+ binaries in <tt class="filename">.tgz</tt> files. The
+ category subdirectories use symbolic links to those
+ files (this is the same directory layout as in
+ <tt class="filename">/usr/pkgsrc/packages</tt>).</p>
<p>This same directory layout applies for CDROM
distributions, only that the directory may be rooted
- somewhere else, probably somewhere below <code class=
- "filename">/cdrom</code>. Please consult your CDROMs
+ somewhere else, probably somewhere below <tt class=
+ "filename">/cdrom</tt>. Please consult your CDROMs
documentation for the exact location.</p>
</div>
@@ -2299,8 +2284,8 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516566" id=
- "id2516566"></a>4.1.2.&nbsp;How to use binary
+ <h3 class="title"><a name="id2496904" id=
+ "id2496904"></a>4.1.2.&nbsp;How to use binary
packages</h3>
</div>
</div>
@@ -2308,44 +2293,43 @@ CFLAGS= -xtarget=ultra -xarch=v9
<p>If you have the files on a CDROM or downloaded them
to your hard disk, youcan install them with the
- following command (be sure to<span><strong class=
- "command">su</strong></span> to root first):</p>
+ following command (be sure to<span><b class=
+ "command">su</b></span> to root first):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>pkg_add /path/to/package.tgz</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>pkg_add /path/to/package.tgz</tt></b>
</pre>
<p>If you have FTP access and you don't want to
download the packages via FTP prior to installation,
- you can do this automatically by giving
- <span><strong class="command">pkg_add</strong></span>
- an FTP URL:</p>
+ you can do this automatically by giving <span><b class=
+ "command">pkg_add</b></span> an FTP URL:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>pkg_add ftp://ftp.NetBSD.org/pub/NetBSD/packages/&lt;OSvers&gt;/&lt;arch&gt;/All/package.tgz</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>pkg_add ftp://ftp.NetBSD.org/pub/NetBSD/packages/&lt;OSvers&gt;/&lt;arch&gt;/All/package.tgz</tt></b>
</pre>
<p>If there is any doubt, the uname utility can be used
to determine the &lt;OSvers&gt;, and &lt;arch&gt; by
- running <span><strong class="command">uname
- -rp</strong></span>.</p>
+ running <span><b class="command">uname
+ -rp</b></span>.</p>
<p>Also note that any prerequisite packages needed to
run the package in question will be installed, too,
assuming they are present where you install from.</p>
<p>After you've installed packages, be sure to have
- <code class="filename">/usr/pkg/bin</code> in your
- <code class="varname">PATH</code> so you can actually
- start the just installed program.</p>
+ <tt class="filename">/usr/pkg/bin</tt> in your
+ <tt class="varname">PATH</tt> so you can actually start
+ the just installed program.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516700" id=
- "id2516700"></a>4.1.3.&nbsp;A word of
+ <h3 class="title"><a name="id2497038" id=
+ "id2497038"></a>4.1.3.&nbsp;A word of
warning</h3>
</div>
</div>
@@ -2368,7 +2352,7 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2516712" id="id2516712"></a>4.2.&nbsp;Building
+ "id2497050" id="id2497050"></a>4.2.&nbsp;Building
packages from source</h2>
</div>
</div>
@@ -2383,8 +2367,8 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516722" id=
- "id2516722"></a>4.2.1.&nbsp;Requirements</h3>
+ <h3 class="title"><a name="id2497128" id=
+ "id2497128"></a>4.2.1.&nbsp;Requirements</h3>
</div>
</div>
</div>
@@ -2403,8 +2387,8 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516742" id=
- "id2516742"></a>4.2.2.&nbsp;Fetching
+ <h3 class="title"><a name="id2497148" id=
+ "id2497148"></a>4.2.2.&nbsp;Fetching
distfiles</h3>
</div>
</div>
@@ -2420,33 +2404,33 @@ CFLAGS= -xtarget=ultra -xarch=v9
<p>You can overwrite some of the major distribution
sites to fit to sites that are close to your own. Have
- a look at <code class=
- "filename">pkgsrc/mk/defaults/mk.conf</code> to find
- some examples - in particular, look for the
- <code class="varname">MASTER_SORT</code>, <code class=
- "varname">MASTER_SORT_REGEX</code> and <code class=
- "varname">INET_COUNTRY</code> definitions. This may
- save some of your bandwidth and time.</p>
+ a look at <tt class=
+ "filename">pkgsrc/mk/defaults/mk.conf</tt> to find some
+ examples - in particular, look for the <tt class=
+ "varname">MASTER_SORT</tt>, <tt class=
+ "varname">MASTER_SORT_REGEX</tt> and <tt class=
+ "varname">INET_COUNTRY</tt> definitions. This may save
+ some of your bandwidth and time.</p>
<p>You can change these settings either in your shell's
environment, or, if you want to keep the settings, by
- editing the <code class="filename">/etc/mk.conf</code>
+ editing the <tt class="filename">/etc/mk.conf</tt>
file, and adding the definitions there.</p>
<p>If you don't have a permanent Internet connection
and you want to know which files to download,
- <span><strong class="command">make
- fetch-list</strong></span> will tell you what you'll
- need. Put these distfiles into <code class=
- "filename">/usr/pkgsrc/distfiles</code>.</p>
+ <span><b class="command">make fetch-list</b></span>
+ will tell you what you'll need. Put these distfiles
+ into <tt class=
+ "filename">/usr/pkgsrc/distfiles</tt>.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2516862" id=
- "id2516862"></a>4.2.3.&nbsp;How to build and
+ <h3 class="title"><a name="id2497201" id=
+ "id2497201"></a>4.2.3.&nbsp;How to build and
install</h3>
</div>
</div>
@@ -2454,20 +2438,19 @@ CFLAGS= -xtarget=ultra -xarch=v9
<p>Assuming that the distfile has been fetched (see
previous section), become root and change into the
- relevant directory and running <span><strong class=
- "command">make</strong></span>. For example, type</p>
+ relevant directory and running <span><b class=
+ "command">make</b></span>. For example, type</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cd misc/figlet</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cd misc/figlet</tt></b>
+<tt class="prompt">%</tt> <b class="userinput"><tt>make</tt></b>
</pre>
<p>at the shell prompt to build the various components
of the package, and</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make install</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make install</tt></b>
</pre>
<p>to install the various components into the correct
@@ -2484,39 +2467,35 @@ CFLAGS= -xtarget=ultra -xarch=v9
logs</i></a>.</p>
<p>The program is installed under the default root of
- the packages tree - <code class=
- "filename">/usr/pkg</code>. Should this not conform to
- your tastes, set the <code class=
- "varname">LOCALBASE</code> variable in your
+ the packages tree - <tt class="filename">/usr/pkg</tt>.
+ Should this not conform to your tastes, set the
+ <tt class="varname">LOCALBASE</tt> variable in your
environment, and it will use that value as the root of
- your packages tree. So, to use <code class=
- "filename">/usr/local</code>, set <code class=
- "varname">LOCALBASE=/usr/local</code> in your
+ your packages tree. So, to use <tt class=
+ "filename">/usr/local</tt>, set <tt class=
+ "varname">LOCALBASE=/usr/local</tt> in your
environment. Please note that you should use a
directory which is dedicated to packages and not shared
- with other programs (ie, do not try and use
- <code class="varname">LOCALBASE=/usr</code>). Also, you
- should not try to add any of your own files or
- directories (such as <code class=
- "filename">src/</code>, <code class=
- "filename">obj/</code>, or <code class=
- "filename">pkgsrc/</code>) below the <code class=
- "varname">LOCALBASE</code> tree. This is to prevent
+ with other programs (ie, do not try and use <tt class=
+ "varname">LOCALBASE=/usr</tt>). Also, you should not
+ try to add any of your own files or directories (such
+ as <tt class="filename">src/</tt>, <tt class=
+ "filename">obj/</tt>, or <tt class=
+ "filename">pkgsrc/</tt>) below the <tt class=
+ "varname">LOCALBASE</tt> tree. This is to prevent
possible conflicts between programs and other files
installed by the package system and whatever else may
have been installed there.</p>
- <p>Some packages look in <code class=
- "filename">/etc/mk.conf</code> to alter some
+ <p>Some packages look in <tt class=
+ "filename">/etc/mk.conf</tt> to alter some
configuration options at build time. Have a look at
- <code class=
- "filename">pkgsrc/mk/defaults/mk.conf</code> to get an
- overview of what will be set there by default.
- Environment variables such as <code class=
- "varname">LOCALBASE</code> can be set in <code class=
- "filename">/etc/mk.conf</code> to save having to
- remember to set them each time you want to use
- pkgsrc.</p>
+ <tt class="filename">pkgsrc/mk/defaults/mk.conf</tt> to
+ get an overview of what will be set there by default.
+ Environment variables such as <tt class=
+ "varname">LOCALBASE</tt> can be set in <tt class=
+ "filename">/etc/mk.conf</tt> to save having to remember
+ to set them each time you want to use pkgsrc.</p>
<p>Occasionally, people want to &#8220;<span class=
"quote">look under the covers</span>&#8221; to see what
@@ -2532,13 +2511,11 @@ CFLAGS= -xtarget=ultra -xarch=v9
"http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">make</span>(1)</span></a> command
- with <code class=
- "varname">PKG_DEBUG_LEVEL=2</code>, then a huge
- amount of information will be displayed. For
- example,</p>
+ with <tt class="varname">PKG_DEBUG_LEVEL=2</tt>,
+ then a huge amount of information will be
+ displayed. For example,</p>
<pre class="screen">
-<strong class=
-"userinput"><code>make patch PKG_DEBUG_LEVEL=2</code></strong>
+<b class="userinput"><tt>make patch PKG_DEBUG_LEVEL=2</tt></b>
</pre>
<p>will show all the commands that are invoked,
@@ -2548,20 +2525,19 @@ CFLAGS= -xtarget=ultra -xarch=v9
<li>
<p>If you want to know the value of a certain
- make(1) definition, then the <code class=
- "varname">VARNAME</code> definition should be
- used, in conjunction with the show-var target.
- e.g. to show the expansion of the <a href=
+ make(1) definition, then the <tt class=
+ "varname">VARNAME</tt> definition should be used,
+ in conjunction with the show-var target. e.g. to
+ show the expansion of the <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">make</span>(1)</span></a>
- variable <code class=
- "varname">DISTFILES</code>:</p>
+ variable <tt class="varname">DISTFILES</tt>:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make show-var VARNAME=LOCALBASE</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>make show-var VARNAME=LOCALBASE</tt></b>
/usr/pkg
-<code class="prompt">%</code>
+<tt class="prompt">%</tt>
</pre>
</li>
@@ -2577,41 +2553,39 @@ CFLAGS= -xtarget=ultra -xarch=v9
"http://netbsd.gw.com/cgi-bin/man-cgi?pkg_add+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">pkg_add</span>(1)</span></a>, else do a
- <span><strong class="command">make
- package</strong></span>. The list of remote FTP sites
- searched is kept in the variable <code class=
- "varname">BINPKG_SITES</code>, which defaults to
- ftp.NetBSD.org. Any flags that should be added to
- <a href=
+ <span><b class="command">make package</b></span>. The
+ list of remote FTP sites searched is kept in the
+ variable <tt class="varname">BINPKG_SITES</tt>, which
+ defaults to ftp.NetBSD.org. Any flags that should be
+ added to <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?pkg_add+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">pkg_add</span>(1)</span></a> can be put
- into <code class="varname">BIN_INSTALL_FLAGS</code>.
- See <code class=
- "filename">pkgsrc/mk/defaults/mk.conf</code> for more
- details.</p>
+ into <tt class="varname">BIN_INSTALL_FLAGS</tt>. See
+ <tt class="filename">pkgsrc/mk/defaults/mk.conf</tt>
+ for more details.</p>
<p>A final word of warning: If you setup a system that
- has a non-standard setting for <code class=
- "varname">LOCALBASE</code>, be sure to set that before
+ has a non-standard setting for <tt class=
+ "varname">LOCALBASE</tt>, be sure to set that before
any packages are installed, as you can not use several
directories for the same purpose. Doing so will result
in pkgsrc not being able to properly detect your
installed packages, and fail miserably. Note also that
precompiled binary packages are usually built with the
- default <code class="varname">LOCALBASE</code> of
- <code class="filename">/usr/pkg</code>, and that you
- should <span class="emphasis"><em>not</em></span>
- install any if you use a non-standard <code class=
- "varname">LOCALBASE</code>.</p>
+ default <tt class="varname">LOCALBASE</tt> of
+ <tt class="filename">/usr/pkg</tt>, and that you should
+ <span class="emphasis"><em>not</em></span> install any
+ if you use a non-standard <tt class=
+ "varname">LOCALBASE</tt>.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2517179" id=
- "id2517179"></a>4.2.4.&nbsp;Selecting the
+ <h3 class="title"><a name="id2498132" id=
+ "id2498132"></a>4.2.4.&nbsp;Selecting the
compiler</h3>
</div>
</div>
@@ -2623,8 +2597,8 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div class="variablelist">
<dl>
- <dt><span class="term"><code class=
- "varname">PKGSRC_COMPILER</code>:</span></dt>
+ <dt><span class="term"><tt class=
+ "varname">PKGSRC_COMPILER</tt>:</span></dt>
<dd>
<p>This is a list of values specifying the chain
@@ -2634,33 +2608,33 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="varname">distcc</code>:
+ <p><tt class="varname">distcc</tt>:
distributed C/C++ (chainable)</p>
</li>
<li>
- <p><code class="varname">ccache</code>:
+ <p><tt class="varname">ccache</tt>:
compiler cache (chainable)</p>
</li>
<li>
- <p><code class="varname">gcc</code>: GNU
- C/C++ Compiler</p>
+ <p><tt class="varname">gcc</tt>: GNU C/C++
+ Compiler</p>
</li>
<li>
- <p><code class="varname">mipspro</code>:
+ <p><tt class="varname">mipspro</tt>:
Silicon Graphics, Inc. MIPSpro
(n32/n64)</p>
</li>
<li>
- <p><code class="varname">mipspro</code>:
+ <p><tt class="varname">mipspro</tt>:
Silicon Graphics, Inc. MIPSpro (o32)</p>
</li>
<li>
- <p><code class="varname">sunpro</code>:
+ <p><tt class="varname">sunpro</tt>:
Microsystems, Inc. WorkShip/Forte/Sun ONE
Studio</p>
</li>
@@ -2668,20 +2642,19 @@ CFLAGS= -xtarget=ultra -xarch=v9
</div>
<p>The default is &#8220;<span class=
- "quote"><code class=
- "varname">gcc</code></span>&#8221;. You can use
- <code class="varname">ccache</code> and/or
- <code class="varname">distcc</code> with an
- appropriate <code class=
- "varname">PKGSRC_COMPILER</code> setting, e.g.
- &#8220;<span class="quote"><code class=
- "varname">ccache gcc</code></span>&#8221;. This
+ "quote"><tt class=
+ "varname">gcc</tt></span>&#8221;. You can use
+ <tt class="varname">ccache</tt> and/or <tt class=
+ "varname">distcc</tt> with an appropriate
+ <tt class="varname">PKGSRC_COMPILER</tt> setting,
+ e.g. &#8220;<span class="quote"><tt class=
+ "varname">ccache gcc</tt></span>&#8221;. This
variable should always be terminated with a value
for a real compiler.</p>
</dd>
- <dt><span class="term"><code class=
- "varname">GCC_REQD</code>:</span></dt>
+ <dt><span class="term"><tt class=
+ "varname">GCC_REQD</tt>:</span></dt>
<dd>
<p>This specifies the minimum version of GCC to
@@ -2711,10 +2684,10 @@ CFLAGS= -xtarget=ultra -xarch=v9
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2517334">5.1.
+ <dt><span class="sect1"><a href="#id2563003">5.1.
Building a single binary package</a></span></dt>
- <dt><span class="sect1"><a href="#id2517821">5.2.
+ <dt><span class="sect1"><a href="#id2563081">5.2.
Settings for creation of binary
packages</a></span></dt>
@@ -2727,34 +2700,38 @@ CFLAGS= -xtarget=ultra -xarch=v9
"#binary.configuration">5.3.1.
Configuration</a></span></dt>
- <dt><span class="sect2"><a href="#id2517961">5.3.2.
+ <dt><span class="sect2"><a href="#id2563289">5.3.2.
Other environmental considerations</a></span></dt>
- <dt><span class="sect2"><a href="#id2518002">5.3.3.
+ <dt><span class="sect2"><a href="#id2563330">5.3.3.
Operation</a></span></dt>
- <dt><span class="sect2"><a href="#id2583267">5.3.4.
+ <dt><span class="sect2"><a href="#id2563467">5.3.4.
What it does</a></span></dt>
- <dt><span class="sect2"><a href="#id2583392">5.3.5.
+ <dt><span class="sect2"><a href="#id2563524">5.3.5.
Disk space requirements</a></span></dt>
- <dt><span class="sect2"><a href="#id2583418">5.3.6.
+ <dt><span class="sect2"><a href="#id2563550">5.3.6.
Setting up a sandbox for chroot'ed
builds</a></span></dt>
- <dt><span class="sect2"><a href="#id2583811">5.3.7.
+ <dt><span class="sect2"><a href="#id2563943">5.3.7.
Building a partial set of packages</a></span></dt>
+
+ <dt><span class="sect2"><a href=
+ "#bulk-upload">5.3.8. Uploading results of a bulk
+ build</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2583853">5.4.
+ <dt><span class="sect1"><a href="#id2564359">5.4.
Creating a multiple CD-ROM packages
collection</a></span></dt>
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2583868">5.4.1.
+ <dt><span class="sect2"><a href="#id2564442">5.4.1.
Example of cdpack</a></span></dt>
</dl>
</dd>
@@ -2766,7 +2743,7 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2517334" id="id2517334"></a>5.1.&nbsp;Building a
+ "id2563003" id="id2563003"></a>5.1.&nbsp;Building a
single binary package</h2>
</div>
</div>
@@ -2785,29 +2762,28 @@ CFLAGS= -xtarget=ultra -xarch=v9
it.</p>
<p>To create a binary package, change into the
- appropriate directory in pkgsrc, and run
- <span><strong class="command">make
- package</strong></span>:</p>
+ appropriate directory in pkgsrc, and run <span><b class=
+ "command">make package</b></span>:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd misc/figlet</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make package</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd misc/figlet</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make package</tt></b>
</pre>
<p>This will build and install your package (if not
already done), and then build a binary package from what
- was installed. You can then use the <span><strong class=
- "command">pkg_*</strong></span> tools to manipulate it.
- Binary packages are created by default in <code class=
- "filename">/usr/pkgsrc/packages</code>, in the form of a
+ was installed. You can then use the <span><b class=
+ "command">pkg_*</b></span> tools to manipulate it. Binary
+ packages are created by default in <tt class=
+ "filename">/usr/pkgsrc/packages</tt>, in the form of a
gzipped tar file. See <a href="#logs.package" title=
"B.2.&nbsp;Packaging figlet">Section B.2,
&#8220;Packaging figlet&#8221;</a> for a continuation of
the above <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/misc/figlet/README.html"
- class="pkgname">misc/figlet</a> example.</p>
+ class="pkgname">misc/figlet</a> example.</p>
<p>See <a href="#submit" title=
"Chapter&nbsp;14.&nbsp;Submitting and Committing">Chapter
@@ -2820,7 +2796,7 @@ CFLAGS= -xtarget=ultra -xarch=v9
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2517821" id="id2517821"></a>5.2.&nbsp;Settings
+ "id2563081" id="id2563081"></a>5.2.&nbsp;Settings
for creation of binary packages</h2>
</div>
</div>
@@ -2877,14 +2853,14 @@ CFLAGS= -xtarget=ultra -xarch=v9
</div>
</div>
- <p>You may want to set things in <code class=
- "filename">/etc/mk.conf</code>. Look at <code class=
- "filename">pkgsrc/mk/defaults/mk.conf</code> for
+ <p>You may want to set things in <tt class=
+ "filename">/etc/mk.conf</tt>. Look at <tt class=
+ "filename">pkgsrc/mk/defaults/mk.conf</tt> for
details of the default settings. You will want to
- ensure that <code class=
- "varname">ACCEPTABLE_LICENSES</code> meet your local
- policy. As used in this example, <code class=
- "varname">_ACCEPTABLE=yes</code> accepts <span class=
+ ensure that <tt class=
+ "varname">ACCEPTABLE_LICENSES</tt> meet your local
+ policy. As used in this example, <tt class=
+ "varname">_ACCEPTABLE=yes</tt> accepts <span class=
"emphasis"><em>all</em></span> licenses.</p>
<pre class="programlisting">
PACKAGES?= ${_PKGSRCDIR}/packages/${MACHINE_ARCH}
@@ -2902,17 +2878,17 @@ _ACCEPTABLE= yes
<div class="titlepage">
<div>
<div>
- <h4 class="title"><a name="id2517885" id=
- "id2517885"></a>5.3.1.2.&nbsp;<code class=
- "filename">build.conf</code></h4>
+ <h4 class="title"><a name="id2563145" id=
+ "id2563145"></a>5.3.1.2.&nbsp;<tt class=
+ "filename">build.conf</tt></h4>
</div>
</div>
</div>
- <p>In <code class="filename">pkgsrc/mk/bulk</code>,
- copy <code class="filename">build.conf-example</code>
- to <code class="filename">build.conf</code> and edit
- it, following the comments in that file. This is the
+ <p>In <tt class="filename">pkgsrc/mk/bulk</tt>, copy
+ <tt class="filename">build.conf-example</tt> to
+ <tt class="filename">build.conf</tt> and edit it,
+ following the comments in that file. This is the
config file that determines where log files are
generated after the build, where to mail the build
report to, where your pkgsrc tree is located and
@@ -2920,34 +2896,33 @@ _ACCEPTABLE= yes
"http://netbsd.gw.com/cgi-bin/man-cgi?su+8+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">su</span>(8)</span></a> to to do a
- <span><strong class="command">cvs
- update</strong></span>.</p>
+ <span><b class="command">cvs update</b></span>.</p>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h4 class="title"><a name="id2517922" id=
- "id2517922"></a>5.3.1.3.&nbsp;<code class=
- "filename">pre-build.local</code></h4>
+ <h4 class="title"><a name="id2563181" id=
+ "id2563181"></a>5.3.1.3.&nbsp;<tt class=
+ "filename">pre-build.local</tt></h4>
</div>
</div>
</div>
<p>It is possible to configure the bulk build to
perform certain site specific tasks at the end of the
- pre-build stage. If the file <code class=
- "filename">pre-build.local</code> exists in
- <code class="filename">/usr/pkgsrc/mk/bulk</code> it
- will be executed (as a sh(1) script) at the end of
- the usual pre-build stage. An example use of
- <code class="filename">pre-build.local</code> is to
- have the line:</p>
+ pre-build stage. If the file <tt class=
+ "filename">pre-build.local</tt> exists in <tt class=
+ "filename">/usr/pkgsrc/mk/bulk</tt> it will be
+ executed (as a sh(1) script) at the end of the usual
+ pre-build stage. An example use of <tt class=
+ "filename">pre-build.local</tt> is to have the
+ line:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>echo "I do not have enough disk space to build this pig." \
- &gt; pkgsrc/games/crafty-book-enormous/$BROKENF</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>echo "I do not have enough disk space to build this pig." \
+ &gt; pkgsrc/games/crafty-book-enormous/$BROKENF</tt></b>
</pre>
<p>to prevent the system from trying to build a
@@ -2960,31 +2935,30 @@ _ACCEPTABLE= yes
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2517961" id=
- "id2517961"></a>5.3.2.&nbsp;Other environmental
+ <h3 class="title"><a name="id2563289" id=
+ "id2563289"></a>5.3.2.&nbsp;Other environmental
considerations</h3>
</div>
</div>
</div>
- <p>As <code class="filename">/usr/pkg</code> will be
+ <p>As <tt class="filename">/usr/pkg</tt> will be
completely deleted at the start of bulk builds, make
sure your login shell is placed somewhere else. Either
- drop it into <code class=
- "filename">/usr/local/bin</code> (and adjust your login
- shell in the passwd file), or (re-)install it via
- <a href=
+ drop it into <tt class="filename">/usr/local/bin</tt>
+ (and adjust your login shell in the passwd file), or
+ (re-)install it via <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?pkg_add+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">pkg_add</span>(1)</span></a> from
- <code class="filename">/etc/rc.local</code>, so you can
+ <tt class="filename">/etc/rc.local</tt>, so you can
login after a reboot (remember that your current
process won't die if the package is removed, you just
can't start any new instances of the shell any more).
Also, if you use NetBSD earlier than 1.5, or you still
want to use the pkgsrc version of ssh for some reason,
be sure to install ssh before starting it from
- <code class="filename">rc.local</code>:</p>
+ <tt class="filename">rc.local</tt>:</p>
<pre class="programlisting">
( cd /usr/pkgsrc/security/ssh ; make bulk-install )
if [ -f /usr/pkg/etc/rc.d/sshd ]; then
@@ -3002,8 +2976,8 @@ fi
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2518002" id=
- "id2518002"></a>5.3.3.&nbsp;Operation</h3>
+ <h3 class="title"><a name="id2563330" id=
+ "id2563330"></a>5.3.3.&nbsp;Operation</h3>
</div>
</div>
</div>
@@ -3022,35 +2996,35 @@ fi
<p>Be sure to remove all other things that might
interfere with builds, like some libs installed in
- <code class="filename">/usr/local</code>, etc. then
- become root and type:</p>
+ <tt class="filename">/usr/local</tt>, etc. then become
+ root and type:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /usr/pkgsrc</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>sh mk/bulk/build</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/pkgsrc</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>sh mk/bulk/build</tt></b>
</pre>
<p>If for some reason your last build didn't complete
(power failure, system panic, ...), you can continue it
by running:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>sh mk/bulk/build restart</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>sh mk/bulk/build restart</tt></b>
</pre>
<p>At the end of the bulk build, you will get a summary
via mail, and find build logs in the directory
- specified by <code class="varname">FTP</code> in the
- <code class="filename">build.conf</code> file.</p>
+ specified by <tt class="varname">FTP</tt> in the
+ <tt class="filename">build.conf</tt> file.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2583267" id=
- "id2583267"></a>5.3.4.&nbsp;What it does</h3>
+ <h3 class="title"><a name="id2563467" id=
+ "id2563467"></a>5.3.4.&nbsp;What it does</h3>
</div>
</div>
</div>
@@ -3083,33 +3057,33 @@ fi
<dd>
<p>Generates a report that's placed in the
- directory specified in the <code class=
- "filename">build.conf</code> file named
- <code class="filename">broken.html</code>, a
- short version of that report will also be mailed
- to the build's admin.</p>
+ directory specified in the <tt class=
+ "filename">build.conf</tt> file named <tt class=
+ "filename">broken.html</tt>, a short version of
+ that report will also be mailed to the build's
+ admin.</p>
</dd>
</dl>
</div>
<p>During the build, a list of broken packages will be
- compiled in <code class=
- "filename">/usr/pkgsrc/.broken</code> (or <code class=
- "filename">.../.broken.${MACHINE}</code> if
- <code class="varname">OBJMACHINE</code> is set),
- individual build logs of broken builds can be found in
- the package's directory. These files are used by the
- bulk-targets to mark broken builds to not waste time
- trying to rebuild them, and they can be used to debug
- these broken package builds later.</p>
+ compiled in <tt class=
+ "filename">/usr/pkgsrc/.broken</tt> (or <tt class=
+ "filename">.../.broken.${MACHINE}</tt> if <tt class=
+ "varname">OBJMACHINE</tt> is set), individual build
+ logs of broken builds can be found in the package's
+ directory. These files are used by the bulk-targets to
+ mark broken builds to not waste time trying to rebuild
+ them, and they can be used to debug these broken
+ package builds later.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2583392" id=
- "id2583392"></a>5.3.5.&nbsp;Disk space
+ <h3 class="title"><a name="id2563524" id=
+ "id2563524"></a>5.3.5.&nbsp;Disk space
requirements</h3>
</div>
</div>
@@ -3151,8 +3125,8 @@ fi
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2583418" id=
- "id2583418"></a>5.3.6.&nbsp;Setting up a sandbox
+ <h3 class="title"><a name="id2563550" id=
+ "id2563550"></a>5.3.6.&nbsp;Setting up a sandbox
for chroot'ed builds</h3>
</div>
</div>
@@ -3164,25 +3138,25 @@ fi
bulk build inside a chroot environment.</p>
<p>The first step is to set up a chroot sandbox, e.g.
- <code class="filename">/usr/sandbox</code>. This can be
+ <tt class="filename">/usr/sandbox</tt>. This can be
done by using null mounts, or manually.</p>
- <p>There is a shell script called <code class=
- "filename">pkgsrc/mk/bulk/mksandbox</code> which will
- set up the sandbox environment using null mounts. It
- will also create a script called <code class=
- "filename">sandbox</code> in the root of the sandbox
+ <p>There is a shell script called <tt class=
+ "filename">pkgsrc/mk/bulk/mksandbox</tt> which will set
+ up the sandbox environment using null mounts. It will
+ also create a script called <tt class=
+ "filename">sandbox</tt> in the root of the sandbox
environment, which will allow the null mounts to be
- activated using the <span><strong class=
- "command">sandbox mount</strong></span> command and
- deactivated using the <span><strong class=
- "command">sandbox umount</strong></span> command.</p>
+ activated using the <span><b class="command">sandbox
+ mount</b></span> command and deactivated using the
+ <span><b class="command">sandbox umount</b></span>
+ command.</p>
<p>To set up a sandbox environment by hand, after
extracting all the sets from a NetBSD installation or
- doing a <span><strong class="command">make distribution
- DESTDIR=/usr/sandbox</strong></span> in <code class=
- "filename">/usr/src/etc</code>, be sure the following
+ doing a <span><b class="command">make distribution
+ DESTDIR=/usr/sandbox</b></span> in <tt class=
+ "filename">/usr/src/etc</tt>, be sure the following
items are present and properly configured:</p>
<div class="procedure">
@@ -3190,28 +3164,29 @@ fi
<li>
<p>Kernel</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cp /netbsd /usr/sandbox</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cp /netbsd /usr/sandbox</tt></b>
</pre>
</li>
<li>
- <p><code class="filename">/dev/*</code></p>
+ <p><tt class="filename">/dev/*</tt></p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /usr/sandbox/dev ; sh MAKEDEV all</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/sandbox/dev ; sh MAKEDEV all</tt></b>
</pre>
</li>
<li>
- <p><code class="filename">/etc/resolv.conf</code>
+ <p><tt class="filename">/etc/resolv.conf</tt>
(for <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/security/smtpd/README.html"
- class="pkgname">security/smtpd</a> and mail):</p>
+ class="pkgname">security/smtpd</a> and
+ mail):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cp /etc/resolv.conf /usr/sandbox/etc</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cp /etc/resolv.conf /usr/sandbox/etc</tt></b>
</pre>
</li>
@@ -3219,67 +3194,68 @@ fi
<p>Working(!) mail config (hostname,
sendmail.cf):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cp /etc/mail/sendmail.cf /usr/sandbox/etc/mail</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cp /etc/mail/sendmail.cf /usr/sandbox/etc/mail</tt></b>
</pre>
</li>
<li>
- <p><code class="filename">/etc/localtime</code>
- (for <a xmlns=
+ <p><tt class="filename">/etc/localtime</tt> (for
+ <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/security/smtpd/README.html"
- class="pkgname">security/smtpd</a>):</p>
+ class="pkgname">security/smtpd</a>):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>ln -sf /usr/share/zoneinfo/UTC /usr/sandbox/etc/localtime</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>ln -sf /usr/share/zoneinfo/UTC /usr/sandbox/etc/localtime</tt></b>
</pre>
</li>
<li>
- <p><code class="filename">/usr/src</code> (system
+ <p><tt class="filename">/usr/src</tt> (system
sources, for <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/sysutils/aperture/README.html"
- class="pkgname">sysutils/aperture</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/net/ppp-mppe/README.html"
- class="pkgname">net/ppp-mppe</a>):</p>
+ class="pkgname">sysutils/aperture</a>,
+ <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional"
+ href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/net/ppp-mppe/README.html"
+ class="pkgname">net/ppp-mppe</a>):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>ln -s ../disk1/cvs .</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>ln -s cvs/src-1.6 src</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>ln -s ../disk1/cvs .</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>ln -s cvs/src-1.6 src</tt></b>
</pre>
</li>
<li>
- <p>Create <code class=
- "filename">/var/db/pkg</code> (not part of
- default install):</p>
+ <p>Create <tt class="filename">/var/db/pkg</tt>
+ (not part of default install):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mkdir /usr/sandbox/var/db/pkg</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mkdir /usr/sandbox/var/db/pkg</tt></b>
</pre>
</li>
<li>
- <p>Create <code class="filename">/usr/pkg</code>
- (not part of default install):</p>
+ <p>Create <tt class="filename">/usr/pkg</tt> (not
+ part of default install):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mkdir /usr/sandbox/usr/pkg</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mkdir /usr/sandbox/usr/pkg</tt></b>
</pre>
</li>
<li>
- <p>Checkout pkgsrc via cvs into <code class=
- "filename">/usr/sandbox/usr/pkgsrc</code>:</p>
+ <p>Checkout pkgsrc via cvs into <tt class=
+ "filename">/usr/sandbox/usr/pkgsrc</tt>:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /usr/sandbox/usr</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -d -P pkgsrc</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/sandbox/usr</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -d -P pkgsrc</tt></b>
</pre>
<p>Do not mount/link this to the copy of your
@@ -3288,33 +3264,32 @@ fi
</li>
<li>
- <p>Make <code class=
- "filename">/usr/sandbox/usr/pkgsrc/packages</code>
- and <code class="filename">.../distfiles</code>
- point somewhere appropriate. NFS- and/or
- nullfs-mounts may come in handy!</p>
+ <p>Make <tt class=
+ "filename">/usr/sandbox/usr/pkgsrc/packages</tt>
+ and <tt class="filename">.../distfiles</tt> point
+ somewhere appropriate. NFS- and/or nullfs-mounts
+ may come in handy!</p>
</li>
<li>
- <p>Edit <code class=
- "filename">/etc/mk.conf</code>, see <a href=
- "#binary.mk.conf" title=
+ <p>Edit <tt class="filename">/etc/mk.conf</tt>,
+ see <a href="#binary.mk.conf" title=
"5.3.1.1.&nbsp;/etc/mk.conf">Section&nbsp;5.3.1.1,
&#8220;/etc/mk.conf&#8221;</a>.</p>
</li>
<li>
- <p>Adjust <code class=
- "filename">mk/bulk/build.conf</code> to suit your
+ <p>Adjust <tt class=
+ "filename">mk/bulk/build.conf</tt> to suit your
needs.</p>
</li>
<li>
- <p>If you have set <code class=
- "varname">CVS_USER</code> in <code class=
- "filename">build.conf</code>, make sure that
- account exists and can do a <span><strong class=
- "command">cvs ${CVS_FLAGS} update</strong></span>
+ <p>If you have set <tt class=
+ "varname">CVS_USER</tt> in <tt class=
+ "filename">build.conf</tt>, make sure that
+ account exists and can do a <span><b class=
+ "command">cvs ${CVS_FLAGS} update</b></span>
properly!</p>
</li>
</ol>
@@ -3323,17 +3298,17 @@ fi
<p>When the chroot sandbox is setup, you can start the
build with the following steps:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /usr/sandbox/usr/pkgsrc</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>sh mk/bulk/do-sandbox-build</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/sandbox/usr/pkgsrc</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>sh mk/bulk/do-sandbox-build</tt></b>
</pre>
<p>This will just jump inside the sandbox and start
building. At the end of the build, mail will be sent
with the results of the build. Created binary pkgs will
- be in <code class=
- "filename">/usr/sandbox/usr/pkgsrc/packages</code>
+ be in <tt class=
+ "filename">/usr/sandbox/usr/pkgsrc/packages</tt>
(wherever that points/mounts to/from).</p>
</div>
@@ -3341,20 +3316,20 @@ fi
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2583811" id=
- "id2583811"></a>5.3.7.&nbsp;Building a partial
+ <h3 class="title"><a name="id2563943" id=
+ "id2563943"></a>5.3.7.&nbsp;Building a partial
set of packages</h3>
</div>
</div>
</div>
<p>In addition to building a complete set of all
- packages in pkgsrc, the <code class=
- "filename">pkgsrc/mk/bulk/build</code> script may be
- used to build a subset of the packages contained in
- pkgsrc. By setting defining <code class=
- "varname">SPECIFIC_PKGS</code> in <code class=
- "filename">/etc/mk.conf</code>, the variables</p>
+ packages in pkgsrc, the <tt class=
+ "filename">pkgsrc/mk/bulk/build</tt> script may be used
+ to build a subset of the packages contained in pkgsrc.
+ By setting defining <tt class=
+ "varname">SPECIFIC_PKGS</tt> in <tt class=
+ "filename">/etc/mk.conf</tt>, the variables</p>
<div class="itemizedlist">
<ul type="disc">
@@ -3382,12 +3357,126 @@ fi
explicitly listed packages.</p>
<p>One use of this is to do a bulk build with
- <code class="varname">SPECIFIC_PKGS</code> in a chroot
+ <tt class="varname">SPECIFIC_PKGS</tt> in a chroot
sandbox periodically to have a complete set of the
binary packages needed for your site available without
the overhead of building extra packages that are not
needed.</p>
</div>
+
+ <div class="sect2" lang="en" xml:lang="en">
+ <div class="titlepage">
+ <div>
+ <div>
+ <h3 class="title"><a name="bulk-upload" id=
+ "bulk-upload"></a>5.3.8.&nbsp;Uploading results
+ of a bulk build</h3>
+ </div>
+ </div>
+ </div>
+
+ <p>This section describes how pkgsrc developers can
+ upload binary pkgs built by bulk builds to
+ ftp.NetBSD.org.</p>
+
+ <p>First, make sure that you have <tt class=
+ "varname">RSYNC_DST</tt> set properly in your
+ <tt class="filename">mk/bulk/build.conf</tt> file, i.e.
+ adjust it to something like one of the following:</p>
+ <pre class="screen">
+RSYNC_DST=$CVS_USER@ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload
+</pre>
+
+ <p>Please use appropviate values for "pkgsrc-200xQ4",
+ "NetBSD-a.b.c" and "arch" here. If your login on
+ ftp.NetBSD.org is different from <tt class=
+ "varname">CVS_USER</tt>, write your login directly into
+ the variable, e.g. my local account is "feyrer", but
+ for my login "hubertf", I use:</p>
+ <pre class="screen">
+RSYNC_DST=hubertf@ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload
+</pre>
+
+ <p>A separate <tt class="filename">upload</tt>
+ directory is used here to allow "closing" the directory
+ during upload. To do so, run the following command on
+ ftp.NetBSD.org next:</p>
+ <pre class="screen">
+nbftp% <b class=
+"userinput"><tt>mkdir -p -m 750 /pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload</tt></b>
+</pre>
+
+ <p>Please note that <tt class=
+ "filename">/pub/NetBSD/packages</tt> is only
+ appropriate for packages for the NetBSD operating
+ system. Binary packages for other operating systems
+ should go into <tt class=
+ "filename">/pub/pkgsrc</tt>.</p>
+
+ <p>Before uploading the binary pkgs, ssh authentication
+ needs to be setup next. This example shows how to setup
+ temporary keys for the root account <span class=
+ "emphasis"><em>inside the sandbox</em></span> (assuming
+ that no keys should be present there usually):</p>
+ <pre class="screen">
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>chroot /usr/sandbox</tt></b>
+chroot-<tt class="prompt">#</tt> <b class=
+"userinput"><tt>rm $HOME/.ssh/id-dsa*</tt></b>
+chroot-<tt class="prompt">#</tt> <b class=
+"userinput"><tt>ssh-keygen -t dsa</tt></b>
+chroot-<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cat $HOME/.ssh/id-dsa.pub</tt></b>
+</pre>
+
+ <p>Now take the output of <tt class=
+ "filename">id-dsa.pub</tt> and append it to your
+ <tt class="filename">~/.ssh/authorized_keys</tt> file
+ on ftp.netBSD.org. You can remove the key after the
+ upload is done!</p>
+
+ <p>Next, test if your ssh connection really works:</p>
+ <pre class="screen">
+chroot-<tt class="prompt">#</tt> <b class=
+"userinput"><tt>ssh ftp.NetBSD.org date</tt></b>
+</pre>
+
+ <p>Use "-l yourNetBSDlogin" here as appropriate!</p>
+
+ <p>Now after all this works, you can exit the sandbox
+ and start the upload:</p>
+ <pre class="screen">
+chroot-<tt class="prompt">#</tt> <b class=
+"userinput"><tt>exit</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/sandbox/usr/pkgsrc</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>sh mk/bulk/do-sandbox-upload</tt></b>
+</pre>
+
+ <p>The upload process may take quite some time. Use
+ "ls" or "du" on the FTP server to monitor progress of
+ the upload.</p>
+
+ <p>After the upload has ended, first thing is to revoke
+ ssh access:</p>
+ <pre class="screen">
+nbftp% <b class="userinput"><tt>vi ~/.ssh/authorized_keys</tt></b>
+Gdd:x!
+</pre>
+
+ <p>Use whatever is needed to remove the key you've
+ entered before! Last, move the uploaded packages out of
+ the <tt class="filename">upload</tt> directory to have
+ them accessible to everyone:</p>
+ <pre class="screen">
+nbftp% <b class=
+"userinput"><tt>cd /pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch</tt></b>
+nbftp% <b class="userinput"><tt>mv upload/* .</tt></b>
+nbftp% <b class="userinput"><tt>rmdir upload</tt></b>
+nbftp% <b class="userinput"><tt>chmod 755 .</tt></b>
+</pre>
+ </div>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -3395,7 +3484,7 @@ fi
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2583853" id="id2583853"></a>5.4.&nbsp;Creating a
+ "id2564359" id="id2564359"></a>5.4.&nbsp;Creating a
multiple CD-ROM packages collection</h2>
</div>
</div>
@@ -3407,19 +3496,19 @@ fi
machines. The <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/cdpack/README.html"
- class="pkgname">pkgtools/cdpack</a> package provides a
- simple tool for creating the ISO 9660 images.
- <span><strong class="command">cdpack</strong></span>
- arranges the packages on the CD-ROMs in a way that keeps
- all the dependencies for given package on the same CD as
- that package.</p>
+ class="pkgname">pkgtools/cdpack</a> package provides a
+ simple tool for creating the ISO 9660 images.
+ <span><b class="command">cdpack</b></span> arranges
+ the packages on the CD-ROMs in a way that keeps all
+ the dependencies for given package on the same CD as
+ that package.</p>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2583868" id=
- "id2583868"></a>5.4.1.&nbsp;Example of
+ <h3 class="title"><a name="id2564442" id=
+ "id2564442"></a>5.4.1.&nbsp;Example of
cdpack</h3>
</div>
</div>
@@ -3427,51 +3516,51 @@ fi
<p>Complete documentation for cdpack is found in the
cdpack(1) manpage. The following short example assumes
- that the binary packages are left in <code class=
- "filename">/usr/pkgsrc/packages/All</code> and that
- sufficient disk space exists in <code class=
- "filename">/u2</code> to hold the ISO 9660 images.</p>
+ that the binary packages are left in <tt class=
+ "filename">/usr/pkgsrc/packages/All</tt> and that
+ sufficient disk space exists in <tt class=
+ "filename">/u2</tt> to hold the ISO 9660 images.</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mkdir /u2/images</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>pkg_add /usr/pkgsrc/packages/All/cdpack</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cdpack /usr/pkgsrc/packages/All /u2/images</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mkdir /u2/images</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>pkg_add /usr/pkgsrc/packages/All/cdpack</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cdpack /usr/pkgsrc/packages/All /u2/images</tt></b>
</pre>
<p>If you wish to include a common set of files
- (<code class="filename">COPYRIGHT</code>, <code class=
- "filename">README</code>, etc.) on each CD in the
+ (<tt class="filename">COPYRIGHT</tt>, <tt class=
+ "filename">README</tt>, etc.) on each CD in the
collection, then you need to create a directory which
contains these files. e.g.</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mkdir /tmp/common</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>echo "This is a README" &gt; /tmp/common/README</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>echo "Another file" &gt; /tmp/common/COPYING</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mkdir /tmp/common/bin</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>echo "#!/bin/sh" &gt; /tmp/common/bin/myscript</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>echo "echo Hello world" &gt;&gt; /tmp/common/bin/myscript</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>chmod 755 /tmp/common/bin/myscript</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mkdir /tmp/common</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>echo "This is a README" &gt; /tmp/common/README</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>echo "Another file" &gt; /tmp/common/COPYING</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mkdir /tmp/common/bin</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>echo "#!/bin/sh" &gt; /tmp/common/bin/myscript</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>echo "echo Hello world" &gt;&gt; /tmp/common/bin/myscript</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>chmod 755 /tmp/common/bin/myscript</tt></b>
</pre>
<p>Now create the images:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cdpack -x /tmp/common /usr/pkgsrc/packages/All /u2/images</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cdpack -x /tmp/common /usr/pkgsrc/packages/All /u2/images</tt></b>
</pre>
- <p>Each image will contain <code class=
- "filename">README</code>, <code class=
- "filename">COPYING</code>, and <code class=
- "filename">bin/myscript</code> in their root
+ <p>Each image will contain <tt class=
+ "filename">README</tt>, <tt class=
+ "filename">COPYING</tt>, and <tt class=
+ "filename">bin/myscript</tt> in their root
directories.</p>
</div>
</div>
@@ -3492,47 +3581,43 @@ fi
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2584196">6.1. Is
+ <dt><span class="sect1"><a href="#id2564634">6.1. Is
there a mailing list for pkg-related
discussion?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584226">6.2.
+ <dt><span class="sect1"><a href="#id2564801">6.2.
Where's the pkgviews documentation?</a></span></dt>
<dt><span class="sect1"><a href="#faq-pkgtools">6.3.
Utilities for package management
(pkgtools)</a></span></dt>
- <dt><span class="sect1"><a href="#id2584478">6.4. How
+ <dt><span class="sect1"><a href="#id2564985">6.4. How
to use pkgsrc as non-root</a></span></dt>
- <dt><span class="sect1"><a href="#id2584490">6.5. How
+ <dt><span class="sect1"><a href="#id2564997">6.5. How
can I install/use XFree86 from pkgsrc?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584586">6.6. How
+ <dt><span class="sect1"><a href="#id2565025">6.6. How
can I install/use X.org from pkgsrc?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584614">6.7. How
+ <dt><span class="sect1"><a href="#id2565121">6.7. How
to fetch files from behind a firewall</a></span></dt>
- <dt><span class="sect1"><a href="#id2584628">6.8. How
- do I tell <span><strong class="command">make
- fetch</strong></span> to do passive
- FTP?</a></span></dt>
+ <dt><span class="sect1"><a href="#id2565134">6.8. How
+ do I tell make fetch to do passive FTP?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584747">6.9. How
+ <dt><span class="sect1"><a href="#id2565186">6.9. How
to fetch all distfiles at once</a></span></dt>
- <dt><span class="sect1"><a href="#id2584887">6.10. What
- does &#8220;<span class="quote">Don't know how to make
- /usr/share/tmac/tmac.andoc</span>&#8221;
+ <dt><span class="sect1"><a href="#id2565325">6.10. What
+ does Don't know how to make /usr/share/tmac/tmac.andoc
mean?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584925">6.11. What
- does &#8220;<span class="quote">Could not find
- bsd.own.mk</span>&#8221; mean?</a></span></dt>
+ <dt><span class="sect1"><a href="#id2565364">6.11. What
+ does Could not find bsd.own.mk mean?</a></span></dt>
- <dt><span class="sect1"><a href="#id2584983">6.12.
+ <dt><span class="sect1"><a href="#id2565490">6.12.
Using 'sudo' with pkgsrc</a></span></dt>
<dt><span class="sect1"><a href="#faq.conf">6.13.
@@ -3554,19 +3639,19 @@ fi
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584196" id="id2584196"></a>6.1.&nbsp;Is there a
+ "id2564634" id="id2564634"></a>6.1.&nbsp;Is there a
mailing list for pkg-related discussion?</h2>
</div>
</div>
</div>
- <p>Yes, <code class="email">&lt;<a href=
- "mailto:tech-pkg@NetBSD.org">tech-pkg@NetBSD.org</a>&gt;</code>
+ <p>Yes, <tt class="email">&lt;<a href=
+ "mailto:tech-pkg@NetBSD.org">tech-pkg@NetBSD.org</a>&gt;</tt>
is the list for discussing package related issues. To
subscribe do:</p>
<pre class="programlisting">
-<code class=
-"prompt">%</code> echo subscribe tech-pkg | mail majordomo@NetBSD.org
+<tt class=
+"prompt">%</tt> echo subscribe tech-pkg | mail majordomo@NetBSD.org
</pre>
<p>An archive of the list is available at <a href=
@@ -3579,15 +3664,15 @@ fi
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584226" id="id2584226"></a>6.2.&nbsp;Where's
+ "id2564801" id="id2564801"></a>6.2.&nbsp;Where's
the pkgviews documentation?</h2>
</div>
</div>
</div>
<p>Pkgviews is tightly integrated with buildlink. You can
- find a pkgviews User's guide in <code class=
- "filename">pkgsrc/mk/buildlink3/PKGVIEWS_UG</code>.</p>
+ find a pkgviews User's guide in <tt class=
+ "filename">pkgsrc/mk/buildlink3/PKGVIEWS_UG</tt>.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -3602,7 +3687,7 @@ fi
</div>
</div>
- <p>The <code class="filename">pkgsrc/pkgtools</code>
+ <p>The <tt class="filename">pkgsrc/pkgtools</tt>
directory pkgtools contains a number of useful utilities
for both users and developers of pkgsrc. This section
attempts only to make the reader aware of the utilities
@@ -3618,8 +3703,8 @@ fi
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/x11-links/README.html"
- class="pkgname">pkgtools/x11-links</a>: symlinks
- for use by buildlink</p>
+ class="pkgname">pkgtools/x11-links</a>: symlinks
+ for use by buildlink</p>
</li>
</ul>
</div>
@@ -3633,34 +3718,34 @@ fi
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/digest/README.html"
- class="pkgname">pkgtools/digest</a>: calculates
- SHA1 checksums (and other kinds)</p>
+ class="pkgname">pkgtools/digest</a>: calculates
+ SHA1 checksums (and other kinds)</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/libnbcompat/README.html"
- class="pkgname">pkgtools/libnbcompat</a>: compat
- library for pkg tools</p>
+ class="pkgname">pkgtools/libnbcompat</a>: compat
+ library for pkg tools</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/mtree/README.html"
- class="pkgname">pkgtools/mtree</a>: installed on
- non-BSD systems due to lack of native mtree</p>
+ class="pkgname">pkgtools/mtree</a>: installed on
+ non-BSD systems due to lack of native mtree</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkg_install/README.html"
- class="pkgname">pkgtools/pkg_install</a>:
- up-to-date replacement for /usr/sbin/pkg_install,
- or for use on operating systems where pkg_install
- is not present</p>
+ class="pkgname">pkgtools/pkg_install</a>:
+ up-to-date replacement for
+ /usr/sbin/pkg_install, or for use on operating
+ systems where pkg_install is not present</p>
</li>
</ul>
</div>
@@ -3674,37 +3759,38 @@ fi
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkg_tarup/README.html"
- class="pkgname">pkgtools/pkg_tarup</a>: create a
- binary package from an already-installed package.
- used by 'make replace' to save the old package</p>
+ class="pkgname">pkgtools/pkg_tarup</a>: create a
+ binary package from an already-installed
+ package. used by 'make replace' to save the old
+ package</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/dfdisk/README.html"
- class="pkgname">pkgtools/dfdisk</a>: adds extra
- functionality to pkgsrc, allowing it to fetch
- distfiles from multiple locations. It currently
- supports the following methods: multiple CD-ROMs
- and network FTP/HTTP connections.</p>
+ class="pkgname">pkgtools/dfdisk</a>: adds extra
+ functionality to pkgsrc, allowing it to fetch
+ distfiles from multiple locations. It currently
+ supports the following methods: multiple CD-ROMs
+ and network FTP/HTTP connections.</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/xpkgwedge/README.html"
- class="pkgname">pkgtools/xpkgwedge</a>: put X11
- packages someplace else (enabled by default)</p>
+ class="pkgname">pkgtools/xpkgwedge</a>: put X11
+ packages someplace else (enabled by default)</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/cpuflags/README.html"
- class="pkgname">devel/cpuflags</a>: will determine
- the best compiler flags to optimise code for your
- current CPU and compiler.</p>
+ class="pkgname">devel/cpuflags</a>: will
+ determine the best compiler flags to optimise
+ code for your current CPU and compiler.</p>
</li>
</ul>
</div>
@@ -3718,45 +3804,46 @@ fi
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkg_chk/README.html"
- class="pkgname">pkgtools/pkg_chk</a>: installs
- pkg_chk, which reports on packages whose installed
- versions do not match the latest pkgsrc entries</p>
+ class="pkgname">pkgtools/pkg_chk</a>: installs
+ pkg_chk, which reports on packages whose
+ installed versions do not match the latest
+ pkgsrc entries</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkgdep/README.html"
- class="pkgname">pkgtools/pkgdep</a>: makes
- dependency graphs of packages, to aid in choosing a
- strategy for updating</p>
+ class="pkgname">pkgtools/pkgdep</a>: makes
+ dependency graphs of packages, to aid in
+ choosing a strategy for updating</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkgdepgraph/README.html"
- class="pkgname">pkgtools/pkgdepgraph</a>: make
- graph from above (uses graphviz)</p>
+ class="pkgname">pkgtools/pkgdepgraph</a>: make
+ graph from above (uses graphviz)</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkglint/README.html"
- class="pkgname">pkgtools/pkglint</a>: This provides
- two distinct abilities: check a pkgsrc entry for
- correctness (pkglint) check for and remove
- out-of-date distfiles and binary packages
- (lintpkgsrc)</p>
+ class="pkgname">pkgtools/pkglint</a>: This
+ provides two distinct abilities: check a pkgsrc
+ entry for correctness (pkglint) check for and
+ remove out-of-date distfiles and binary packages
+ (lintpkgsrc)</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkgsurvey/README.html"
- class="pkgname">pkgtools/pkgsurvey</a>: report what
- packages you have installed</p>
+ class="pkgname">pkgtools/pkgsurvey</a>: report
+ what packages you have installed</p>
</li>
</ul>
</div>
@@ -3770,28 +3857,28 @@ fi
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkgdiff/README.html"
- class="pkgname">pkgtools/pkgdiff</a>: automate
- making and maintaining patches for a package
- (includes pkgdiff, pkgvi, mkpatches, ...)</p>
+ class="pkgname">pkgtools/pkgdiff</a>: automate
+ making and maintaining patches for a package
+ (includes pkgdiff, pkgvi, mkpatches, ...)</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/rpm2pkg/README.html"
- class="pkgname">pkgtools/rpm2pkg</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/url2pkg/README.html"
- class="pkgname">pkgtools/url2pkg</a>: aids in
- converting to pkgsrc</p>
+ class="pkgname">pkgtools/rpm2pkg</a>, <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/url2pkg/README.html"
+ class="pkgname">pkgtools/url2pkg</a>: aids in
+ converting to pkgsrc</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/gensolpkg/README.html"
- class="pkgname">pkgtools/gensolpkg</a>: convert
- pkgsrc to a Solaris package</p>
+ class="pkgname">pkgtools/gensolpkg</a>: convert
+ pkgsrc to a Solaris package</p>
</li>
</ul>
</div>
@@ -3805,25 +3892,25 @@ fi
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkgconflict/README.html"
- class="pkgname">pkgtools/pkgconflict</a>: find
- packages that conflict but aren't marked as
- such</p>
+ class="pkgname">pkgtools/pkgconflict</a>: find
+ packages that conflict but aren't marked as
+ such</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkg_comp/README.html"
- class="pkgname">pkgtools/pkg_comp</a>: build
- packages in a chrooted area</p>
+ class="pkgname">pkgtools/pkg_comp</a>: build
+ packages in a chrooted area</p>
</li>
<li>
<p><a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/libkver/README.html"
- class="pkgname">pkgtools/libkver</a>: spoof kernel
- version for chrooted cross builds</p>
+ class="pkgname">pkgtools/libkver</a>: spoof
+ kernel version for chrooted cross builds</p>
</li>
</ul>
</div>
@@ -3834,7 +3921,7 @@ fi
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584478" id="id2584478"></a>6.4.&nbsp;How to use
+ "id2564985" id="id2564985"></a>6.4.&nbsp;How to use
pkgsrc as non-root</h2>
</div>
</div>
@@ -3844,7 +3931,7 @@ fi
set some variables to make pkgsrc work under these
conditions. Please see <a href=
"http://mail-index.NetBSD.org/tech-pkg/2003/09/27/0023.html"
- target="_top">this message</a> for more details.</p>
+ target="_top">this message</a> for more details.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -3852,18 +3939,17 @@ fi
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584490" id="id2584490"></a>6.5.&nbsp;How can I
+ "id2564997" id="id2564997"></a>6.5.&nbsp;How can I
install/use XFree86 from pkgsrc?</h2>
</div>
</div>
</div>
<p>If you want to use XFree86 from pkgsrc instead of your
- system's own X11 (<code class=
- "filename">/usr/X11R6</code>, <code class=
- "filename">/usr/openwin</code>, ...), you will have to
- add the following lines into <code class=
- "filename">mk.conf</code>:</p>
+ system's own X11 (<tt class="filename">/usr/X11R6</tt>,
+ <tt class="filename">/usr/openwin</tt>, ...), you will
+ have to add the following lines into <tt class=
+ "filename">mk.conf</tt>:</p>
<pre class="programlisting">
X11_TYPE=XFree86
@@ -3875,18 +3961,17 @@ fi
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584586" id="id2584586"></a>6.6.&nbsp;How can I
+ "id2565025" id="id2565025"></a>6.6.&nbsp;How can I
install/use X.org from pkgsrc?</h2>
</div>
</div>
</div>
<p>If you want to use X.org from pkgsrc instead of your
- system's own X11 (<code class=
- "filename">/usr/X11R6</code>, <code class=
- "filename">/usr/openwin</code>, ...) you will have to add
- the following lines into <code class=
- "filename">mk.conf</code>:</p>
+ system's own X11 (<tt class="filename">/usr/X11R6</tt>,
+ <tt class="filename">/usr/openwin</tt>, ...) you will
+ have to add the following lines into <tt class=
+ "filename">mk.conf</tt>:</p>
<pre class="programlisting">
X11_TYPE=xorg
@@ -3898,7 +3983,7 @@ fi
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584614" id="id2584614"></a>6.7.&nbsp;How to
+ "id2565121" id="id2565121"></a>6.7.&nbsp;How to
fetch files from behind a firewall</h2>
</div>
</div>
@@ -3923,33 +4008,33 @@ http_proxy=http://orpheus.amdahl.com:80/
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584628" id="id2584628"></a>6.8.&nbsp;How do I
- tell <span><strong class="command">make
- fetch</strong></span> to do passive FTP?</h2>
+ "id2565134" id="id2565134"></a>6.8.&nbsp;How do I
+ tell <span><b class="command">make fetch</b></span>
+ to do passive FTP?</h2>
</div>
</div>
</div>
<p>This depends on which utility is used to retrieve
- distfiles. From <code class="filename">bsd.pkg.mk</code>,
- <code class="varname">FETCH_CMD</code> is assigned the
- first available command from the following list:</p>
+ distfiles. From <tt class="filename">bsd.pkg.mk</tt>,
+ <tt class="varname">FETCH_CMD</tt> is assigned the first
+ available command from the following list:</p>
<pre class="programlisting">
${LOCALBASE}/bin/ftp
/usr/bin/ftp
</pre>
<p>On a default NetBSD installation, this will be
- <code class="filename">/usr/bin/ftp</code>, which
+ <tt class="filename">/usr/bin/ftp</tt>, which
automatically tries passive connections first, and falls
back to active connections if the server refuses to do
passive. For the other tools, add the following to your
- <code class="filename">/etc/mk.conf</code> file:
- <code class="varname">PASSIVE_FETCH=1</code>.</p>
+ <tt class="filename">/etc/mk.conf</tt> file: <tt class=
+ "varname">PASSIVE_FETCH=1</tt>.</p>
- <p>Having that option present will prevent <code class=
- "filename">/usr/bin/ftp</code> from falling back to
- active transfers.</p>
+ <p>Having that option present will prevent <tt class=
+ "filename">/usr/bin/ftp</tt> from falling back to active
+ transfers.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -3957,7 +4042,7 @@ ${LOCALBASE}/bin/ftp
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584747" id="id2584747"></a>6.9.&nbsp;How to
+ "id2565186" id="id2565186"></a>6.9.&nbsp;How to
fetch all distfiles at once</h2>
</div>
</div>
@@ -3965,59 +4050,57 @@ ${LOCALBASE}/bin/ftp
<p>You would like to download all the distfiles in a
single batch from work or university, where you can't run
- a <span><strong class="command">make
- fetch</strong></span>. There is an archive of distfiles
- on <a href=
+ a <span><b class="command">make fetch</b></span>. There
+ is an archive of distfiles on <a href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/"
target="_top">ftp.NetBSD.org</a>, but downloading the
entire directory may not be appropriate.</p>
- <p>The answer here is to do a <span><strong class=
- "command">make fetch-list</strong></span> in <code class=
- "filename">/usr/pkgsrc</code> or one of it's
+ <p>The answer here is to do a <span><b class=
+ "command">make fetch-list</b></span> in <tt class=
+ "filename">/usr/pkgsrc</tt> or one of it's
subdirectories, carry the resulting list to your machine
at work/school and use it there If you don't have a
NetBSD-compatible ftp(1) (like lukemftp) at work, don't
- forget to set <code class="varname">FETCH_CMD</code> to
+ forget to set <tt class="varname">FETCH_CMD</tt> to
something that fetches a URL:</p>
<p>At home:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cd /usr/pkgsrc</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make fetch-list FETCH_CMD=wget DISTDIR=/tmp/distfiles &gt;/tmp/fetch.sh</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>scp /tmp/fetch.sh work:/tmp</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cd /usr/pkgsrc</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>make fetch-list FETCH_CMD=wget DISTDIR=/tmp/distfiles &gt;/tmp/fetch.sh</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>scp /tmp/fetch.sh work:/tmp</tt></b>
</pre>
<p>At work:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>sh /tmp/fetch.sh</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>sh /tmp/fetch.sh</tt></b>
</pre>
- <p>then tar up <code class=
- "filename">/tmp/distfiles</code> and take it home.</p>
+ <p>then tar up <tt class="filename">/tmp/distfiles</tt>
+ and take it home.</p>
<p>If you have a machine running NetBSD, and you want to
get <span class="emphasis"><em>all</em></span> distfiles
(even ones that aren't for your machine architecture),
you can do so by using the above-mentioned
- <span><strong class="command">make
- fetch-list</strong></span> approach, or fetch the
- distfiles directly by running:</p>
+ <span><b class="command">make fetch-list</b></span>
+ approach, or fetch the distfiles directly by running:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make mirror-distfiles</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>make mirror-distfiles</tt></b>
</pre>
- <p>If you even decide to ignore <code class=
- "varname">NO_{SRC,BIN}_ON_{FTP,CDROM}</code>, then you
- can get everything by running:</p>
+ <p>If you even decide to ignore <tt class=
+ "varname">NO_{SRC,BIN}_ON_{FTP,CDROM}</tt>, then you can
+ get everything by running:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make fetch NO_SKIP=yes</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>make fetch NO_SKIP=yes</tt></b>
</pre>
</div>
@@ -4026,7 +4109,7 @@ ${LOCALBASE}/bin/ftp
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584887" id="id2584887"></a>6.10.&nbsp;What does
+ "id2565325" id="id2565325"></a>6.10.&nbsp;What does
&#8220;<span class="quote">Don't know how to make
/usr/share/tmac/tmac.andoc</span>&#8221; mean?</h2>
</div>
@@ -4036,21 +4119,22 @@ ${LOCALBASE}/bin/ftp
<p>When compiling the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkg_install/README.html"
- class="pkgname">pkgtools/pkg_install</a> package, you get
- the error from make that it doesn't know how to make
- <code class="filename">/usr/share/tmac/tmac.andoc</code>?
- This indicates that you don't have installed the
- &#8220;<span class="quote">text</span>&#8221; set on your
- machine (nroff, ...). It is recommended to do that to
- format manpages.</p>
+ class="pkgname">pkgtools/pkg_install</a> package, you
+ get the error from make that it doesn't know how to
+ make <tt class=
+ "filename">/usr/share/tmac/tmac.andoc</tt>? This
+ indicates that you don't have installed the
+ &#8220;<span class="quote">text</span>&#8221; set on
+ your machine (nroff, ...). It is recommended to do
+ that to format manpages.</p>
<p>In the case of the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkg_install/README.html"
- class="pkgname">pkgtools/pkg_install</a> package, you can
- get away with setting <code class=
- "varname">NOMAN=YES</code> either in the environment or
- in <code class="filename">/etc/mk.conf</code>.</p>
+ class="pkgname">pkgtools/pkg_install</a> package, you
+ can get away with setting <tt class=
+ "varname">NOMAN=YES</tt> either in the environment or
+ in <tt class="filename">/etc/mk.conf</tt>.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -4058,28 +4142,27 @@ ${LOCALBASE}/bin/ftp
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584925" id="id2584925"></a>6.11.&nbsp;What does
+ "id2565364" id="id2565364"></a>6.11.&nbsp;What does
&#8220;<span class="quote">Could not find
bsd.own.mk</span>&#8221; mean?</h2>
</div>
</div>
</div>
- <p>You didn't install the compiler set, <code class=
- "filename">comp.tgz</code>, when you installed your
- NetBSD machine. Please get it and install it, by
- extracting it in <code class="filename">/</code>:</p>
+ <p>You didn't install the compiler set, <tt class=
+ "filename">comp.tgz</tt>, when you installed your NetBSD
+ machine. Please get it and install it, by extracting it
+ in <tt class="filename">/</tt>:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>tar --unlink -zxvpf .../comp.tgz</code></strong>
+<tt class="prompt">#</tt> <b class="userinput"><tt>cd /</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>tar --unlink -zxvpf .../comp.tgz</tt></b>
</pre>
- <p><code class="filename">comp.tgz</code> is part of
- every NetBSD release. Get the one that corresponds to
- your release (determine via <span><strong class=
- "command">uname -r</strong></span>).</p>
+ <p><tt class="filename">comp.tgz</tt> is part of every
+ NetBSD release. Get the one that corresponds to your
+ release (determine via <span><b class="command">uname
+ -r</b></span>).</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -4087,7 +4170,7 @@ ${LOCALBASE}/bin/ftp
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2584983" id="id2584983"></a>6.12.&nbsp;Using
+ "id2565490" id="id2565490"></a>6.12.&nbsp;Using
'sudo' with pkgsrc</h2>
</div>
</div>
@@ -4101,9 +4184,9 @@ ${LOCALBASE}/bin/ftp
use it, install sudo (either as binary package or from
<a xmlns="http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/security/sudo/README.html"
- class="pkgname">security/sudo</a>) and then put the
- following into your <code class=
- "filename">/etc/mk.conf</code>:</p>
+ class="pkgname">security/sudo</a>) and then put the
+ following into your <tt class=
+ "filename">/etc/mk.conf</tt>:</p>
<pre class="programlisting">
.if exists(/usr/pkg/bin/sudo)
SU_CMD=/usr/pkg/bin/sudo /bin/sh -c
@@ -4124,74 +4207,73 @@ ${LOCALBASE}/bin/ftp
</div>
</div>
- <p>The global variable <code class=
- "varname">PKG_SYSCONFBASE</code> (and some others) can be
- set by the system administrator in <code class=
- "filename">/etc/mk.conf</code> to define the place where
+ <p>The global variable <tt class=
+ "varname">PKG_SYSCONFBASE</tt> (and some others) can be
+ set by the system administrator in <tt class=
+ "filename">/etc/mk.conf</tt> to define the place where
configuration files get installed. Therefore, packages
must be adapted to support this feature. Keep in mind
that you should only install files that are strictly
necessary in the configuration directory, files that can
- go to <code class="filename">$PREFIX/share</code> should
- go there.</p>
+ go to <tt class="filename">$PREFIX/share</tt> should go
+ there.</p>
<p>We will take a look at available variables first
- (<code class="filename">bsd.pkg.mk</code> contains more
- information). <code class="varname">PKG_SYSCONFDIR</code>
- is where the configuration files for a package may be
- found (that is, the full path, e.g. <code class=
- "filename">/etc</code> or <code class=
- "filename">/usr/pkg/etc</code>). This value may be
+ (<tt class="filename">bsd.pkg.mk</tt> contains more
+ information). <tt class="varname">PKG_SYSCONFDIR</tt> is
+ where the configuration files for a package may be found
+ (that is, the full path, e.g. <tt class=
+ "filename">/etc</tt> or <tt class=
+ "filename">/usr/pkg/etc</tt>). This value may be
customized in various ways:</p>
<div class="orderedlist">
<ol type="1">
<li>
- <p><code class="varname">PKG_SYSCONFBASE</code> is
- the main config directory under which all package
+ <p><tt class="varname">PKG_SYSCONFBASE</tt> is the
+ main config directory under which all package
configuration files are to be found. Users will
- typically want to set it to <code class=
- "filename">/etc</code>, or accept the default
- location of <code class=
- "filename">$PREFIX/etc</code>.</p>
+ typically want to set it to <tt class=
+ "filename">/etc</tt>, or accept the default
+ location of <tt class=
+ "filename">$PREFIX/etc</tt>.</p>
</li>
<li>
- <p><code class="varname">PKG_SYSCONFSUBDIR</code>
- is the subdirectory of <code class=
- "varname">PKG_SYSCONFBASE</code> under which the
+ <p><tt class="varname">PKG_SYSCONFSUBDIR</tt> is
+ the subdirectory of <tt class=
+ "varname">PKG_SYSCONFBASE</tt> under which the
configuration files for a particular package may be
- found. Defaults to <code class=
- "varname">${SYSCONFBASE}</code>.</p>
+ found. Defaults to <tt class=
+ "varname">${SYSCONFBASE}</tt>.</p>
</li>
<li>
- <p><code class="varname">PKG_SYSCONFVAR</code> is
- the special suffix used to distinguish any
- overriding values for a particular package (see
- next item). It defaults to <code class=
- "varname">${PKGBASE}</code>, but for a collection
- of related packages that should all have the same
- <code class="varname">PKG_SYSCONFDIR</code> value,
- it can be set in each of the package Makefiles to a
- common value.</p>
+ <p><tt class="varname">PKG_SYSCONFVAR</tt> is the
+ special suffix used to distinguish any overriding
+ values for a particular package (see next item). It
+ defaults to <tt class="varname">${PKGBASE}</tt>,
+ but for a collection of related packages that
+ should all have the same <tt class=
+ "varname">PKG_SYSCONFDIR</tt> value, it can be set
+ in each of the package Makefiles to a common
+ value.</p>
</li>
<li>
- <p><code class=
- "varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code>
- overrides the value of <code class=
- "varname">${PKG_SYSCONFDIR}</code> for packages
- with the same value for <code class=
- "varname">PKG_SYSCONFVAR</code>.</p>
+ <p><tt class=
+ "varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</tt>
+ overrides the value of <tt class=
+ "varname">${PKG_SYSCONFDIR}</tt> for packages with
+ the same value for <tt class=
+ "varname">PKG_SYSCONFVAR</tt>.</p>
<p>As an example, all the various KDE packages may
- want to set <code class=
- "varname">PKG_SYSCONFVAR</code> to
- &#8220;<span class="quote">kde</span>&#8221; so
- admins can set <code class=
- "varname">PKG_SYSCONFDIR.kde</code> in <code class=
- "filename">/etc/mk.conf</code> to define where to
+ want to set <tt class="varname">PKG_SYSCONFVAR</tt>
+ to &#8220;<span class="quote">kde</span>&#8221; so
+ admins can set <tt class=
+ "varname">PKG_SYSCONFDIR.kde</tt> in <tt class=
+ "filename">/etc/mk.conf</tt> to define where to
install KDE config files.</p>
</li>
</ol>
@@ -4205,30 +4287,28 @@ ${LOCALBASE}/bin/ftp
now. When you change this pathname in packages, you
should not allow them to install files in that directory
directly. Instead they need to install those files under
- <code class="filename">share/examples/${PKGNAME}</code>
- so <code class="filename">PLIST</code> can register
- them.</p>
+ <tt class="filename">share/examples/${PKGNAME}</tt> so
+ <tt class="filename">PLIST</tt> can register them.</p>
<p>Once you have the required configuration files in
- place (under the <code class=
- "filename">share/examples</code> directory) the variable
- <code class="varname">CONF_FILES</code> should be set to
- copy them into <code class=
- "varname">PKG_SYSCONFDIR</code>. The contents of this
- variable is formed by pairs of filenames; the first
+ place (under the <tt class="filename">share/examples</tt>
+ directory) the variable <tt class=
+ "varname">CONF_FILES</tt> should be set to copy them into
+ <tt class="varname">PKG_SYSCONFDIR</tt>. The contents of
+ this variable is formed by pairs of filenames; the first
element of the pair specifies the file inside the
- examples directory (registered by <code class=
- "filename">PLIST</code>) and the second element specifies
+ examples directory (registered by <tt class=
+ "filename">PLIST</tt>) and the second element specifies
the target file. This is done this way to allow binary
packages to place files in the right directory using
- <code class="filename">INSTALL</code>/<code class=
- "filename">DEINSTALL</code> scripts which are created
- automatically. The package <code class=
- "filename">Makefile</code> must also set <code class=
- "varname">USE_PKGINSTALL=YES</code> to use these
+ <tt class="filename">INSTALL</tt>/<tt class=
+ "filename">DEINSTALL</tt> scripts which are created
+ automatically. The package <tt class=
+ "filename">Makefile</tt> must also set <tt class=
+ "varname">USE_PKGINSTALL=YES</tt> to use these
automatically generated scripts. The automatic copying of
config files can be toggled by setting the environment
- variable <code class="varname">PKG_CONFIG</code> prior to
+ variable <tt class="varname">PKG_CONFIG</tt> prior to
package installation.</p>
<p>Here is an example, taken from mail/mutt/Makefile:</p>
@@ -4238,13 +4318,12 @@ CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
</pre>
<p>As you can see, this package installs configuration
- files inside <code class="varname">EGDIR</code>, which
- are registered by <code class="filename">PLIST</code>.
- After that, the variable <code class=
- "varname">CONF_FILES</code> lists the installed file
- first and then the target file. Users will also get an
- automatic message when files are installed using this
- method.</p>
+ files inside <tt class="varname">EGDIR</tt>, which are
+ registered by <tt class="filename">PLIST</tt>. After
+ that, the variable <tt class="varname">CONF_FILES</tt>
+ lists the installed file first and then the target file.
+ Users will also get an automatic message when files are
+ installed using this method.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -4270,8 +4349,8 @@ CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
this, install the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/security/audit-packages/README.html"
- class="pkgname">security/audit-packages</a> package. It
- has two components:</p>
+ class="pkgname">security/audit-packages</a> package.
+ It has two components:</p>
<div class="orderedlist">
<ol type="1">
@@ -4286,8 +4365,8 @@ CONF_FILES= ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
<p><a href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities"
- target=
- "_top">ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities</a></p>
+ target=
+ "_top">ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities</a></p>
</li>
<li>
@@ -4359,28 +4438,26 @@ fi
<dd>
<dl>
<dt><span class="sect1"><a href=
- "#components.Makefile">7.1. <code class=
- "filename">Makefile</code></a></span></dt>
+ "#components.Makefile">7.1. Makefile</a></span></dt>
<dt><span class="sect1"><a href=
- "#components.distinfo">7.2. <code class=
- "filename">distinfo</code></a></span></dt>
+ "#components.distinfo">7.2. distinfo</a></span></dt>
<dt><span class="sect1"><a href=
"#components.patches">7.3. patches/*</a></span></dt>
- <dt><span class="sect1"><a href="#id2586097">7.4.
+ <dt><span class="sect1"><a href="#id2566535">7.4.
Other mandatory files</a></span></dt>
<dt><span class="sect1"><a href=
"#components.optional">7.5. Optional
files</a></span></dt>
- <dt><span class="sect1"><a href="#id2586222">7.6.
- <code class="filename">work*</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2566729">7.6.
+ work*</a></span></dt>
- <dt><span class="sect1"><a href="#id2586310">7.7.
- <code class="filename">files/*</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2566817">7.7.
+ files/*</a></span></dt>
</dl>
</dd>
@@ -4389,28 +4466,25 @@ fi
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2586364">8.1. RCS
+ <dt><span class="sect1"><a href="#id2566871">8.1. RCS
ID</a></span></dt>
- <dt><span class="sect1"><a href="#id2586379">8.2.
- Semi-automatic <code class="filename">PLIST</code>
- generation</a></span></dt>
+ <dt><span class="sect1"><a href="#id2566886">8.2.
+ Semi-automatic PLIST generation</a></span></dt>
<dt><span class="sect1"><a href="#print-PLIST">8.3.
- Tweaking output of <span><strong class="command">make
- print-PLIST</strong></span></a></span></dt>
+ Tweaking output of make print-PLIST</a></span></dt>
<dt><span class="sect1"><a href="#plist.misc">8.4.
Variable substitution in PLIST</a></span></dt>
- <dt><span class="sect1"><a href="#id2586769">8.5.
+ <dt><span class="sect1"><a href="#id2567139">8.5.
Manpage-compression</a></span></dt>
- <dt><span class="sect1"><a href="#id2586810">8.6.
- Changing PLIST source with <code class=
- "varname">PLIST_SRC</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2567249">8.6.
+ Changing PLIST source with PLIST_SRC</a></span></dt>
- <dt><span class="sect1"><a href="#id2586827">8.7.
+ <dt><span class="sect1"><a href="#id2567266">8.7.
Platform specific and differing
PLISTs</a></span></dt>
@@ -4425,40 +4499,36 @@ fi
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2587099">9.1.
+ <dt><span class="sect1"><a href="#id2567742">9.1.
Converting packages to use buildlink3</a></span></dt>
- <dt><span class="sect1"><a href="#id2587290">9.2.
- Writing <code class="filename">buildlink3.mk</code>
- files</a></span></dt>
+ <dt><span class="sect1"><a href="#id2567933">9.2.
+ Writing buildlink3.mk files</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2587496">9.2.1. Anatomy of a buildlink3.mk
+ "#id2568003">9.2.1. Anatomy of a buildlink3.mk
file</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2588073">9.2.2. Updating <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> in
- <code class="filename">buildlink3.mk</code>
+ "#id2568375">9.2.2. Updating
+ BUILDLINK_DEPENDS.pkg in buildlink3.mk
files</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2588152">9.3.
- Writing <code class="filename">builtin.mk</code>
- files</a></span></dt>
+ <dt><span class="sect1"><a href="#id2568590">9.3.
+ Writing builtin.mk files</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2588233">9.3.1. Anatomy of a <code class=
- "filename">builtin.mk</code> file</a></span></dt>
+ "#id2568672">9.3.1. Anatomy of a builtin.mk
+ file</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2588392">9.3.2. Global preferences for native
+ "#id2568899">9.3.2. Global preferences for native
or pkgsrc software</a></span></dt>
</dl>
</dd>
@@ -4470,12 +4540,12 @@ fi
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2588533">10.1.
+ <dt><span class="sect1"><a href="#id2568971">10.1.
Global default options</a></span></dt>
- <dt><span class="sect1"><a href="#id2588548">10.2.
- Converting packages to use <code class=
- "filename">bsd.options.mk</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2568986">10.2.
+ Converting packages to use
+ bsd.options.mk</a></span></dt>
</dl>
</dd>
@@ -4487,7 +4557,7 @@ fi
<dt><span class="sect1"><a href="#build.prefix">11.1.
Program location</a></span></dt>
- <dt><span class="sect1"><a href="#id2589156">11.2.
+ <dt><span class="sect1"><a href="#id2569662">11.2.
Main targets</a></span></dt>
<dt><span class="sect1"><a href=
@@ -4501,17 +4571,17 @@ fi
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2590556">12.1.
+ <dt><span class="sect1"><a href="#id2571063">12.1.
General operation</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2590560">12.1.1. How to pull in variables
+ "#id2571066">12.1.1. How to pull in variables
from /etc/mk.conf</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2590643">12.1.2. Restricted
+ "#id2571149">12.1.2. Restricted
packages</a></span></dt>
<dt><span class="sect2"><a href=
@@ -4519,15 +4589,15 @@ fi
dependencies</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591226">12.1.4. Handling conflicts with
+ "#id2571733">12.1.4. Handling conflicts with
other packages</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591276">12.1.5. Packages that cannot or
+ "#id2571851">12.1.5. Packages that cannot or
should not be built</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591302">12.1.6. Packages which should not be
+ "#id2571877">12.1.6. Packages which should not be
deleted, once installed</a></span></dt>
<dt><span class="sect2"><a href=
@@ -4535,37 +4605,37 @@ fi
with security problems</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591462">12.1.8. How to handle compiler
+ "#id2571969">12.1.8. How to handle compiler
bugs</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591484">12.1.9. How to handle incrementing
+ "#id2571991">12.1.9. How to handle incrementing
versions when fixing an existing
package</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591533">12.1.10. Portability of
+ "#id2572108">12.1.10. Portability of
packages</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2591626">12.2.
+ <dt><span class="sect1"><a href="#id2572133">12.2.
Possible downloading issues</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2591629">12.2.1. Packages whose distfiles
+ "#id2572136">12.2.1. Packages whose distfiles
aren't available for plain
downloading</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591692">12.2.2. How to handle modified
+ "#id2572267">12.2.2. How to handle modified
distfiles with the 'old' name</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2591704">12.3.
+ <dt><span class="sect1"><a href="#id2572279">12.3.
Configuration gotchas</a></span></dt>
<dd>
@@ -4575,65 +4645,65 @@ fi
libtool</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592180">12.3.2. Using libtool on GNU
+ "#id2572618">12.3.2. Using libtool on GNU
packages that already support
libtool</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592264">12.3.3. GNU
+ "#id2572702">12.3.3. GNU
Autoconf/Automake</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2592309">12.4.
+ <dt><span class="sect1"><a href="#id2572747">12.4.
Building considerations</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2592312">12.4.1. CPP defines</a></span></dt>
+ "#id2572750">12.4.1. CPP defines</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2592342">12.5.
+ <dt><span class="sect1"><a href="#id2572780">12.5.
Package specific actions</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2592345">12.5.1. Package configuration
+ "#id2572784">12.5.1. Package configuration
files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592516">12.5.2. User
+ "#id2573022">12.5.2. User
interaction</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592561">12.5.3. Handling
+ "#id2573136">12.5.3. Handling
licenses</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592644">12.5.4. Creating an account from a
+ "#id2573287">12.5.4. Creating an account from a
package</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592774">12.5.5. Installing score
+ "#id2573349">12.5.5. Installing score
files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592818">12.5.6. Packages providing login
+ "#id2573393">12.5.6. Packages providing login
shells</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593012">12.5.7. Packages containing perl
+ "#id2573518">12.5.7. Packages containing perl
scripts</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593030">12.5.8. Packages with hardcoded
+ "#id2573537">12.5.8. Packages with hardcoded
paths to other interpreters</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593051">12.5.9. Packages installing perl
+ "#id2573558">12.5.9. Packages installing perl
modules</a></span></dt>
<dt><span class="sect2"><a href=
@@ -4641,36 +4711,36 @@ fi
info files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593408">12.5.11. Packages installing GConf2
+ "#id2573778">12.5.11. Packages installing GConf2
data files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593508">12.5.12. Packages installing
+ "#id2573946">12.5.12. Packages installing
scrollkeeper data files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593559">12.5.13. Packages installing X11
+ "#id2573997">12.5.13. Packages installing X11
fonts</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593606">12.5.14. Packages installing GTK2
+ "#id2574044">12.5.14. Packages installing GTK2
modules</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593675">12.5.15. Packages installing SGML or
+ "#id2574114">12.5.15. Packages installing SGML or
XML data</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593728">12.5.16. Packages installing
+ "#id2574234">12.5.16. Packages installing
extensions to the MIME database</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593798">12.5.17. Packages using
+ "#id2574305">12.5.17. Packages using
intltool</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2593812">12.6.
+ <dt><span class="sect1"><a href="#id2574318">12.6.
Feedback to the author</a></span></dt>
</dl>
</dd>
@@ -4683,17 +4753,17 @@ fi
<dd>
<dl>
- <dt><span class="sect1"><a href="#id2594342">14.1.
+ <dt><span class="sect1"><a href="#id2574849">14.1.
Submitting your packages</a></span></dt>
- <dt><span class="sect1"><a href="#id2594389">14.2.
+ <dt><span class="sect1"><a href="#id2575036">14.2.
Committing: Importing a package into
CVS</a></span></dt>
- <dt><span class="sect1"><a href="#id2594520">14.3.
+ <dt><span class="sect1"><a href="#id2575168">14.3.
Updating a package to a newer version</a></span></dt>
- <dt><span class="sect1"><a href="#id2594539">14.4.
+ <dt><span class="sect1"><a href="#id2575187">14.4.
Moving a package in pkgsrc</a></span></dt>
</dl>
</dd>
@@ -4716,28 +4786,26 @@ fi
<dl>
<dt><span class="sect1"><a href=
- "#components.Makefile">7.1. <code class=
- "filename">Makefile</code></a></span></dt>
+ "#components.Makefile">7.1. Makefile</a></span></dt>
<dt><span class="sect1"><a href=
- "#components.distinfo">7.2. <code class=
- "filename">distinfo</code></a></span></dt>
+ "#components.distinfo">7.2. distinfo</a></span></dt>
<dt><span class="sect1"><a href=
"#components.patches">7.3. patches/*</a></span></dt>
- <dt><span class="sect1"><a href="#id2586097">7.4. Other
+ <dt><span class="sect1"><a href="#id2566535">7.4. Other
mandatory files</a></span></dt>
<dt><span class="sect1"><a href=
"#components.optional">7.5. Optional
files</a></span></dt>
- <dt><span class="sect1"><a href="#id2586222">7.6.
- <code class="filename">work*</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2566729">7.6.
+ work*</a></span></dt>
- <dt><span class="sect1"><a href="#id2586310">7.7.
- <code class="filename">files/*</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2566817">7.7.
+ files/*</a></span></dt>
</dl>
</div>
@@ -4751,41 +4819,41 @@ fi
<div>
<h2 class="title" style="clear: both"><a name=
"components.Makefile" id=
- "components.Makefile"></a>7.1.&nbsp;<code class=
- "filename">Makefile</code></h2>
+ "components.Makefile"></a>7.1.&nbsp;<tt class=
+ "filename">Makefile</tt></h2>
</div>
</div>
</div>
<p>Building, installation and creation of a binary
- package are all controlled by the package's <code class=
- "filename">Makefile</code>.</p>
-
- <p>There is a <code class="filename">Makefile</code> for
- each package. This file includes the standard
- <code class="filename">bsd.pkg.mk</code> file (referenced
- as <code class="filename">../../mk/bsd.pkg.mk</code>),
- which sets all the definitions and actions necessary for
- the package to compile and install itself. The mandatory
- variables are the <code class="varname">DISTNAME</code>
- which specifies the base name of the distribution file to
- be downloaded from the site on the Internet, <code class=
- "varname">MASTER_SITES</code> which specifies that site,
- <code class="varname">CATEGORIES</code> which denotes the
- categories into which the package falls, <code class=
- "varname">PKGNAME</code> which is the name of the
- package, the <code class="varname">MAINTAINER</code>'s
- name, and the <code class="varname">COMMENT</code>
- variable, which should contain a one-line description of
- the package (the package name should not appear, it will
- be added automatically). The maintainer variable is there
- so that anyone who quibbles with the (always completely
- correct) decisions taken by the guy who maintains the
- package can complain vigorously, or send chocolate as a
- sign of appreciation.</p>
-
- <p>The <code class="varname">MASTER_SITES</code> may be
- set to one of the predefined sites:</p>
+ package are all controlled by the package's <tt class=
+ "filename">Makefile</tt>.</p>
+
+ <p>There is a <tt class="filename">Makefile</tt> for each
+ package. This file includes the standard <tt class=
+ "filename">bsd.pkg.mk</tt> file (referenced as <tt class=
+ "filename">../../mk/bsd.pkg.mk</tt>), which sets all the
+ definitions and actions necessary for the package to
+ compile and install itself. The mandatory variables are
+ the <tt class="varname">DISTNAME</tt> which specifies the
+ base name of the distribution file to be downloaded from
+ the site on the Internet, <tt class=
+ "varname">MASTER_SITES</tt> which specifies that site,
+ <tt class="varname">CATEGORIES</tt> which denotes the
+ categories into which the package falls, <tt class=
+ "varname">PKGNAME</tt> which is the name of the package,
+ the <tt class="varname">MAINTAINER</tt>'s name, and the
+ <tt class="varname">COMMENT</tt> variable, which should
+ contain a one-line description of the package (the
+ package name should not appear, it will be added
+ automatically). The maintainer variable is there so that
+ anyone who quibbles with the (always completely correct)
+ decisions taken by the guy who maintains the package can
+ complain vigorously, or send chocolate as a sign of
+ appreciation.</p>
+
+ <p>The <tt class="varname">MASTER_SITES</tt> may be set
+ to one of the predefined sites:</p>
<pre class="programlisting">
${MASTER_SITE_APACHE}
${MASTER_SITE_DEBIAN}
@@ -4822,15 +4890,15 @@ fi
"margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
- <p><code class="varname">MASTER_SITE_SUBDIR</code> has
- been deprecated and <span class="emphasis"><em>should
- no longer be used</em></span>.</p>
+ <p><tt class="varname">MASTER_SITE_SUBDIR</tt> has been
+ deprecated and <span class="emphasis"><em>should no
+ longer be used</em></span>.</p>
</div>
- <p>If the package has multiple <code class=
- "varname">DISTFILES</code> or multiple <code class=
- "varname">PATCHFILES</code> from different sites, set
- <code class="varname">SITES_foo</code> to a list of URI's
+ <p>If the package has multiple <tt class=
+ "varname">DISTFILES</tt> or multiple <tt class=
+ "varname">PATCHFILES</tt> from different sites, set
+ <tt class="varname">SITES_foo</tt> to a list of URI's
where file &#8220;<span class="quote">foo</span>&#8221;
may be found. &#8220;<span class=
"quote">foo</span>&#8221; includes the suffix, e.g.</p>
@@ -4841,14 +4909,14 @@ SITES_foo-file.tar.gz=http://www.somewhere.com/somehow/ \
http://www.somewhereelse.com/mirror/somehow/
</pre>
- <p>Note that the normal default setting of <code class=
- "varname">DISTFILES</code> must be made explicit if you
+ <p>Note that the normal default setting of <tt class=
+ "varname">DISTFILES</tt> must be made explicit if you
want to add to it (rather than replace it), as you
usually would.</p>
<p>Currently the following values are available for
- <code class="varname">CATEGORIES</code>. If more than one
- is used, they need to be separated by spaces:</p>
+ <tt class="varname">CATEGORIES</tt>. If more than one is
+ used, they need to be separated by spaces:</p>
<pre class="programlisting">
archivers cross geography meta-pkgs security
audio databases graphics misc shells
@@ -4865,14 +4933,14 @@ converters games mbone print x11
<div class="itemizedlist">
<ul type="disc">
<li>
- <p>Add <code class="varname">MANCOMPRESSED</code>
- if manpages are installed in compressed form by the
- package; see comment in <code class=
- "filename">bsd.pkg.mk</code>.</p>
+ <p>Add <tt class="varname">MANCOMPRESSED</tt> if
+ manpages are installed in compressed form by the
+ package; see comment in <tt class=
+ "filename">bsd.pkg.mk</tt>.</p>
</li>
<li>
- <p>Replace <code class="filename">/usr/local</code>
+ <p>Replace <tt class="filename">/usr/local</tt>
with &#8220;<span class=
"quote">${PREFIX}</span>&#8221; in all files (see
patches, below).</p>
@@ -4887,24 +4955,24 @@ converters games mbone print x11
</li>
<li>
- <p>Set <code class="varname">MAINTAINER</code> to
- be yourself. If you really can't maintain the
- package for future updates, set it to <code class=
+ <p>Set <tt class="varname">MAINTAINER</tt> to be
+ yourself. If you really can't maintain the package
+ for future updates, set it to <tt class=
"email">&lt;<a href=
- "mailto:tech-pkg@NetBSD.org">tech-pkg@NetBSD.org</a>&gt;</code>.</p>
+ "mailto:tech-pkg@NetBSD.org">tech-pkg@NetBSD.org</a>&gt;</tt>.</p>
</li>
<li>
<p>If a home page for the software in question
- exists, add the variable <code class=
- "varname">HOMEPAGE</code> right after <code class=
- "varname">MAINTAINER</code>. The value of this
+ exists, add the variable <tt class=
+ "varname">HOMEPAGE</tt> right after <tt class=
+ "varname">MAINTAINER</tt>. The value of this
variable should be the URL for the home page.</p>
</li>
<li>
- <p>Be sure to set the <code class=
- "varname">COMMENT</code> variable to a short
+ <p>Be sure to set the <tt class=
+ "varname">COMMENT</tt> variable to a short
description of the package, not containing the
pkg's name.</p>
</li>
@@ -4918,8 +4986,8 @@ converters games mbone print x11
<div>
<h2 class="title" style="clear: both"><a name=
"components.distinfo" id=
- "components.distinfo"></a>7.2.&nbsp;<code class=
- "filename">distinfo</code></h2>
+ "components.distinfo"></a>7.2.&nbsp;<tt class=
+ "filename">distinfo</tt></h2>
</div>
</div>
</div>
@@ -4930,48 +4998,45 @@ converters games mbone print x11
distributed by the author. This ensures that the distfile
retrieved from the Internet has not been corrupted during
transfer or altered by a malign force to introduce a
- security hole. It is generated using the
- <span><strong class="command">make
- makesum</strong></span> command. The digest algorithm
- used was, at one stage, md5, but that was felt lacking
- compared to sha1, and so sha1 is now the default
+ security hole. It is generated using the <span><b class=
+ "command">make makesum</b></span> command. The digest
+ algorithm used was, at one stage, md5, but that was felt
+ lacking compared to sha1, and so sha1 is now the default
algorithm. The distfile size is also generated and stored
in new distinfo files. The <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/digest/README.html"
- class="pkgname">pkgtools/digest</a> utility calculates
- all of the digests in the distinfo file, and it provides
- various different algorithms. At the current time, the
- algorithms provided are: <span class=
- "emphasis"><em>md5</em></span>, <span class=
- "emphasis"><em>rmd160</em></span>, <span class=
- "emphasis"><em>sha1</em></span>, <span class=
- "emphasis"><em>sha256</em></span>, <span class=
- "emphasis"><em>sha384</em></span> and <span class=
- "emphasis"><em>sha512</em></span>.</p>
+ class="pkgname">pkgtools/digest</a> utility calculates
+ all of the digests in the distinfo file, and it
+ provides various different algorithms. At the current
+ time, the algorithms provided are: <span class=
+ "emphasis"><em>md5</em></span>, <span class=
+ "emphasis"><em>rmd160</em></span>, <span class=
+ "emphasis"><em>sha1</em></span>, <span class=
+ "emphasis"><em>sha256</em></span>, <span class=
+ "emphasis"><em>sha384</em></span> and <span class=
+ "emphasis"><em>sha512</em></span>.</p>
<p>Some packages have different sets of distfiles on a
per architecture basis, for example <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/navigator/README.html"
- class="pkgname">www/navigator</a>). These are kept in the
- same distinfo file and care should be taken when
- upgrading such a package to ensure distfile information
- is not lost.</p>
+ class="pkgname">www/navigator</a>). These are kept in
+ the same distinfo file and care should be taken when
+ upgrading such a package to ensure distfile
+ information is not lost.</p>
<p>The message digest/checksum for all the official
- patches found in the <code class=
- "filename">patches/</code> directory (see <a href=
- "#components.patches" title=
+ patches found in the <tt class="filename">patches/</tt>
+ directory (see <a href="#components.patches" title=
"7.3.&nbsp;patches/*">Section&nbsp;7.3,
&#8220;patches/*&#8221;</a>) for the package is also
- stored in the <code class="filename">distinfo</code>
- file. This is a message digest/checksum of all lines in
- the patch file except the NetBSD RCS Id. This file is
- generated by invoking <span><strong class="command">make
- makepatchsum</strong></span> (or <span><strong class=
- "command">make mps</strong></span> if you're in a
- hurry).</p>
+ stored in the <tt class="filename">distinfo</tt> file.
+ This is a message digest/checksum of all lines in the
+ patch file except the NetBSD RCS Id. This file is
+ generated by invoking <span><b class="command">make
+ makepatchsum</b></span> (or <span><b class="command">make
+ mps</b></span> if you're in a hurry).</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -4995,15 +5060,14 @@ converters games mbone print x11
NetBSD. The files are applied successively in alphabetic
order (as returned by a shell &#8220;<span class=
"quote">patches/patch-*</span>&#8221; glob expansion), so
- <code class="filename">patch-aa</code> is applied before
- <code class="filename">patch-ab</code>, etc.</p>
-
- <p>The <code class="filename">patch-*</code> files should
- be in <span><strong class="command">diff
- -bu</strong></span> format, and apply without a fuzz to
- avoid problems. (To force patches to apply with fuzz you
- can set <code class=
- "varname">PATCH_FUZZ_FACTOR=-F2</code>). Furthermore, do
+ <tt class="filename">patch-aa</tt> is applied before
+ <tt class="filename">patch-ab</tt>, etc.</p>
+
+ <p>The <tt class="filename">patch-*</tt> files should be
+ in <span><b class="command">diff -bu</b></span> format,
+ and apply without a fuzz to avoid problems. (To force
+ patches to apply with fuzz you can set <tt class=
+ "varname">PATCH_FUZZ_FACTOR=-F2</tt>). Furthermore, do
not put changes for more than one file into a single
patch-file, as this will make future modifications more
difficult.</p>
@@ -5016,52 +5080,49 @@ converters games mbone print x11
<p>One important thing to mention is to pay attention
that no RCS IDs get stored in the patch files, as these
will cause problems when later checked into the NetBSD
- CVS tree. Use the <span><strong class=
- "command">pkgdiff</strong></span> from the <a xmlns=
+ CVS tree. Use the <span><b class=
+ "command">pkgdiff</b></span> from the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkgdiff/README.html"
- class="pkgname">pkgtools/pkgdiff</a> package to avoid
- these problems.</p>
+ class="pkgname">pkgtools/pkgdiff</a> package to avoid
+ these problems.</p>
<p>For even more automation, we recommend using
- <span><strong class="command">mkpatches</strong></span>
- from the same package to make a whole set of patches. You
- just have to backup files before you edit them to
- <code class="filename">filename.orig</code>, e.g. with
- <span><strong class="command">cp -p filename
- filename.orig</strong></span> or, easier, by using
- <span><strong class="command">pkgvi</strong></span> again
- from the same package. If you upgrade a package this way,
- you can easily compare the new set of patches with the
- previously existing one with <span><strong class=
- "command">patchdiff</strong></span>.</p>
+ <span><b class="command">mkpatches</b></span> from the
+ same package to make a whole set of patches. You just
+ have to backup files before you edit them to <tt class=
+ "filename">filename.orig</tt>, e.g. with <span><b class=
+ "command">cp -p filename filename.orig</b></span> or,
+ easier, by using <span><b class=
+ "command">pkgvi</b></span> again from the same package.
+ If you upgrade a package this way, you can easily compare
+ the new set of patches with the previously existing one
+ with <span><b class="command">patchdiff</b></span>.</p>
<p>When you have finished a package, remember to generate
the checksums for the patch files by using the
- <span><strong class="command">make
- makepatchsum</strong></span> command, see <a href=
- "#components.distinfo" title=
+ <span><b class="command">make makepatchsum</b></span>
+ command, see <a href="#components.distinfo" title=
"7.2.&nbsp;distinfo">Section&nbsp;7.2,
- &#8220;<code class="filename">distinfo</code>&#8221;</a>.</p>
+ &#8220;distinfo&#8221;</a>.</p>
<p>Patch files that are distributed by the author or
- other maintainers can be listed in <code class=
- "varname">$PATCHFILES</code>.</p>
+ other maintainers can be listed in <tt class=
+ "varname">$PATCHFILES</tt>.</p>
<p>If it is desired to store any patches that should not
be committed into pkgsrc, they can be kept outside the
- pkgsrc tree in the <code class=
- "filename">$LOCALPATCHES</code> directory. The directory
+ pkgsrc tree in the <tt class=
+ "filename">$LOCALPATCHES</tt> directory. The directory
tree there is expected to have the same
&#8220;<span class="quote">category/package</span>&#8221;
structure as pkgsrc, and patches are expected to be
- stored inside these dirs (also known as <code class=
- "filename">$LOCALPATCHES/$PKGPATH</code>). For example if
- you want to keep a private patch for <code class=
- "filename">pkgsrc/graphics/png</code>, keep it in
- <code class=
- "filename">$LOCALPATCHES/graphics/png/mypatch</code>. All
- files in the named directory are expected to be patch
+ stored inside these dirs (also known as <tt class=
+ "filename">$LOCALPATCHES/$PKGPATH</tt>). For example if
+ you want to keep a private patch for <tt class=
+ "filename">pkgsrc/graphics/png</tt>, keep it in
+ <tt class="filename">$LOCALPATCHES/graphics/png/mypatch</tt>.
+ All files in the named directory are expected to be patch
files, and <span class="emphasis"><em>they are applied
after pkgsrc patches are applied</em></span>.</p>
</div>
@@ -5071,7 +5132,7 @@ converters games mbone print x11
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586097" id="id2586097"></a>7.4.&nbsp;Other
+ "id2566535" id="id2566535"></a>7.4.&nbsp;Other
mandatory files</h2>
</div>
</div>
@@ -5079,8 +5140,8 @@ converters games mbone print x11
<div class="variablelist">
<dl>
- <dt><span class="term"><code class=
- "filename">DESCR</code></span></dt>
+ <dt><span class="term"><tt class=
+ "filename">DESCR</tt></span></dt>
<dd>
<p>A multi-line description of the piece of
@@ -5091,8 +5152,8 @@ converters games mbone print x11
everything that you write here.</p>
</dd>
- <dt><span class="term"><code class=
- "filename">PLIST</code></span></dt>
+ <dt><span class="term"><tt class=
+ "filename">PLIST</tt></span></dt>
<dd>
<p>This file governs the files that are installed
@@ -5122,8 +5183,8 @@ converters games mbone print x11
<div class="variablelist">
<dl>
- <dt><span class="term"><code class=
- "filename">INSTALL</code></span></dt>
+ <dt><span class="term"><tt class=
+ "filename">INSTALL</tt></span></dt>
<dd>
<p>This shell script is invoked twice by <a href=
@@ -5134,8 +5195,8 @@ converters games mbone print x11
moved in place, the second time after the files to
install are moved in place. This can be used to do
any custom procedures not possible with @exec
- commands in <code class="filename">PLIST</code>.
- See <a href=
+ commands in <tt class="filename">PLIST</tt>. See
+ <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?pkg_add+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">pkg_add</span>(1)</span></a> and
@@ -5146,8 +5207,8 @@ converters games mbone print x11
more information.</p>
</dd>
- <dt><span class="term"><code class=
- "filename">DEINSTALL</code></span></dt>
+ <dt><span class="term"><tt class=
+ "filename">DEINSTALL</tt></span></dt>
<dd>
<p>This script is executed before and after any
@@ -5166,8 +5227,8 @@ converters games mbone print x11
more information.</p>
</dd>
- <dt><span class="term"><code class=
- "filename">MESSAGE</code></span></dt>
+ <dt><span class="term"><tt class=
+ "filename">MESSAGE</tt></span></dt>
<dd>
<p>Display this file after installation of the
@@ -5175,16 +5236,16 @@ converters games mbone print x11
almost-free software and hints for updating config
files after installing modules for apache, PHP etc.
Please note that you can modify variables in it
- easily by using <code class=
- "varname">MESSAGE_SUBST</code> in the package's
- <code class="filename">Makefile</code>:</p>
+ easily by using <tt class=
+ "varname">MESSAGE_SUBST</tt> in the package's
+ <tt class="filename">Makefile</tt>:</p>
<pre class="programlisting">
MESSAGE_SUBST+= SOMEVAR="somevalue"
</pre>
<p>replaces "${SOMEVAR}" with &#8220;<span class=
- "quote">somevalue</span>&#8221; in <code class=
- "filename">MESSAGE</code>.</p>
+ "quote">somevalue</span>&#8221; in <tt class=
+ "filename">MESSAGE</tt>.</p>
</dd>
</dl>
</div>
@@ -5195,60 +5256,57 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586222" id=
- "id2586222"></a>7.6.&nbsp;<code class=
- "filename">work*</code></h2>
+ "id2566729" id="id2566729"></a>7.6.&nbsp;<tt class=
+ "filename">work*</tt></h2>
</div>
</div>
</div>
- <p>When you type <span><strong class=
- "command">make</strong></span> the distribution files are
- unpacked into this directory. It can be removed by
- running <span><strong class="command">make
- clean</strong></span>. Besides the sources, this
- directory is also used to keep various timestamp
+ <p>When you type <span><b class="command">make</b></span>
+ the distribution files are unpacked into this directory.
+ It can be removed by running <span><b class=
+ "command">make clean</b></span>. Besides the sources,
+ this directory is also used to keep various timestamp
files.</p>
<p>If a package doesn't create a subdirectory for itself
(like GNU software does, for instance), but extracts
itself in the current directory, you should set
- <code class="varname">WRKSRC</code> accordingly, e.g.
+ <tt class="varname">WRKSRC</tt> accordingly, e.g.
<a xmlns="http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/editors/sam/README.html"
- class="pkgname">editors/sam</a> again, but the quick
- answer is:</p>
+ class="pkgname">editors/sam</a> again, but the quick
+ answer is:</p>
<pre class="programlisting">
WRKSRC= ${WRKDIR}
</pre>
- <p>Please note that the old <code class=
- "varname">NO_WRKSUBDIR</code> has been deprecated and
+ <p>Please note that the old <tt class=
+ "varname">NO_WRKSUBDIR</tt> has been deprecated and
should not be used. Also, if your package doesn't create
- a subdir with the name of <code class=
- "varname">DISTNAME</code> but some different name, set
- <code class="varname">WRKSRC</code> to point to the
- proper name in <code class="filename">${WRKDIR}</code>.
- See <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
- href=
+ a subdir with the name of <tt class=
+ "varname">DISTNAME</tt> but some different name, set
+ <tt class="varname">WRKSRC</tt> to point to the proper
+ name in <tt class="filename">${WRKDIR}</tt>. See
+ <a xmlns="http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/lang/tcl/README.html"
- class="pkgname">lang/tcl</a> and <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/tk/README.html"
- class="pkgname">x11/tk</a> for examples, and here is
- another one:</p>
+ class="pkgname">lang/tcl</a> and <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/tk/README.html"
+ class="pkgname">x11/tk</a> for examples, and here is
+ another one:</p>
<pre class="programlisting">
WRKSRC= ${WRKDIR}/${DISTNAME}/unix
</pre>
<p>The name of the working directory created by pkgsrc is
- <code class="filename">work</code> by default. If the
- same pkgsrc tree should be used on several different
- platforms, the variable <code class=
- "varname">OBJMACHINE</code> can be set in /etc/mk.conf to
+ <tt class="filename">work</tt> by default. If the same
+ pkgsrc tree should be used on several different
+ platforms, the variable <tt class=
+ "varname">OBJMACHINE</tt> can be set in /etc/mk.conf to
attach the platform to the directory name, e.g.
- <code class="filename">work.i386</code> or <code class=
- "filename">work.sparc</code>.</p>
+ <tt class="filename">work.i386</tt> or <tt class=
+ "filename">work.sparc</tt>.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -5256,9 +5314,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586310" id=
- "id2586310"></a>7.7.&nbsp;<code class=
- "filename">files/*</code></h2>
+ "id2566817" id="id2566817"></a>7.7.&nbsp;<tt class=
+ "filename">files/*</tt></h2>
</div>
</div>
</div>
@@ -5269,9 +5326,9 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
"quote">${CP}</span>&#8221; command in the
&#8220;<span class="quote">pre-configure</span>&#8221;
target to achieve this. Alternatively, you could simply
- diff the file against <code class=
- "filename">/dev/null</code> and use the patch mechanism
- to manage the creation of this file.</p>
+ diff the file against <tt class="filename">/dev/null</tt>
+ and use the patch mechanism to manage the creation of
+ this file.</p>
</div>
</div>
@@ -5289,28 +5346,25 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2586364">8.1. RCS
+ <dt><span class="sect1"><a href="#id2566871">8.1. RCS
ID</a></span></dt>
- <dt><span class="sect1"><a href="#id2586379">8.2.
- Semi-automatic <code class="filename">PLIST</code>
- generation</a></span></dt>
+ <dt><span class="sect1"><a href="#id2566886">8.2.
+ Semi-automatic PLIST generation</a></span></dt>
<dt><span class="sect1"><a href="#print-PLIST">8.3.
- Tweaking output of <span><strong class="command">make
- print-PLIST</strong></span></a></span></dt>
+ Tweaking output of make print-PLIST</a></span></dt>
<dt><span class="sect1"><a href="#plist.misc">8.4.
Variable substitution in PLIST</a></span></dt>
- <dt><span class="sect1"><a href="#id2586769">8.5.
+ <dt><span class="sect1"><a href="#id2567139">8.5.
Manpage-compression</a></span></dt>
- <dt><span class="sect1"><a href="#id2586810">8.6.
- Changing PLIST source with <code class=
- "varname">PLIST_SRC</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2567249">8.6.
+ Changing PLIST source with PLIST_SRC</a></span></dt>
- <dt><span class="sect1"><a href="#id2586827">8.7.
+ <dt><span class="sect1"><a href="#id2567266">8.7.
Platform specific and differing PLISTs</a></span></dt>
<dt><span class="sect1"><a href="#faq.common-dirs">8.8.
@@ -5318,32 +5372,32 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
</dl>
</div>
- <p>The <code class="filename">PLIST</code> file contains a
+ <p>The <tt class="filename">PLIST</tt> file contains a
package's &#8220;<span class="quote">packing
list</span>&#8221;, i.e. a list of files that belong to the
- package (relative to the <code class=
- "filename">${PREFIX}</code> directory it's been installed
- in) plus some additional statements - see the <a href=
+ package (relative to the <tt class=
+ "filename">${PREFIX}</tt> directory it's been installed in)
+ plus some additional statements - see the <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?pkg_create+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">pkg_create</span>(1)</span></a> manpage for
a full list. This chapter addresses some issues that need
- attention when dealing with the <code class=
- "filename">PLIST</code> file (or files, see below!).</p>
+ attention when dealing with the <tt class=
+ "filename">PLIST</tt> file (or files, see below!).</p>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586364" id="id2586364"></a>8.1.&nbsp;RCS
+ "id2566871" id="id2566871"></a>8.1.&nbsp;RCS
ID</h2>
</div>
</div>
</div>
<p>Be sure to add a RCS ID line as the first thing in any
- <code class="filename">PLIST</code> file you write:</p>
+ <tt class="filename">PLIST</tt> file you write:</p>
<pre class="programlisting">
@comment $NetBSD$
</pre>
@@ -5354,17 +5408,17 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586379" id=
- "id2586379"></a>8.2.&nbsp;Semi-automatic
- <code class="filename">PLIST</code> generation</h2>
+ "id2566886" id=
+ "id2566886"></a>8.2.&nbsp;Semi-automatic <tt class=
+ "filename">PLIST</tt> generation</h2>
</div>
</div>
</div>
- <p>You can use the <span><strong class="command">make
- print-PLIST</strong></span> command to output a PLIST
- that matches any new files since the package was
- extracted. See <a href="#build.helpful-targets" title=
+ <p>You can use the <span><b class="command">make
+ print-PLIST</b></span> command to output a PLIST that
+ matches any new files since the package was extracted.
+ See <a href="#build.helpful-targets" title=
"11.3.&nbsp;Other helpful targets">Section&nbsp;11.3,
&#8220;Other helpful targets&#8221;</a> for more
information on this target.</p>
@@ -5377,8 +5431,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
<h2 class="title" style="clear: both"><a name=
"print-PLIST" id=
"print-PLIST"></a>8.3.&nbsp;Tweaking output of
- <span><strong class="command">make
- print-PLIST</strong></span></h2>
+ <span><b class="command">make
+ print-PLIST</b></span></h2>
</div>
</div>
</div>
@@ -5387,33 +5441,33 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
explained in <a href="#faq.common-dirs" title=
"8.8.&nbsp;Sharing directories between packages">Section&nbsp;8.8,
&#8220;Sharing directories between packages&#8221;</a>,
- you may have noticed that <span><strong class=
- "command">make print-PLIST</strong></span> outputs a set
- of <code class="varname">@comment</code>s instead of real
- <code class="varname">@dirrm</code> lines. You can also
- do this for specific directories and files, so that the
- results of that command are very close to reality. This
- helps <span class="emphasis"><em>a lot</em></span> during
- the update of packages.</p>
-
- <p>The <code class="varname">PRINT_PLIST_AWK</code>
- variable takes a set of AWK patterns and actions that are
- used to filter the output of print-PLIST. You can
- <span class="emphasis"><em>append</em></span> any chunk
- of AWK scripting you like to it, but be careful with
+ you may have noticed that <span><b class="command">make
+ print-PLIST</b></span> outputs a set of <tt class=
+ "varname">@comment</tt>s instead of real <tt class=
+ "varname">@dirrm</tt> lines. You can also do this for
+ specific directories and files, so that the results of
+ that command are very close to reality. This helps
+ <span class="emphasis"><em>a lot</em></span> during the
+ update of packages.</p>
+
+ <p>The <tt class="varname">PRINT_PLIST_AWK</tt> variable
+ takes a set of AWK patterns and actions that are used to
+ filter the output of print-PLIST. You can <span class=
+ "emphasis"><em>append</em></span> any chunk of AWK
+ scripting you like to it, but be careful with
quoting.</p>
- <p>For example, to get all files inside the <code class=
- "filename">libdata/foo</code> directory removed from the
+ <p>For example, to get all files inside the <tt class=
+ "filename">libdata/foo</tt> directory removed from the
resulting PLIST:</p>
<pre class="programlisting">
PRINT_PLIST_AWK+= /^libdata\/foo/ { next; }
</pre>
- <p>And to get all the <code class="varname">@dirrm</code>
+ <p>And to get all the <tt class="varname">@dirrm</tt>
lines referring to a specific (shared) directory
- converted to <code class="varname">@comment</code>s:</p>
+ converted to <tt class="varname">@comment</tt>s:</p>
<pre class="programlisting">
PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; }
@@ -5437,9 +5491,9 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
<div class="variablelist">
<dl>
- <dt><span class="term"><code class=
- "varname">${MACHINE_ARCH}</code>, <code class=
- "varname">${MACHINE_GNU_ARCH}</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">${MACHINE_ARCH}</tt>, <tt class=
+ "varname">${MACHINE_GNU_ARCH}</tt></span></dt>
<dd>
<p>Some packages like emacs and perl embed
@@ -5447,67 +5501,66 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
built on into the pathnames where they install
their file. To handle this case, PLIST will be
preprocessed before actually used, and the symbol
- &#8220;<span class="quote"><code class=
- "varname">${MACHINE_ARCH}</code></span>&#8221; will
- be replaced by what <span><strong class=
- "command">uname -p</strong></span> gives. The same
- is done if the string <code class=
- "varname">${MACHINE_GNU_ARCH}</code> is embedded in
- PLIST somewhere - use this on packages that have
- GNU autoconf created configure scripts.</p>
+ &#8220;<span class="quote"><tt class=
+ "varname">${MACHINE_ARCH}</tt></span>&#8221; will
+ be replaced by what <span><b class="command">uname
+ -p</b></span> gives. The same is done if the string
+ <tt class="varname">${MACHINE_GNU_ARCH}</tt> is
+ embedded in PLIST somewhere - use this on packages
+ that have GNU autoconf created configure
+ scripts.</p>
<div class="note" style=
"margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Legacy note</h3>
<p>There used to be a symbol &#8220;<span class=
- "quote"><code class=
- "varname">$ARCH</code></span>&#8221; that was
- replaced by the output of <span><strong class=
- "command">uname -m</strong></span>, but that's no
+ "quote"><tt class=
+ "varname">$ARCH</tt></span>&#8221; that was
+ replaced by the output of <span><b class=
+ "command">uname -m</b></span>, but that's no
longer supported and has been removed.</p>
</div>
</dd>
- <dt><span class="term"><code class=
- "varname">${OPSYS}</code>, <code class=
- "varname">${LOWER_OPSYS}</code>, <code class=
- "varname">${OS_VERSION}</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">${OPSYS}</tt>, <tt class=
+ "varname">${LOWER_OPSYS}</tt>, <tt class=
+ "varname">${OS_VERSION}</tt></span></dt>
<dd>
<p>Some packages want to embed the OS name and
version into some paths. To do this, use these
- variables in the <code class=
- "filename">PLIST</code>:</p>
+ variables in the <tt class=
+ "filename">PLIST</tt>:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="varname">${OPSYS}</code> -
- output of &#8220;<span class=
- "quote"><span><strong class="command">uname
- -s</strong></span></span>&#8221;</p>
+ <p><tt class="varname">${OPSYS}</tt> - output
+ of &#8220;<span class="quote"><span><b class=
+ "command">uname
+ -s</b></span></span>&#8221;</p>
</li>
<li>
- <p><code class=
- "varname">${LOWER_OPSYS}</code> - lowercase
- common name (eg. &#8220;<span class=
- "quote">solaris</span>&#8221;)</p>
+ <p><tt class="varname">${LOWER_OPSYS}</tt> -
+ lowercase common name (eg.
+ &#8220;<span class="quote">solaris</span>&#8221;)</p>
</li>
<li>
- <p><code class="varname">${OS_VERSION}</code>
- - &#8220;<span class=
- "quote"><span><strong class="command">uname
- -r</strong></span></span>&#8221;</p>
+ <p><tt class="varname">${OS_VERSION}</tt> -
+ &#8220;<span class="quote"><span><b class=
+ "command">uname
+ -r</b></span></span>&#8221;</p>
</li>
</ul>
</div>
</dd>
- <dt><span class="term"><code class=
- "varname">${PKGLOCALEDIR}</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">${PKGLOCALEDIR}</tt></span></dt>
<dd>
<p>Packages that install locale files should list
@@ -5517,21 +5570,21 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
"quote">share/locale/de/LC_MESSAGES/...</span>&#8221;.
This properly handles the fact that different
operating systems expect locale files to be either
- in <code class="filename">share</code> or
- <code class="filename">lib</code> by default.</p>
+ in <tt class="filename">share</tt> or <tt class=
+ "filename">lib</tt> by default.</p>
</dd>
</dl>
</div>
<p>For a complete list of values which are replaced by
- default, please look in <code class=
- "filename">bsd.pkg.mk</code> (and search for <span class=
+ default, please look in <tt class=
+ "filename">bsd.pkg.mk</tt> (and search for <span class=
"emphasis"><em>PLIST_SUBST</em></span>).</p>
<p>If you want to change other variables not listed
above, you can add variables and their expansions to this
- variable in the following way, similar to <code class=
- "varname">MESSAGE_SUBST</code> (see <a href=
+ variable in the following way, similar to <tt class=
+ "varname">MESSAGE_SUBST</tt> (see <a href=
"#components.optional" title=
"7.5.&nbsp;Optional files">Section&nbsp;7.5,
&#8220;Optional files&#8221;</a>):</p>
@@ -5549,24 +5602,24 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586769" id=
- "id2586769"></a>8.5.&nbsp;Manpage-compression</h2>
+ "id2567139" id=
+ "id2567139"></a>8.5.&nbsp;Manpage-compression</h2>
</div>
</div>
</div>
<p>Manpages should be installed in compressed form if
- <code class="varname">MANZ</code> is set (in <code class=
- "filename">bsd.own.mk</code>), and uncompressed
- otherwise. To handle this in the <code class=
- "filename">PLIST</code> file, the suffix
- &#8220;<span class="quote">.gz</span>&#8221; is
- appended/removed automatically for manpages according to
- <code class="varname">MANZ</code> and <code class=
- "varname">MANCOMPRESSED</code> being set or not, see
- above for details. This modification of the <code class=
- "filename">PLIST</code> file is done on a copy of it, not
- <code class="filename">PLIST</code> itself.</p>
+ <tt class="varname">MANZ</tt> is set (in <tt class=
+ "filename">bsd.own.mk</tt>), and uncompressed otherwise.
+ To handle this in the <tt class="filename">PLIST</tt>
+ file, the suffix &#8220;<span class=
+ "quote">.gz</span>&#8221; is appended/removed
+ automatically for manpages according to <tt class=
+ "varname">MANZ</tt> and <tt class=
+ "varname">MANCOMPRESSED</tt> being set or not, see above
+ for details. This modification of the <tt class=
+ "filename">PLIST</tt> file is done on a copy of it, not
+ <tt class="filename">PLIST</tt> itself.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -5574,17 +5627,17 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586810" id="id2586810"></a>8.6.&nbsp;Changing
- PLIST source with <code class=
- "varname">PLIST_SRC</code></h2>
+ "id2567249" id="id2567249"></a>8.6.&nbsp;Changing
+ PLIST source with <tt class=
+ "varname">PLIST_SRC</tt></h2>
</div>
</div>
</div>
- <p>To use one or more files as source for the
- <code class="filename">PLIST</code> used in generating
- the binary package, set the variable <code class=
- "varname">PLIST_SRC</code> to the names of that file(s).
+ <p>To use one or more files as source for the <tt class=
+ "filename">PLIST</tt> used in generating the binary
+ package, set the variable <tt class=
+ "varname">PLIST_SRC</tt> to the names of that file(s).
The files are later concatenated using cat(1), and order
of things is important.</p>
</div>
@@ -5594,7 +5647,7 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2586827" id="id2586827"></a>8.7.&nbsp;Platform
+ "id2567266" id="id2567266"></a>8.7.&nbsp;Platform
specific and differing PLISTs</h2>
</div>
</div>
@@ -5608,26 +5661,25 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="filename">PLIST.common</code></p>
+ <p><tt class="filename">PLIST.common</tt></p>
</li>
<li>
- <p><code class="filename">PLIST.${OPSYS}</code></p>
+ <p><tt class="filename">PLIST.${OPSYS}</tt></p>
</li>
<li>
- <p><code class=
- "filename">PLIST.common_end</code></p>
+ <p><tt class="filename">PLIST.common_end</tt></p>
</li>
</ul>
</div>
- <p>If <code class="filename">PLIST.${OPSYS}</code>
- exists, these files are used instead of <code class=
- "filename">PLIST</code>. This allows packages which
- behave in this way to be handled gracefully. Manually
- overriding <code class="varname">PLIST_SRC</code> for
- other more exotic uses is also possible.</p>
+ <p>If <tt class="filename">PLIST.${OPSYS}</tt> exists,
+ these files are used instead of <tt class=
+ "filename">PLIST</tt>. This allows packages which behave
+ in this way to be handled gracefully. Manually overriding
+ <tt class="varname">PLIST_SRC</tt> for other more exotic
+ uses is also possible.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -5672,9 +5724,9 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<a xmlns="http://www.w3.org/TR/xhtml1/transitional"
href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/textproc/scrollkeeper/README.html"
- class="pkgname">textproc/scrollkeeper</a>, which
- removes the shared directory <code class=
- "filename">share/omf</code>.</p>
+ class="pkgname">textproc/scrollkeeper</a>, which
+ removes the shared directory <tt class=
+ "filename">share/omf</tt>.</p>
</li>
<li>
@@ -5688,36 +5740,35 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<p>From now on, we'll discuss the second solution. To get
an idea of the *-dirs packages available, issue:</p>
<pre class="programlisting">
- <code class="prompt">%</code> cd .../pkgsrc
- <code class="prompt">%</code> ls -d */*-dirs
+ <tt class="prompt">%</tt> cd .../pkgsrc
+ <tt class="prompt">%</tt> ls -d */*-dirs
</pre>
<p>Their use from other packages is very simple. The
- <code class="varname">USE_DIRS</code> variable takes a
- list of package names (without the &#8220;<span class=
+ <tt class="varname">USE_DIRS</tt> variable takes a list
+ of package names (without the &#8220;<span class=
"quote">-dirs</span>&#8221; part) together with the
required version number (always pick the latest one when
writting new packages).</p>
<p>For example, if a package installs files under
- <code class="filename">share/applications</code>, it
- should have the following line in it:</p>
+ <tt class="filename">share/applications</tt>, it should
+ have the following line in it:</p>
<pre class="programlisting">
USE_DIRS+= xdg-1.1
</pre>
- <p>After regenerating the PLIST using
- <span><strong class="command">make
- print-PLIST</strong></span>, you should get the right
- (commented out) lines.</p>
+ <p>After regenerating the PLIST using <span><b class=
+ "command">make print-PLIST</b></span>, you should get the
+ right (commented out) lines.</p>
- <p>Note that, even if your package is using <code class=
- "filename">$X11BASE</code>, it must not depend on the
+ <p>Note that, even if your package is using <tt class=
+ "filename">$X11BASE</tt>, it must not depend on the
*-x11-dirs packages. Just specify the name without that
- part and pkgsrc (in particular, <code class=
- "filename">mk/dirs.mk</code>) will take care of it.</p>
+ part and pkgsrc (in particular, <tt class=
+ "filename">mk/dirs.mk</tt>) will take care of it.</p>
</div>
</div>
@@ -5736,38 +5787,32 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2587099">9.1.
+ <dt><span class="sect1"><a href="#id2567742">9.1.
Converting packages to use buildlink3</a></span></dt>
- <dt><span class="sect1"><a href="#id2587290">9.2.
- Writing <code class="filename">buildlink3.mk</code>
- files</a></span></dt>
+ <dt><span class="sect1"><a href="#id2567933">9.2.
+ Writing buildlink3.mk files</a></span></dt>
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2587496">9.2.1.
+ <dt><span class="sect2"><a href="#id2568003">9.2.1.
Anatomy of a buildlink3.mk file</a></span></dt>
- <dt><span class="sect2"><a href="#id2588073">9.2.2.
- Updating <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> in
- <code class="filename">buildlink3.mk</code>
+ <dt><span class="sect2"><a href="#id2568375">9.2.2.
+ Updating BUILDLINK_DEPENDS.pkg in buildlink3.mk
files</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2588152">9.3.
- Writing <code class="filename">builtin.mk</code>
- files</a></span></dt>
+ <dt><span class="sect1"><a href="#id2568590">9.3.
+ Writing builtin.mk files</a></span></dt>
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2588233">9.3.1.
- Anatomy of a <code class=
- "filename">builtin.mk</code> file</a></span></dt>
+ <dt><span class="sect2"><a href="#id2568672">9.3.1.
+ Anatomy of a builtin.mk file</a></span></dt>
- <dt><span class="sect2"><a href="#id2588392">9.3.2.
+ <dt><span class="sect2"><a href="#id2568899">9.3.2.
Global preferences for native or pkgsrc
software</a></span></dt>
</dl>
@@ -5784,22 +5829,21 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<ol type="1">
<li>
<p>Symlink headers and libraries for dependencies
- into <code class="varname">BUILDLINK_DIR</code>,
- which by default is a subdirectory of <code class=
- "varname">WRKDIR</code>.</p>
+ into <tt class="varname">BUILDLINK_DIR</tt>, which by
+ default is a subdirectory of <tt class=
+ "varname">WRKDIR</tt>.</p>
</li>
<li>
<p>Create wrapper scripts that are used in place of
- the normal compiler tools that translate <code class=
- "option">-I${LOCALBASE}/include</code> and
- <code class="option">-L${LOCALBASE}/lib</code> into
- references to <code class=
- "varname">BUILDLINK_DIR</code>. The wrapper scripts
- also make native compiler on some operating systems
- look like GCC, so that packages that expect GCC won't
- require modifications to build with those native
- compilers.</p>
+ the normal compiler tools that translate <tt class=
+ "option">-I${LOCALBASE}/include</tt> and <tt class=
+ "option">-L${LOCALBASE}/lib</tt> into references to
+ <tt class="varname">BUILDLINK_DIR</tt>. The wrapper
+ scripts also make native compiler on some operating
+ systems look like GCC, so that packages that expect
+ GCC won't require modifications to build with those
+ native compilers.</p>
</li>
</ol>
</div>
@@ -5807,9 +5851,9 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<p>This normalizes the environment in which a package is
built so that the package may be built consistently despite
what other software may be installed. Please note that the
- normal system header and library paths, e.g. <code class=
- "filename">/usr/include</code>, <code class=
- "filename">/usr/lib</code>, etc., are always searched --
+ normal system header and library paths, e.g. <tt class=
+ "filename">/usr/include</tt>, <tt class=
+ "filename">/usr/lib</tt>, etc., are always searched --
buildlink3 is designed to insulate the package build from
non-system-supplied software.</p>
@@ -5818,7 +5862,7 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2587099" id="id2587099"></a>9.1.&nbsp;Converting
+ "id2567742" id="id2567742"></a>9.1.&nbsp;Converting
packages to use buildlink3</h2>
</div>
</div>
@@ -5832,35 +5876,34 @@ PLIST_SUBST+= SOMEVAR="somevalue"
<div class="orderedlist">
<ol type="1">
<li>
- <p>Set <code class="varname">USE_BUILDLINK3</code>
- to &#8220;<span class=
- "quote">yes</span>&#8221;.</p>
+ <p>Set <tt class="varname">USE_BUILDLINK3</tt> to
+ &#8220;<span class="quote">yes</span>&#8221;.</p>
</li>
<li>
<p>Ensure that the build always calls the wrapper
scripts instead of the actual toolchain. Some
packages are tricky, and the only way to know for
- sure is the check <code class=
- "filename">${WRKDIR}/.work.log</code> to see if the
+ sure is the check <tt class=
+ "filename">${WRKDIR}/.work.log</tt> to see if the
wrappers are being invoked.</p>
</li>
<li>
- <p>Don't override <code class=
- "varname">PREFIX</code> from within the package
- Makefile, e.g. Java VMs, standalone shells, etc.,
- because the code to symlink files into <code class=
- "filename">${BUILDLINK_DIR}</code> looks for files
+ <p>Don't override <tt class="varname">PREFIX</tt>
+ from within the package Makefile, e.g. Java VMs,
+ standalone shells, etc., because the code to
+ symlink files into <tt class=
+ "filename">${BUILDLINK_DIR}</tt> looks for files
relative to &#8220;<span class="quote">pkg_info -qp
- <em class=
- "replaceable"><code>pkgname</code></em></span>&#8221;.</p>
+ <i class=
+ "replaceable"><tt>pkgname</tt></i></span>&#8221;.</p>
</li>
<li>
<p>Remember that <span class=
- "emphasis"><em>only</em></span> the <code class=
- "filename">buildlink3.mk</code> files that you list
+ "emphasis"><em>only</em></span> the <tt class=
+ "filename">buildlink3.mk</tt> files that you list
in a package's Makefile are added as dependencies
for that package.</p>
</li>
@@ -5878,89 +5921,86 @@ DEPENDS+= foo&gt;=1.1.0:../../category/foo
.include "../../category/foo/buildlink3.mk"
</pre>
- <p>There are several <code class=
- "filename">buildlink3.mk</code> files in <code class=
- "filename">pkgsrc/mk</code> that handle special package
+ <p>There are several <tt class=
+ "filename">buildlink3.mk</tt> files in <tt class=
+ "filename">pkgsrc/mk</tt> that handle special package
issues:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="filename">bdb.buildlink3.mk</code>
+ <p><tt class="filename">bdb.buildlink3.mk</tt>
chooses either the native or a pkgsrc Berkeley DB
- implementation based on the values of <code class=
- "varname">BDB_ACCEPTED</code> and <code class=
- "varname">BDB_DEFAULT</code>.</p>
+ implementation based on the values of <tt class=
+ "varname">BDB_ACCEPTED</tt> and <tt class=
+ "varname">BDB_DEFAULT</tt>.</p>
</li>
<li>
- <p><code class=
- "filename">curses.buildlink3.mk</code> If the
- system comes with neither Curses nor NCurses, this
- will take care to install the <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
+ <p><tt class="filename">curses.buildlink3.mk</tt>
+ If the system comes with neither Curses nor
+ NCurses, this will take care to install the
+ <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/ncurses/README.html"
- class="pkgname">devel/ncurses</a> package.</p>
+ class="pkgname">devel/ncurses</a> package.</p>
</li>
<li>
- <p><code class="filename">krb5.buildlink3.mk</code>
- uses the value of <code class=
- "varname">KRB5_ACCEPTED</code> to choose between
+ <p><tt class="filename">krb5.buildlink3.mk</tt>
+ uses the value of <tt class=
+ "varname">KRB5_ACCEPTED</tt> to choose between
adding a dependency on Heimdal or MIT-krb5 for
packages that require a Kerberos 5
implementation.</p>
</li>
<li>
- <p><code class=
- "filename">motif.buildlink3.mk</code> checks for a
- system-provided Motif installation or adds a
- dependency on <a xmlns=
+ <p><tt class="filename">motif.buildlink3.mk</tt>
+ checks for a system-provided Motif installation or
+ adds a dependency on <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/lesstif/README.html"
- class="pkgname">x11/lesstif</a> or <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/openmotif/README.html"
- class="pkgname">x11/openmotif</a>;</p>
+ class="pkgname">x11/lesstif</a> or <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/openmotif/README.html"
+ class="pkgname">x11/openmotif</a>;</p>
</li>
<li>
- <p><code class=
- "filename">ossaudio.buildlink3.mk</code> defines
- several variables that may be used by packages that
- use the Open Sound System (OSS) API;</p>
+ <p><tt class="filename">ossaudio.buildlink3.mk</tt>
+ defines several variables that may be used by
+ packages that use the Open Sound System (OSS)
+ API;</p>
</li>
<li>
- <p><code class=
- "filename">pgsql.buildlink3.mk</code> will accept
- either Postgres 7.3 or 7.4, whichever is found
- installed. See the file for more information.</p>
+ <p><tt class="filename">pgsql.buildlink3.mk</tt>
+ will accept either Postgres 7.3 or 7.4, whichever
+ is found installed. See the file for more
+ information.</p>
</li>
<li>
- <p><code class=
- "filename">pthread.buildlink3.mk</code> uses the
- value of <code class="varname">PTHREAD_OPTS</code>
- and checks for native pthreads or adds a dependency
- on <a xmlns=
+ <p><tt class="filename">pthread.buildlink3.mk</tt>
+ uses the value of <tt class=
+ "varname">PTHREAD_OPTS</tt> and checks for native
+ pthreads or adds a dependency on <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/pth/README.html"
- class="pkgname">devel/pth</a> as needed;</p>
+ class="pkgname">devel/pth</a> as needed;</p>
</li>
<li>
- <p><code class="filename">xaw.buildlink3.mk</code>
- uses the value of <code class=
- "varname">XAW_TYPE</code> to choose a particular
- Athena widgets library.</p>
+ <p><tt class="filename">xaw.buildlink3.mk</tt> uses
+ the value of <tt class="varname">XAW_TYPE</tt> to
+ choose a particular Athena widgets library.</p>
</li>
</ul>
</div>
- <p>The comments in those <code class=
- "filename">buildlink3.mk</code> files provide a more
+ <p>The comments in those <tt class=
+ "filename">buildlink3.mk</tt> files provide a more
complete description of how to use them properly.</p>
</div>
@@ -5969,56 +6009,54 @@ DEPENDS+= foo&gt;=1.1.0:../../category/foo
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2587290" id="id2587290"></a>9.2.&nbsp;Writing
- <code class="filename">buildlink3.mk</code>
- files</h2>
+ "id2567933" id="id2567933"></a>9.2.&nbsp;Writing
+ <tt class="filename">buildlink3.mk</tt> files</h2>
</div>
</div>
</div>
- <p>A package's <code class=
- "filename">buildlink3.mk</code> file is included by
- Makefiles to indicate the need to compile and link
- against header files and libraries provided by the
- package. A <code class="filename">buildlink3.mk</code>
- file should always provide enough information to add the
- correct type of dependency relationship and include any
- other <code class="filename">buildlink3.mk</code> files
- that it needs to find headers and libraries that it needs
- in turn.</p>
+ <p>A package's <tt class="filename">buildlink3.mk</tt>
+ file is included by Makefiles to indicate the need to
+ compile and link against header files and libraries
+ provided by the package. A <tt class=
+ "filename">buildlink3.mk</tt> file should always provide
+ enough information to add the correct type of dependency
+ relationship and include any other <tt class=
+ "filename">buildlink3.mk</tt> files that it needs to find
+ headers and libraries that it needs in turn.</p>
- <p>To generate an initial <code class=
- "filename">buildlink3.mk</code> file for further editing,
+ <p>To generate an initial <tt class=
+ "filename">buildlink3.mk</tt> file for further editing,
Rene Hexel's <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/createbuildlink/README.html"
- class="pkgname">pkgtools/createbuildlink</a> package is
- highly recommended. For most packages, the following
- command will generate a good starting point for
- <code class="filename">buildlink3.mk</code> files:</p>
+ class="pkgname">pkgtools/createbuildlink</a> package
+ is highly recommended. For most packages, the
+ following command will generate a good starting point
+ for <tt class="filename">buildlink3.mk</tt> files:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cd pkgsrc/<em class=
-"replaceable"><code>category</code></em>/<em class=
-"replaceable"><code>pkgdir</code></em>
-<code class=
-"prompt">%</code> createbuildlink -3 &gt;buildlink3.mk</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cd pkgsrc/<i class=
+"replaceable"><tt>category</tt></i>/<i class=
+"replaceable"><tt>pkgdir</tt></i>
+<tt class=
+"prompt">%</tt> createbuildlink -3 &gt;buildlink3.mk</tt></b>
</pre>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2587496" id=
- "id2587496"></a>9.2.1. Anatomy of a buildlink3.mk
+ <h3 class="title"><a name="id2568003" id=
+ "id2568003"></a>9.2.1. Anatomy of a buildlink3.mk
file</h3>
</div>
</div>
</div>
- <p>The following real-life example <code class=
- "filename">buildlink3.mk</code> is taken from
- <code class="filename">pkgsrc/graphics/tiff</code>:</p>
+ <p>The following real-life example <tt class=
+ "filename">buildlink3.mk</tt> is taken from <tt class=
+ "filename">pkgsrc/graphics/tiff</tt>:</p>
<pre class="programlisting">
# $NetBSD: buildlink3.mk,v 1.7 2004/03/18 09:12:12 jlam Exp $
@@ -6043,88 +6081,84 @@ BUILDLINK_PKGSRCDIR.tiff?= ../../graphics/tiff
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
</pre>
- <p>The header and footer manipulate <code class=
- "varname">BUILDLINK_DEPTH</code>, which is common
- across all <code class="filename">buildlink3.mk</code>
- files and is used to track at what depth we are
- including <code class="filename">buildlink3.mk</code>
- files.</p>
+ <p>The header and footer manipulate <tt class=
+ "varname">BUILDLINK_DEPTH</tt>, which is common across
+ all <tt class="filename">buildlink3.mk</tt> files and
+ is used to track at what depth we are including
+ <tt class="filename">buildlink3.mk</tt> files.</p>
<p>The first section controls if the dependency on
- <em class="replaceable"><code>pkg</code></em> is added.
- <code class="varname">BUILDLINK_DEPENDS</code> is the
+ <i class="replaceable"><tt>pkg</tt></i> is added.
+ <tt class="varname">BUILDLINK_DEPENDS</tt> is the
global list of packages for which dependencies are
added by buildlink3.</p>
<p>The second section advises pkgsrc that the
- <code class="filename">buildlink3.mk</code> file for
- <em class="replaceable"><code>pkg</code></em> has been
- included at some point. <code class=
- "varname">BUILDLINK_PACKAGES</code> is the global list
- of packages for which <code class=
- "filename">buildlink3.mk</code> files have been
- included. It must <span class=
- "emphasis"><em>always</em></span> be appended to within
- a <code class="filename">buildlink3.mk</code> file.</p>
+ <tt class="filename">buildlink3.mk</tt> file for
+ <i class="replaceable"><tt>pkg</tt></i> has been
+ included at some point. <tt class=
+ "varname">BUILDLINK_PACKAGES</tt> is the global list of
+ packages for which <tt class=
+ "filename">buildlink3.mk</tt> files have been included.
+ It must <span class="emphasis"><em>always</em></span>
+ be appended to within a <tt class=
+ "filename">buildlink3.mk</tt> file.</p>
<p>The third section is protected from multiple
- inclusion and controls how the dependency on <em class=
- "replaceable"><code>pkg</code></em> is added. Several
+ inclusion and controls how the dependency on <i class=
+ "replaceable"><tt>pkg</tt></i> is added. Several
important variables are set in the section:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> is the
- actual dependency recorded in the installed
- package; this should always be set using
- <span><strong class="command">+=</strong></span>
- to ensure that we're appending to any
- pre-existing list of values. This variable should
- be set to the first version of the package that
- had the last change in the major number of a
- shared library or that had a major API
- change.</p>
+ <p><tt class=
+ "varname">BUILDLINK_DEPENDS.<i class="replaceable">
+ <tt>pkg</tt></i></tt> is the actual dependency
+ recorded in the installed package; this should
+ always be set using <span><b class=
+ "command">+=</b></span> to ensure that we're
+ appending to any pre-existing list of values.
+ This variable should be set to the first version
+ of the package that had the last change in the
+ major number of a shared library or that had a
+ major API change.</p>
</li>
<li>
- <p><code class=
- "varname">BUILDLINK_PKGSRCDIR.<em class=
- "replaceable"><code>pkg</code></em></code> is the
- location of the <em class=
- "replaceable"><code>pkg</code></em> pkgsrc
+ <p><tt class=
+ "varname">BUILDLINK_PKGSRCDIR.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> is the
+ location of the <i class=
+ "replaceable"><tt>pkg</tt></i> pkgsrc
directory;</p>
</li>
<li>
- <p><code class=
- "varname">BUILDLINK_DEPMETHOD.<em class=
- "replaceable"><code>pkg</code></em></code> (not
- shown above) controls whether we use <code class=
- "varname">BUILD_DEPENDS</code> or <code class=
- "varname">DEPENDS</code> to add the dependency on
- <em class="replaceable"><code>pkg</code></em>.
- The build dependency is selected by setting
- <code class=
- "varname">BUILDLINK_DEPMETHOD.<em class=
- "replaceable"><code>pkg</code></em></code> to
+ <p><tt class=
+ "varname">BUILDLINK_DEPMETHOD.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> (not shown
+ above) controls whether we use <tt class=
+ "varname">BUILD_DEPENDS</tt> or <tt class=
+ "varname">DEPENDS</tt> to add the dependency on
+ <i class="replaceable"><tt>pkg</tt></i>. The
+ build dependency is selected by setting
+ <tt class="varname">BUILDLINK_DEPMETHOD.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> to
&#8220;<span class="quote">build</span>&#8221;.
By default, the full dependency is used.</p>
</li>
<li>
- <p><code class=
- "varname">BUILDLINK_INCDIRS.<em class=
- "replaceable"><code>pkg</code></em></code> and
- <code class=
- "varname">BUILDLINK_LIBDIRS.<em class="replaceable">
- <code>pkg</code></em></code> (not shown above)
- are lists of subdirectories of <code class=
- "filename">${BUILDLINK_PREFIX.<em class=
- "replaceable"><code>pkg</code></em>}</code> to
- add to the header and library search paths. These
+ <p><tt class=
+ "varname">BUILDLINK_INCDIRS.<i class="replaceable">
+ <tt>pkg</tt></i></tt> and <tt class=
+ "varname">BUILDLINK_LIBDIRS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> (not shown
+ above) are lists of subdirectories of <tt class=
+ "filename">${BUILDLINK_PREFIX.<i class=
+ "replaceable"><tt>pkg</tt></i>}</tt> to add to
+ the header and library search paths. These
default to &#8220;<span class=
"quote">include</span>&#8221; and
&#8220;<span class="quote">lib</span>&#8221;
@@ -6132,18 +6166,17 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
</li>
<li>
- <p><code class=
- "varname">BUILDLINK_CPPFLAGS.<em class=
- "replaceable"><code>pkg</code></em></code> (not
- shown above) is the list of preprocessor flags to
- add to <code class="varname">CPPFLAGS</code>,
- which are passed on to the configure and build
- phases. The &#8220;<span class=
- "quote">-I</span>&#8221; option should be avoided
- and instead be handled using <code class=
- "varname">BUILDLINK_INCDIRS.<em class=
- "replaceable"><code>pkg</code></em></code> as
- above.</p>
+ <p><tt class=
+ "varname">BUILDLINK_CPPFLAGS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> (not shown
+ above) is the list of preprocessor flags to add
+ to <tt class="varname">CPPFLAGS</tt>, which are
+ passed on to the configure and build phases. The
+ &#8220;<span class="quote">-I</span>&#8221;
+ option should be avoided and instead be handled
+ using <tt class=
+ "varname">BUILDLINK_INCDIRS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> as above.</p>
</li>
</ul>
</div>
@@ -6151,110 +6184,103 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
<p>The following variables are all optionally defined
within this second section (protected against multiple
inclusion) and control which package files are
- symlinked into <code class=
- "filename">${BUILDLINK_DIR}</code> and how their names
+ symlinked into <tt class=
+ "filename">${BUILDLINK_DIR}</tt> and how their names
are transformed during the symlinking:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class=
- "varname">BUILDLINK_FILES.<em class=
- "replaceable"><code>pkg</code></em></code> (not
- shown above) is a shell glob pattern relative to
- <code class=
- "filename">${BUILDLINK_PREFIX.<em class=
- "replaceable"><code>pkg</code></em>}</code> to be
- symlinked into <code class=
- "filename">${BUILDLINK_DIR}</code>, e.g.
- <code class="filename">include/*.h</code>.</p>
+ <p><tt class="varname">BUILDLINK_FILES.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> (not shown
+ above) is a shell glob pattern relative to
+ <tt class="filename">${BUILDLINK_PREFIX.<i class=
+ "replaceable"><tt>pkg</tt></i>}</tt> to be
+ symlinked into <tt class=
+ "filename">${BUILDLINK_DIR}</tt>, e.g. <tt class=
+ "filename">include/*.h</tt>.</p>
</li>
<li>
- <p><code class=
- "varname">BUILDLINK_FILES_CMD.<em class=
- "replaceable"><code>pkg</code></em></code> (not
- shown above) is a shell pipeline that outputs to
- stdout a list of files relative to <code class=
- "filename">${BUILDLINK_PREFIX.<em class=
- "replaceable"><code>pkg</code></em>}</code>. The
+ <p><tt class=
+ "varname">BUILDLINK_FILES_CMD.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> (not shown
+ above) is a shell pipeline that outputs to stdout
+ a list of files relative to <tt class=
+ "filename">${BUILDLINK_PREFIX.<i class=
+ "replaceable"><tt>pkg</tt></i>}</tt>. The
resulting files are to be symlinked into
- <code class="filename">${BUILDLINK_DIR}</code>.
- By default, this takes the <code class=
- "filename">+CONTENTS</code> of a <em class=
- "replaceable"><code>pkg</code></em> and filters
- it through <code class=
- "varname">${BUILDLINK_CONTENTS_FILTER.<em class=
- "replaceable"><code>pkg</code></em>}</code>.</p>
+ <tt class="filename">${BUILDLINK_DIR}</tt>. By
+ default, this takes the <tt class=
+ "filename">+CONTENTS</tt> of a <i class=
+ "replaceable"><tt>pkg</tt></i> and filters it
+ through <tt class=
+ "varname">${BUILDLINK_CONTENTS_FILTER.<i class=
+ "replaceable"><tt>pkg</tt></i>}</tt>.</p>
</li>
<li>
- <p><code class=
- "varname">BUILDLINK_CONTENTS_FILTER.<em class=
- "replaceable"><code>pkg</code></em></code> (not
- shown above) is a filter command that filters
- <code class="filename">+CONTENTS</code> input
- into a list of files relative to <code class=
- "filename">${BUILDLINK_PREFIX.<em class=
- "replaceable"><code>pkg</code></em>}</code> on
- stdout. By default for overwrite packages,
- <code class=
- "varname">BUILDLINK_CONTENTS_FILTER.<em class=
- "replaceable"><code>pkg</code></em></code>
- outputs the contents of the <code class=
- "filename">include</code> and <code class=
- "filename">lib</code> directories in the package
- <code class="filename">+CONTENTS</code>, and for
- pkgviews packages, it outputs any libtool
- archives in <code class="filename">lib</code>
+ <p><tt class=
+ "varname">BUILDLINK_CONTENTS_FILTER.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> (not shown
+ above) is a filter command that filters
+ <tt class="filename">+CONTENTS</tt> input into a
+ list of files relative to <tt class=
+ "filename">${BUILDLINK_PREFIX.<i class=
+ "replaceable"><tt>pkg</tt></i>}</tt> on stdout.
+ By default for overwrite packages, <tt class=
+ "varname">BUILDLINK_CONTENTS_FILTER.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> outputs the
+ contents of the <tt class="filename">include</tt>
+ and <tt class="filename">lib</tt> directories in
+ the package <tt class="filename">+CONTENTS</tt>,
+ and for pkgviews packages, it outputs any libtool
+ archives in <tt class="filename">lib</tt>
directories.</p>
</li>
<li>
- <p><code class=
- "varname">BUILDLINK_TRANSFORM.<em class=
- "replaceable"><code>pkg</code></em></code> (not
- shown above) is a list of sed arguments used to
+ <p><tt class=
+ "varname">BUILDLINK_TRANSFORM.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> (not shown
+ above) is a list of sed arguments used to
transform the name of the source filename into a
- destination filename, e.g. <span><strong class=
+ destination filename, e.g. <span><b class=
"command">-e
- "s|/curses.h|/ncurses.h|g"</strong></span>.</p>
+ "s|/curses.h|/ncurses.h|g"</b></span>.</p>
</li>
</ul>
</div>
- <p>The last section includes any <code class=
- "filename">buildlink3.mk</code> needed for <em class=
- "replaceable"><code>pkg</code></em>'s library
- dependencies. Including these <code class=
- "filename">buildlink3.mk</code> files means that the
- headers and libraries for these dependencies are also
- symlinked into <code class=
- "filename">${BUILDLINK_DIR}</code> whenever the
- <em class="replaceable"><code>pkg</code></em>
- <code class="filename">buildlink3.mk</code> file is
- included.</p>
+ <p>The last section includes any <tt class=
+ "filename">buildlink3.mk</tt> needed for <i class=
+ "replaceable"><tt>pkg</tt></i>'s library dependencies.
+ Including these <tt class="filename">buildlink3.mk</tt>
+ files means that the headers and libraries for these
+ dependencies are also symlinked into <tt class=
+ "filename">${BUILDLINK_DIR}</tt> whenever the <i class=
+ "replaceable"><tt>pkg</tt></i> <tt class=
+ "filename">buildlink3.mk</tt> file is included.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2588073" id=
- "id2588073"></a>9.2.2. Updating <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> in
- <code class="filename">buildlink3.mk</code>
- files</h3>
+ <h3 class="title"><a name="id2568375" id=
+ "id2568375"></a>9.2.2. Updating <tt class=
+ "varname">BUILDLINK_DEPENDS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> in <tt class=
+ "filename">buildlink3.mk</tt> files</h3>
</div>
</div>
</div>
<p>There are two situations that require increasing the
- dependency listed in <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> after a
- package update:</p>
+ dependency listed in <tt class=
+ "varname">BUILDLINK_DEPENDS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> after a package
+ update:</p>
<div class="orderedlist">
<ol type="1">
@@ -6271,37 +6297,35 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
</ol>
</div>
- <p>In these cases, <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> should be
- adjusted to require at least the new package version.
- In some cases, the packages that depend on this new
- version may need their <code class=
- "varname">PKGREVISION</code>s increased and, if they
- have <code class="filename">buildlink3.mk</code> files,
- their <code class=
- "varname">BUILDLINK_DEPENDS.<em class="replaceable"><code>
- pkg</code></em></code> adjusted, too. This is needed so
- that binary packages made using it will require the
- correct package dependency and not settle for an older
- one which will not contain the necessary shared
- libraries.</p>
+ <p>In these cases, <tt class=
+ "varname">BUILDLINK_DEPENDS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> should be adjusted
+ to require at least the new package version. In some
+ cases, the packages that depend on this new version may
+ need their <tt class="varname">PKGREVISION</tt>s
+ increased and, if they have <tt class=
+ "filename">buildlink3.mk</tt> files, their <tt class=
+ "varname">BUILDLINK_DEPENDS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> adjusted, too. This
+ is needed so that binary packages made using it will
+ require the correct package dependency and not settle
+ for an older one which will not contain the necessary
+ shared libraries.</p>
<p>Please take careful consideration before adjusting
- <code class="varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code> as we don't
- want to cause unneeded package deletions and rebuilds.
- In many cases, new versions of packages work just fine
- with older dependencies. See <a href="#dependencies"
- title="12.1.3.&nbsp;Handling dependencies">Section
- 12.1.3, &#8220;Handling dependencies&#8221;</a> and
- <a href="#buildlink" title=
+ <tt class="varname">BUILDLINK_DEPENDS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> as we don't want to
+ cause unneeded package deletions and rebuilds. In many
+ cases, new versions of packages work just fine with
+ older dependencies. See <a href="#dependencies" title=
+ "12.1.3.&nbsp;Handling dependencies">Section 12.1.3,
+ &#8220;Handling dependencies&#8221;</a> and <a href=
+ "#buildlink" title=
"Chapter&nbsp;9.&nbsp;Buildlink methodology">Chapter 9,
<i>Buildlink methodology</i></a> for more information
about dependencies on other packages, including the
- <code class="varname">BUILDLINK_RECOMMENDED</code> and
- <code class="varname">RECOMMENDED</code>
- definitions.</p>
+ <tt class="varname">BUILDLINK_RECOMMENDED</tt> and
+ <tt class="varname">RECOMMENDED</tt> definitions.</p>
</div>
</div>
@@ -6310,50 +6334,50 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2588152" id="id2588152"></a>9.3.&nbsp;Writing
- <code class="filename">builtin.mk</code> files</h2>
+ "id2568590" id="id2568590"></a>9.3.&nbsp;Writing
+ <tt class="filename">builtin.mk</tt> files</h2>
</div>
</div>
</div>
<p>Some packages in pkgsrc install headers and libraries
that coincide with headers and libraries present in the
- base system. Aside from a <code class=
- "filename">buildlink3.mk</code> file, these packages
- should also include a <code class=
- "filename">builtin.mk</code> file that includes the
- necessary checks to decide whether using the built-in
- software or the pkgsrc software is appropriate.</p>
+ base system. Aside from a <tt class=
+ "filename">buildlink3.mk</tt> file, these packages should
+ also include a <tt class="filename">builtin.mk</tt> file
+ that includes the necessary checks to decide whether
+ using the built-in software or the pkgsrc software is
+ appropriate.</p>
<p>The only requirements of a builtin.mk file for
- <em class="replaceable"><code>pkg</code></em> are:</p>
+ <i class="replaceable"><tt>pkg</tt></i> are:</p>
<div class="orderedlist">
<ol type="1">
<li>
- <p>It should set <code class=
- "varname">USE_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> to
- either &#8220;<span class="quote">yes</span>&#8221;
- or &#8220;<span class="quote">no</span>&#8221;
- after it is included.</p>
+ <p>It should set <tt class=
+ "varname">USE_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> to either
+ &#8220;<span class="quote">yes</span>&#8221; or
+ &#8220;<span class="quote">no</span>&#8221; after
+ it is included.</p>
</li>
<li>
<p>It should <span class=
"emphasis"><em>not</em></span> override any
- <code class="varname">USE_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> which is
- already set before the <code class=
- "filename">builtin.mk</code> file is included.</p>
+ <tt class="varname">USE_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> which is
+ already set before the <tt class=
+ "filename">builtin.mk</tt> file is included.</p>
</li>
<li>
<p>It should be written to allow multiple
inclusion. This is <span class=
"emphasis"><em>very</em></span> important and takes
- careful attention to <code class=
- "filename">Makefile</code> coding.</p>
+ careful attention to <tt class=
+ "filename">Makefile</tt> coding.</p>
</li>
</ol>
</div>
@@ -6362,10 +6386,9 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2588233" id=
- "id2588233"></a>9.3.1.&nbsp;Anatomy of a
- <code class="filename">builtin.mk</code>
- file</h3>
+ <h3 class="title"><a name="id2568672" id=
+ "id2568672"></a>9.3.1.&nbsp;Anatomy of a
+ <tt class="filename">builtin.mk</tt> file</h3>
</div>
</div>
</div>
@@ -6414,82 +6437,80 @@ CHECK_BUILTIN.foo?= no
</pre>
- <p>The first section sets <code class=
- "varname">IS_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> depending on
- if <em class="replaceable"><code>pkg</code></em> really
- exists in the base system. This should not be a base
- system software with similar functionality to
- <em class="replaceable"><code>pkg</code></em>; it
- should only be &#8220;<span class=
- "quote">yes</span>&#8221; if the actual package is
- included as part of the base system. This variable is
- only used internally within the <code class=
- "filename">builtin.mk</code> file.</p>
-
- <p>The second section sets <code class=
- "varname">BUILTIN_PKG.<em class=
- "replaceable"><code>pkg</code></em></code> to the
- version of <em class=
- "replaceable"><code>pkg</code></em> in the base system
- if it exists (if <code class=
- "varname">IS_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> is
+ <p>The first section sets <tt class=
+ "varname">IS_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> depending on if
+ <i class="replaceable"><tt>pkg</tt></i> really exists
+ in the base system. This should not be a base system
+ software with similar functionality to <i class=
+ "replaceable"><tt>pkg</tt></i>; it should only be
+ &#8220;<span class="quote">yes</span>&#8221; if the
+ actual package is included as part of the base system.
+ This variable is only used internally within the
+ <tt class="filename">builtin.mk</tt> file.</p>
+
+ <p>The second section sets <tt class=
+ "varname">BUILTIN_PKG.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> to the version of
+ <i class="replaceable"><tt>pkg</tt></i> in the base
+ system if it exists (if <tt class=
+ "varname">IS_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> is
&#8220;<span class="quote">yes</span>&#8221;). This
- variable is only used internally within the
- <code class="filename">builtin.mk</code> file.</p>
-
- <p>The third section sets <code class=
- "varname">USE_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> and is
- <span class="emphasis"><em>required</em></span> in all
- <code class="filename">builtin.mk</code> files. The
- code in this section must make the determination
- whether the built-in software is adequate to satisfy
- the dependencies listed in <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code>. This is
- typically done by comparing <code class=
- "varname">BUILTIN_PKG.<em class=
- "replaceable"><code>pkg</code></em></code> against each
- of the dependencies in <code class=
- "varname">BUILDLINK_DEPENDS.<em class=
- "replaceable"><code>pkg</code></em></code>.
- <code class="varname">USE_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> <span class=
+ variable is only used internally within the <tt class=
+ "filename">builtin.mk</tt> file.</p>
+
+ <p>The third section sets <tt class=
+ "varname">USE_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> and is <span class=
+ "emphasis"><em>required</em></span> in all <tt class=
+ "filename">builtin.mk</tt> files. The code in this
+ section must make the determination whether the
+ built-in software is adequate to satisfy the
+ dependencies listed in <tt class=
+ "varname">BUILDLINK_DEPENDS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt>. This is typically
+ done by comparing <tt class=
+ "varname">BUILTIN_PKG.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> against each of the
+ dependencies in <tt class=
+ "varname">BUILDLINK_DEPENDS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt>. <tt class=
+ "varname">USE_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> <span class=
"emphasis"><em>must</em></span> be set to the correct
- value by the end of the <code class=
- "filename">builtin.mk</code> file. Note that
- <code class="varname">USE_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> may be
+ value by the end of the <tt class=
+ "filename">builtin.mk</tt> file. Note that <tt class=
+ "varname">USE_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> may be
&#8220;<span class="quote">yes</span>&#8221; even if
- <code class="varname">IS_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> is
+ <tt class="varname">IS_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> is
&#8220;<span class="quote">no</span>&#8221; because we
may make the determination that the built-in version of
the software is similar enough to be used as a
replacement.</p>
- <p>The last section is guarded by <code class=
- "varname">CHECK_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code>, and
- includes code that uses the value of <code class=
- "varname">USE_BUILTIN.<em class=
- "replaceable"><code>pkg</code></em></code> set in the
- previous section. This typically includes, e.g., adding
+ <p>The last section is guarded by <tt class=
+ "varname">CHECK_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt>, and includes code
+ that uses the value of <tt class=
+ "varname">USE_BUILTIN.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> set in the previous
+ section. This typically includes, e.g., adding
additional dependency restrictions and listing
- additional files to symlink into <code class=
- "filename">${BUILDLINK_DIR}</code> (via <code class=
- "varname">BUILDLINK_FILES.<em class=
- "replaceable"><code>pkg</code></em></code>).</p>
+ additional files to symlink into <tt class=
+ "filename">${BUILDLINK_DIR}</tt> (via <tt class=
+ "varname">BUILDLINK_FILES.<i class=
+ "replaceable"><tt>pkg</tt></i></tt>).</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2588392" id=
- "id2588392"></a>9.3.2.&nbsp;Global preferences
+ <h3 class="title"><a name="id2568899" id=
+ "id2568899"></a>9.3.2.&nbsp;Global preferences
for native or pkgsrc software</h3>
</div>
</div>
@@ -6499,24 +6520,24 @@ CHECK_BUILTIN.foo?= no
whether to set a global preference for using either the
built-in (native) version or the pkgsrc version of
software to satisfy a dependency. This is controlled by
- setting <code class="varname">PREFER_PKGSRC</code> and
- <code class="varname">PREFER_NATIVE</code>. These
- variables take values of either &#8220;<span class=
+ setting <tt class="varname">PREFER_PKGSRC</tt> and
+ <tt class="varname">PREFER_NATIVE</tt>. These variables
+ take values of either &#8220;<span class=
"quote">yes</span>&#8221;, &#8220;<span class=
"quote">no</span>&#8221;, or a list of packages.
- <code class="varname">PREFER_PKGSRC</code> tells pkgsrc
- to use the pkgsrc versions of software, while
- <code class="varname">PREFER_NATIVE</code> tells pkgsrc
- to use the built-in versions. Preferences are
- determined by the most specific instance of the package
- in either <code class="varname">PREFER_PKGSRC</code> or
- <code class="varname">PREFER_NATIVE</code>. If a
- package is specified in neither or in both variables,
- then <code class="varname">PREFER_PKGSRC</code> has
- precedence over <code class=
- "varname">PREFER_NATIVE</code>. For example, to require
- using pkgsrc versions of software for all but the most
- basic bits on a NetBSD system, you can set:</p>
+ <tt class="varname">PREFER_PKGSRC</tt> tells pkgsrc to
+ use the pkgsrc versions of software, while <tt class=
+ "varname">PREFER_NATIVE</tt> tells pkgsrc to use the
+ built-in versions. Preferences are determined by the
+ most specific instance of the package in either
+ <tt class="varname">PREFER_PKGSRC</tt> or <tt class=
+ "varname">PREFER_NATIVE</tt>. If a package is specified
+ in neither or in both variables, then <tt class=
+ "varname">PREFER_PKGSRC</tt> has precedence over
+ <tt class="varname">PREFER_NATIVE</tt>. For example, to
+ require using pkgsrc versions of software for all but
+ the most basic bits on a NetBSD system, you can
+ set:</p>
<pre class="programlisting">
PREFER_PKGSRC= yes
PREFER_NATIVE= getopt skey tcp_wrappers
@@ -6524,10 +6545,10 @@ CHECK_BUILTIN.foo?= no
</pre>
<p>A package <span class=
- "emphasis"><em>must</em></span> have a <code class=
- "filename">builtin.mk</code> file to be listed in
- <code class="varname">PREFER_NATIVE</code>, otherwise
- it is simply ignored in that list.</p>
+ "emphasis"><em>must</em></span> have a <tt class=
+ "filename">builtin.mk</tt> file to be listed in
+ <tt class="varname">PREFER_NATIVE</tt>, otherwise it is
+ simply ignored in that list.</p>
</div>
</div>
</div>
@@ -6547,18 +6568,18 @@ CHECK_BUILTIN.foo?= no
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2588533">10.1.
+ <dt><span class="sect1"><a href="#id2568971">10.1.
Global default options</a></span></dt>
- <dt><span class="sect1"><a href="#id2588548">10.2.
- Converting packages to use <code class=
- "filename">bsd.options.mk</code></a></span></dt>
+ <dt><span class="sect1"><a href="#id2568986">10.2.
+ Converting packages to use
+ bsd.options.mk</a></span></dt>
</dl>
</div>
<p>Many packages have the ability to be built to support
- different sets of features. <code class=
- "filename">bsd.options.mk</code> is a framework in pkgsrc
+ different sets of features. <tt class=
+ "filename">bsd.options.mk</tt> is a framework in pkgsrc
that provides generic handling of those options that
determine different ways in which the packages can be
built. It's possible for the user to specify exactly which
@@ -6570,17 +6591,17 @@ CHECK_BUILTIN.foo?= no
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2588533" id="id2588533"></a>10.1.&nbsp;Global
+ "id2568971" id="id2568971"></a>10.1.&nbsp;Global
default options</h2>
</div>
</div>
</div>
- <p>Global default options are listed in <code class=
- "varname">PKG_DEFAULT_OPTIONS</code>, which is a list of
+ <p>Global default options are listed in <tt class=
+ "varname">PKG_DEFAULT_OPTIONS</tt>, which is a list of
the options that should be built into every package if
that option is supported. This variable should be set in
- <code class="filename">/etc/mk.conf</code>.</p>
+ <tt class="filename">/etc/mk.conf</tt>.</p>
</div>
<div class="sect1" lang="en" xml:lang="en">
@@ -6588,20 +6609,18 @@ CHECK_BUILTIN.foo?= no
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2588548" id=
- "id2588548"></a>10.2.&nbsp;Converting packages to
- use <code class=
- "filename">bsd.options.mk</code></h2>
+ "id2568986" id=
+ "id2568986"></a>10.2.&nbsp;Converting packages to
+ use <tt class="filename">bsd.options.mk</tt></h2>
</div>
</div>
</div>
- <p>The following example shows how <code class=
- "filename">bsd.options.mk</code> should be use in a
- package <code class="filename">Makefile</code>, or in a
- file, e.g. <code class="filename">options.mk</code>, that
- is included by the main package <code class=
- "filename">Makefile</code>.</p>
+ <p>The following example shows how <tt class=
+ "filename">bsd.options.mk</tt> should be use in a package
+ <tt class="filename">Makefile</tt>, or in a file, e.g.
+ <tt class="filename">options.mk</tt>, that is included by
+ the main package <tt class="filename">Makefile</tt>.</p>
<pre class="programlisting">
# Global and legacy options
.if defined(WIBBLE_USE_OPENLDAP) &amp;&amp; !empty(WIBBLE_USE_OPENLDAP:M[yY][eE][sS])
@@ -6643,12 +6662,12 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
<p>The first section only exists if you are converting a
package that had its own ad-hoc options handling to use
- <code class="filename">bsd.options.mk</code>. It converts
+ <tt class="filename">bsd.options.mk</tt>. It converts
global or legacy options variables into an equivalent
- <code class="varname">PKG_OPTIONS.<em class=
- "replaceable"><code>pkg</code></em></code> value. These
- sections will be removed over time as the old options are
- in turn deprecated and removed.</p>
+ <tt class="varname">PKG_OPTIONS.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> value. These sections
+ will be removed over time as the old options are in turn
+ deprecated and removed.</p>
<p>The second section contains the information about
which build options are supported by the package, and any
@@ -6657,33 +6676,33 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
<div class="orderedlist">
<ol type="1">
<li>
- <p><code class="varname">PKG_OPTIONS_VAR</code> is
- a list of the name of the <a href=
+ <p><tt class="varname">PKG_OPTIONS_VAR</tt> is a
+ list of the name of the <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">make</span>(1)</span></a> variables
that contain the options the user wishes to select.
The recommended value is &#8220;<span class=
- "quote">PKG_OPTIONS.<em class=
- "replaceable"><code>pkg</code></em></span>&#8221;
- but any package-specific value may be used. This
+ "quote">PKG_OPTIONS.<i class=
+ "replaceable"><tt>pkg</tt></i></span>&#8221; but
+ any package-specific value may be used. This
variable should be set in a package Makefile.</p>
</li>
<li>
- <p><code class=
- "varname">PKG_SUPPORTED_OPTIONS</code> is a list of
- build options supported by the package. This
- variable should be set in a package Makefile.</p>
+ <p><tt class="varname">PKG_SUPPORTED_OPTIONS</tt>
+ is a list of build options supported by the
+ package. This variable should be set in a package
+ Makefile.</p>
</li>
<li>
- <p><code class="varname">${PKG_OPTIONS_VAR}</code>
- (the variables named in <code class=
- "varname">PKG_OPTIONS_VAR</code>) are variables
- that list the selected build options and override
- any default options given in <code class=
- "varname">PKG_DEFAULT_OPTIONS</code>. If any of the
+ <p><tt class="varname">${PKG_OPTIONS_VAR}</tt> (the
+ variables named in <tt class=
+ "varname">PKG_OPTIONS_VAR</tt>) are variables that
+ list the selected build options and override any
+ default options given in <tt class=
+ "varname">PKG_DEFAULT_OPTIONS</tt>. If any of the
options begin with a &#8220;<span class=
"quote">-</span>&#8221;, then that option is always
removed from the selected build options, e.g.</p>
@@ -6703,8 +6722,8 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
</pre>
- <p>This variable should be set in <code class=
- "filename">/etc/mk.conf</code>.</p>
+ <p>This variable should be set in <tt class=
+ "filename">/etc/mk.conf</tt>.</p>
</li>
</ol>
</div>
@@ -6715,22 +6734,22 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="varname">PKG_OPTIONS</code>
- contains the list of the selected build options,
- properly filtered to remove unsupported and
- duplicate options.</p>
+ <p><tt class="varname">PKG_OPTIONS</tt> contains
+ the list of the selected build options, properly
+ filtered to remove unsupported and duplicate
+ options.</p>
</li>
</ul>
</div>
<p>The remaining sections contain the logic that is
specific to each option. There should be a check for
- every option listed in <code class=
- "varname">PKG_SUPPORTED_OPTIONS</code>, and there should
- be clear documentation on what turning on the option will
- do in the comments preceding each section. The correct
- way to check for an option is to check whether it is
- listed in <code class="varname">PKG_OPTIONS</code>.</p>
+ every option listed in <tt class=
+ "varname">PKG_SUPPORTED_OPTIONS</tt>, and there should be
+ clear documentation on what turning on the option will do
+ in the comments preceding each section. The correct way
+ to check for an option is to check whether it is listed
+ in <tt class="varname">PKG_OPTIONS</tt>.</p>
</div>
</div>
@@ -6752,7 +6771,7 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
<dt><span class="sect1"><a href="#build.prefix">11.1.
Program location</a></span></dt>
- <dt><span class="sect1"><a href="#id2589156">11.2. Main
+ <dt><span class="sect1"><a href="#id2569662">11.2. Main
targets</a></span></dt>
<dt><span class="sect1"><a href=
@@ -6770,8 +6789,8 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
the generated binaries, etc. can be put into place on the
system. These are exactly the steps performed by the NetBSD
package system, which is implemented as a series of targets
- in a central Makefile, <code class=
- "filename">pkgsrc/mk/bsd.pkg.mk</code>.</p>
+ in a central Makefile, <tt class=
+ "filename">pkgsrc/mk/bsd.pkg.mk</tt>.</p>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
@@ -6789,16 +6808,16 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
discussion on where programs are installed, and which
variables influence this.</p>
- <p>The automatic variable <code class=
- "varname">PREFIX</code> indicates where all files of the
- final program shall be installed. It is usually set to
- <code class="varname">LOCALBASE</code> (<code class=
- "filename">/usr/pkg</code>), or <code class=
- "varname">CROSSBASE</code> for pkgs in the
+ <p>The automatic variable <tt class="varname">PREFIX</tt>
+ indicates where all files of the final program shall be
+ installed. It is usually set to <tt class=
+ "varname">LOCALBASE</tt> (<tt class=
+ "filename">/usr/pkg</tt>), or <tt class=
+ "varname">CROSSBASE</tt> for pkgs in the
&#8220;<span class="quote">cross</span>&#8221; category.
- The value of <code class="varname">PREFIX</code> needs to
- be put into the various places in the program's source
- where paths to these files are encoded. See <a href=
+ The value of <tt class="varname">PREFIX</tt> needs to be
+ put into the various places in the program's source where
+ paths to these files are encoded. See <a href=
"#components.patches" title=
"7.3.&nbsp;patches/*">Section&nbsp;7.3,
&#8220;patches/*&#8221;</a> and <a href="#fixes.libtool"
@@ -6813,16 +6832,16 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="varname">PREFIX</code> always
- points to the location where the current pkg will
- be installed. When referring to a pkg's own
+ <p><tt class="varname">PREFIX</tt> always points to
+ the location where the current pkg will be
+ installed. When referring to a pkg's own
installation path, use &#8220;<span class=
"quote">${PREFIX}</span>&#8221;.</p>
</li>
<li>
- <p><code class="varname">LOCALBASE</code> is where
- all non-X11 pkgs are installed. If you need to
+ <p><tt class="varname">LOCALBASE</tt> is where all
+ non-X11 pkgs are installed. If you need to
construct a -I or -L argument to the compiler to
find includes and libraries installed by another
non-X11 pkg, use &#8220;<span class=
@@ -6830,8 +6849,8 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
</li>
<li>
- <p><code class="varname">X11BASE</code> is where
- the actual X11 distribution (from xsrc, etc.) is
+ <p><tt class="varname">X11BASE</tt> is where the
+ actual X11 distribution (from xsrc, etc.) is
installed. When looking for <span class=
"emphasis"><em>standard</em></span> X11 includes
(not those installed by a pkg), use
@@ -6841,104 +6860,101 @@ CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
<li>
<p>X11 based are special in that they may be
- installed in either <code class=
- "varname">X11BASE</code> or <code class=
- "varname">LOCALBASE</code>.</p>
+ installed in either <tt class=
+ "varname">X11BASE</tt> or <tt class=
+ "varname">LOCALBASE</tt>.</p>
<p>Usually, X11 packages should be installed under
- <code class="varname">LOCALBASE</code> whenever
- possible. Note that you will need to set
- <code class="varname">USE_X11</code> in them to
- request the presence of X11 and to get the right
- compilation flags.</p>
+ <tt class="varname">LOCALBASE</tt> whenever
+ possible. Note that you will need to set <tt class=
+ "varname">USE_X11</tt> in them to request the
+ presence of X11 and to get the right compilation
+ flags.</p>
<p>Even though, there are some packages that cannot
- be installed under <code class=
- "varname">LOCALBASE</code>: those that come with
+ be installed under <tt class=
+ "varname">LOCALBASE</tt>: those that come with
app-defaults files. These packages are special and
- they must be placed under <code class=
- "varname">X11BASE</code>. To accomplish this, set
- either <code class="varname">USE_X11BASE</code> or
- <code class="varname">USE_IMAKE</code> in your
+ they must be placed under <tt class=
+ "varname">X11BASE</tt>. To accomplish this, set
+ either <tt class="varname">USE_X11BASE</tt> or
+ <tt class="varname">USE_IMAKE</tt> in your
package.</p>
- <p>Some notes: <code class="varname">USE_X11</code>
- and <code class="varname">USE_X11BASE</code> are
- mutually exclusive. If you need to find includes or
- libraries installed by a pkg that has <code class=
- "varname">USE_IMAKE</code> or <code class=
- "varname">USE_X11BASE</code> in its pkg
- <code class="filename">Makefile</code>, you need to
- use <span class="emphasis"><em>both</em></span>
- <code class="filename">${X11BASE}</code> and
- <code class="filename">${LOCALBASE}</code>. To
- force installation of all X11 packages in
- <code class="varname">LOCALBASE</code>, the
- <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
- href=
+ <p>Some notes: <tt class="varname">USE_X11</tt> and
+ <tt class="varname">USE_X11BASE</tt> are mutually
+ exclusive. If you need to find includes or
+ libraries installed by a pkg that has <tt class=
+ "varname">USE_IMAKE</tt> or <tt class=
+ "varname">USE_X11BASE</tt> in its pkg <tt class=
+ "filename">Makefile</tt>, you need to use
+ <span class="emphasis"><em>both</em></span>
+ <tt class="filename">${X11BASE}</tt> and <tt class=
+ "filename">${LOCALBASE}</tt>. To force installation
+ of all X11 packages in <tt class=
+ "varname">LOCALBASE</tt>, the <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/xpkgwedge/README.html"
- class="pkgname">pkgtools/xpkgwedge</a> is enabled
- by default.</p>
+ class="pkgname">pkgtools/xpkgwedge</a> is
+ enabled by default.</p>
</li>
<li>
- <p><code class="varname">X11PREFIX</code> should be
+ <p><tt class="varname">X11PREFIX</tt> should be
used to refer to the installed location of an X11
- package. <code class="varname">X11PREFIX</code>
- will be set to <code class="varname">X11BASE</code>
- if xpkgwedge is not installed, and to <code class=
- "varname">LOCALBASE</code> if xpkgwedge is
+ package. <tt class="varname">X11PREFIX</tt> will be
+ set to <tt class="varname">X11BASE</tt> if
+ xpkgwedge is not installed, and to <tt class=
+ "varname">LOCALBASE</tt> if xpkgwedge is
installed.</p>
</li>
<li>
<p>If xpkgwedge is installed, it is possible to
- have some packages installed in <code class=
- "varname">X11BASE</code> and some in <code class=
- "varname">LOCALBASE</code>. To determine the prefix
- of an installed package, the <code class=
- "varname">EVAL_PREFIX</code> definition can be
- used. It takes pairs in the format
- &#8220;<span class=
+ have some packages installed in <tt class=
+ "varname">X11BASE</tt> and some in <tt class=
+ "varname">LOCALBASE</tt>. To determine the prefix
+ of an installed package, the <tt class=
+ "varname">EVAL_PREFIX</tt> definition can be used.
+ It takes pairs in the format &#8220;<span class=
"quote">DIRNAME=&lt;package&gt;</span>&#8221;, and
- the make(1) variable <code class=
- "varname">DIRNAME</code> will be set to the prefix
- of the installed package &lt;package&gt;, or
+ the make(1) variable <tt class=
+ "varname">DIRNAME</tt> will be set to the prefix of
+ the installed package &lt;package&gt;, or
&#8220;<span class=
"quote">${X11PREFIX}</span>&#8221; if the package
is not installed.</p>
<p>This is best illustrated by example.</p>
- <p>The following lines are taken from <code class=
- "filename">pkgsrc/wm/scwm/Makefile</code>:</p>
+ <p>The following lines are taken from <tt class=
+ "filename">pkgsrc/wm/scwm/Makefile</tt>:</p>
<pre class="programlisting">
-EVAL_PREFIX+= GTKDIR=gtk+
+EVAL_PREFIX+= GTKDIR=gtk+
CONFIGURE_ARGS+= --with-guile-prefix=${LOCALBASE} \
--with-gtk-prefix="${GTKDIR}" \
--enable-multibyte
</pre>
<p>Specific defaults can be defined for the
- packages evaluated using <code class=
- "varname">EVAL_PREFIX</code>, by using a definition
+ packages evaluated using <tt class=
+ "varname">EVAL_PREFIX</tt>, by using a definition
of the form:</p>
<pre class="programlisting">
GTKDIR_DEFAULT= ${LOCALBASE}
</pre>
- <p>where <code class="varname">GTKDIR</code>
+ <p>where <tt class="varname">GTKDIR</tt>
corresponds to the first definition in the
- <code class="varname">EVAL_PREFIX</code> pair.</p>
+ <tt class="varname">EVAL_PREFIX</tt> pair.</p>
</li>
<li>
- <p>Within <code class="filename">${PREFIX}</code>,
+ <p>Within <tt class="filename">${PREFIX}</tt>,
packages should install files according to hier(7),
with the exception that manual pages go into
- <code class="filename">${PREFIX}/man</code>, not
- <code class=
- "filename">${PREFIX}/share/man</code>.</p>
+ <tt class="filename">${PREFIX}/man</tt>, not
+ <tt class="filename">${PREFIX}/share/man</tt>.</p>
</li>
</ul>
</div>
@@ -6949,14 +6965,14 @@ GTKDIR_DEFAULT= ${LOCALBASE}
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2589156" id="id2589156"></a>11.2.&nbsp;Main
+ "id2569662" id="id2569662"></a>11.2.&nbsp;Main
targets</h2>
</div>
</div>
</div>
<p>The main targets used during the build process defined
- in <code class="filename">bsd.pkg.mk</code> are:</p>
+ in <tt class="filename">bsd.pkg.mk</tt> are:</p>
<div class="variablelist">
<dl>
@@ -6964,30 +6980,30 @@ GTKDIR_DEFAULT= ${LOCALBASE}
<dd>
<p>This will check if the file(s) given in the
- variables <code class="varname">DISTFILES</code>
- and <code class="varname">PATCHFILES</code> (as
- defined in the package's Makefile) are present on
- the local system in <code class=
- "filename">/usr/pkgsrc/distfiles</code>. If they
- are not present, an attempt will be made to fetch
- them using commands of the form:</p>
+ variables <tt class="varname">DISTFILES</tt> and
+ <tt class="varname">PATCHFILES</tt> (as defined in
+ the package's Makefile) are present on the local
+ system in <tt class=
+ "filename">/usr/pkgsrc/distfiles</tt>. If they are
+ not present, an attempt will be made to fetch them
+ using commands of the form:</p>
<pre class="programlisting">
${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
</pre>
<p>where ${site} varies through several
- possibilities in turn: first, <code class=
- "varname">MASTER_SITE_OVERRIDE</code> is tried,
- then the sites specified in either <code class=
- "varname">SITES_file</code> if defined, else
- <code class="varname">MASTER_SITES</code> or
- <code class="varname">PATCH_SITES</code>, as
- applies, then finally the value of <code class=
- "varname">MASTER_SITE_BACKUP</code>. The order of
- all except the first can be optionally sorted by
- the user, via setting either <code class=
- "varname">MASTER_SORT_AWK</code> or <code class=
- "varname">MASTER_SORT_REGEX</code>.</p>
+ possibilities in turn: first, <tt class=
+ "varname">MASTER_SITE_OVERRIDE</tt> is tried, then
+ the sites specified in either <tt class=
+ "varname">SITES_file</tt> if defined, else
+ <tt class="varname">MASTER_SITES</tt> or <tt class=
+ "varname">PATCH_SITES</tt>, as applies, then
+ finally the value of <tt class=
+ "varname">MASTER_SITE_BACKUP</tt>. The order of all
+ except the first can be optionally sorted by the
+ user, via setting either <tt class=
+ "varname">MASTER_SORT_AWK</tt> or <tt class=
+ "varname">MASTER_SORT_REGEX</tt>.</p>
</dd>
<dt><span class="term">checksum</span></dt>
@@ -7010,42 +7026,41 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
<p>When the distfiles are present on the local
system, they need to be extracted, as they are
usually in the form of some compressed archive
- format, most commonly <code class=
- "filename">.tar.gz</code>.</p>
+ format, most commonly <tt class=
+ "filename">.tar.gz</tt>.</p>
<p>If only some of the distfiles need to be
uncompressed, the files to be uncompressed should
- be put into <code class=
- "varname">EXTRACT_ONLY</code>.</p>
-
- <p>If the distfiles are not in <code class=
- "filename">.tar.gz</code> format, they can be
- extracted by setting either <code class=
- "varname">EXTRACT_SUFX</code>, or <code class=
- "varname">EXTRACT_CMD</code>, <code class=
- "varname">EXTRACT_BEFORE_ARGS</code> and
- <code class="varname">EXTRACT_AFTER_ARGS</code>. In
- the former case, pkgsrc knows how to extract a
- number of suffixes (<code class=
- "filename">.tar.gz</code>, <code class=
- "filename">.tgz</code>, <code class=
- "filename">.tar.gz2</code>, <code class=
- "filename">.tbz</code>, <code class=
- "filename">.tar.Z</code>, <code class=
- "filename">.tar</code>, <code class=
- "filename">.shar.gz</code>, <code class=
- "filename">.shar.bz2</code>, <code class=
- "filename">.shar.Z</code>, <code class=
- "filename">.shar</code>, <code class=
- "filename">.Z</code>, <code class=
- "filename">.bz2</code> and <code class=
- "filename">.gz</code>; see the definition of the
- various <code class="varname">DECOMPRESS_CMD</code>
- variables <code class="filename">bsd.pkg.mk</code>
- for a complete list). Here's an example on how to
- use the other variables for a program that comes
- with a compressed shell archive whose name ends in
- <code class="filename">.msg.gz</code>:</p>
+ be put into <tt class=
+ "varname">EXTRACT_ONLY</tt>.</p>
+
+ <p>If the distfiles are not in <tt class=
+ "filename">.tar.gz</tt> format, they can be
+ extracted by setting either <tt class=
+ "varname">EXTRACT_SUFX</tt>, or <tt class=
+ "varname">EXTRACT_CMD</tt>, <tt class=
+ "varname">EXTRACT_BEFORE_ARGS</tt> and <tt class=
+ "varname">EXTRACT_AFTER_ARGS</tt>. In the former
+ case, pkgsrc knows how to extract a number of
+ suffixes (<tt class="filename">.tar.gz</tt>,
+ <tt class="filename">.tgz</tt>, <tt class=
+ "filename">.tar.gz2</tt>, <tt class=
+ "filename">.tbz</tt>, <tt class=
+ "filename">.tar.Z</tt>, <tt class=
+ "filename">.tar</tt>, <tt class=
+ "filename">.shar.gz</tt>, <tt class=
+ "filename">.shar.bz2</tt>, <tt class=
+ "filename">.shar.Z</tt>, <tt class=
+ "filename">.shar</tt>, <tt class=
+ "filename">.Z</tt>, <tt class="filename">.bz2</tt>
+ and <tt class="filename">.gz</tt>; see the
+ definition of the various <tt class=
+ "varname">DECOMPRESS_CMD</tt> variables <tt class=
+ "filename">bsd.pkg.mk</tt> for a complete list).
+ Here's an example on how to use the other variables
+ for a program that comes with a compressed shell
+ archive whose name ends in <tt class=
+ "filename">.msg.gz</tt>:</p>
<pre class="programlisting">
EXTRACT_SUFX= .msg.gz
EXTRACT_CMD= zcat
@@ -7058,20 +7073,18 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
<dd>
<p>After extraction, all the patches named by the
- <code class="varname">PATCHFILES</code>, those
- present in the patches subdirectory of the package
- as well as in $LOCALPATCHES/$PKGPATH (e.g.
- <code class=
- "filename">/usr/local/patches/graphics/png</code>)
- are applied. Patchfiles ending in <code class=
- "filename">.Z</code> or <code class=
- "filename">.gz</code> are uncompressed before they
- are applied, files ending in <code class=
- "filename">.orig</code> or <code class=
- "filename">.rej</code> are ignored. Any special
- options to patch(1) can be handed in <code class=
- "varname">PATCH_DIST_ARGS</code>. See <a href=
- "#components.patches" title=
+ <tt class="varname">PATCHFILES</tt>, those present
+ in the patches subdirectory of the package as well
+ as in $LOCALPATCHES/$PKGPATH (e.g. <tt class=
+ "filename">/usr/local/patches/graphics/png</tt>)
+ are applied. Patchfiles ending in <tt class=
+ "filename">.Z</tt> or <tt class="filename">.gz</tt>
+ are uncompressed before they are applied, files
+ ending in <tt class="filename">.orig</tt> or
+ <tt class="filename">.rej</tt> are ignored. Any
+ special options to patch(1) can be handed in
+ <tt class="varname">PATCH_DIST_ARGS</tt>. See
+ <a href="#components.patches" title=
"7.3.&nbsp;patches/*">Section&nbsp;7.3,
&#8220;patches/*&#8221;</a> for more details.</p>
@@ -7097,21 +7110,20 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
<p>If the program's distfile contains its own
configure script, this can be invoked by setting
- <code class="varname">HAS_CONFIGURE</code>. If the
+ <tt class="varname">HAS_CONFIGURE</tt>. If the
configure script is a GNU autoconf script,
- <code class="varname">GNU_CONFIGURE</code> should
- be specified instead. In either case, any arguments
- to the configure script can be specified in the
- <code class="varname">CONFIGURE_ARGS</code>
- variable, and the configure script's name can be
- set in <code class=
- "varname">CONFIGURE_SCRIPT</code> if it differs
- from the default &#8220;<span class=
+ <tt class="varname">GNU_CONFIGURE</tt> should be
+ specified instead. In either case, any arguments to
+ the configure script can be specified in the
+ <tt class="varname">CONFIGURE_ARGS</tt> variable,
+ and the configure script's name can be set in
+ <tt class="varname">CONFIGURE_SCRIPT</tt> if it
+ differs from the default &#8220;<span class=
"quote">configure</span>&#8221;. Here's an example
from the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/sysutils/top/README.html"
- class="pkgname">sysutils/top</a> package:</p>
+ class="pkgname">sysutils/top</a> package:</p>
<pre class="programlisting">
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= Configure
@@ -7120,34 +7132,34 @@ CONFIGURE_ARGS+= netbsd13
<p>If the program uses an Imakefile for
configuration, the appropriate steps can be invoked
- by setting <code class="varname">USE_IMAKE</code>
- to &#8220;<span class="quote">YES</span>&#8221;.
- (If you only want the package installed in
- <code class="varname">$X11PREFIX</code> but xmkmf
- not being run, set <code class=
- "varname">USE_X11BASE</code> instead!)</p>
+ by setting <tt class="varname">USE_IMAKE</tt> to
+ &#8220;<span class="quote">YES</span>&#8221;. (If
+ you only want the package installed in <tt class=
+ "varname">$X11PREFIX</tt> but xmkmf not being run,
+ set <tt class="varname">USE_X11BASE</tt>
+ instead!)</p>
</dd>
<dt><span class="term">build</span></dt>
<dd>
<p>Once configuration has taken place, the software
- will be built by invoking <code class=
- "varname">$MAKE_PROGRAM</code> on <code class=
- "varname">$MAKEFILE</code> with <code class=
- "varname">$BUILD_TARGET</code> as the target to
- build. The default <code class=
- "varname">MAKE_PROGRAM</code> is
- &#8220;<span class="quote">gmake</span>&#8221; if
- <code class="varname">USE_GNU_TOOLS</code> contains
+ will be built by invoking <tt class=
+ "varname">$MAKE_PROGRAM</tt> on <tt class=
+ "varname">$MAKEFILE</tt> with <tt class=
+ "varname">$BUILD_TARGET</tt> as the target to
+ build. The default <tt class=
+ "varname">MAKE_PROGRAM</tt> is &#8220;<span class=
+ "quote">gmake</span>&#8221; if <tt class=
+ "varname">USE_GNU_TOOLS</tt> contains
&#8220;<span class="quote">make</span>&#8221;,
&#8220;<span class="quote">make</span>&#8221;
- otherwise. <code class="varname">MAKEFILE</code> is
- set to &#8220;<span class=
+ otherwise. <tt class="varname">MAKEFILE</tt> is set
+ to &#8220;<span class=
"quote">Makefile</span>&#8221; by default, and
- <code class="varname">BUILD_TARGET</code> defaults
- to &#8220;<span class="quote">all</span>&#8221;.
- Any of these variables can be set in the package's
+ <tt class="varname">BUILD_TARGET</tt> defaults to
+ &#8220;<span class="quote">all</span>&#8221;. Any
+ of these variables can be set in the package's
Makefile to change the default build process.</p>
</dd>
@@ -7157,16 +7169,15 @@ CONFIGURE_ARGS+= netbsd13
<p>Once the build stage has completed, the final
step is to install the software in public
directories, so users can access the programs and
- files. As in the build-target, <code class=
- "varname">$MAKE_PROGRAM</code> is invoked on
- <code class="varname">$MAKEFILE</code> here, but
- with the <code class=
- "varname">$INSTALL_TARGET</code> instead, the
- latter defaulting to &#8220;<span class=
- "quote">install</span>&#8221; (plus
- &#8220;<span class=
- "quote">install.man</span>&#8221;, if <code class=
- "varname">USE_IMAKE</code> is set).</p>
+ files. As in the build-target, <tt class=
+ "varname">$MAKE_PROGRAM</tt> is invoked on
+ <tt class="varname">$MAKEFILE</tt> here, but with
+ the <tt class="varname">$INSTALL_TARGET</tt>
+ instead, the latter defaulting to
+ &#8220;<span class="quote">install</span>&#8221;
+ (plus &#8220;<span class=
+ "quote">install.man</span>&#8221;, if <tt class=
+ "varname">USE_IMAKE</tt> is set).</p>
</dd>
</dl>
</div>
@@ -7174,9 +7185,8 @@ CONFIGURE_ARGS+= netbsd13
<p>If no target is specified, the default is
&#8220;<span class="quote">build</span>&#8221;. If a
subsequent stage is requested, all prior stages are made:
- e.g. <span><strong class="command">make
- build</strong></span> will also perform the equivalent
- of:</p>
+ e.g. <span><b class="command">make build</b></span> will
+ also perform the equivalent of:</p>
<pre class="programlisting">
make fetch
make checksum
@@ -7231,9 +7241,9 @@ make build
<dt><span class="term">reinstall</span></dt>
<dd>
- <p>If you did a <span><strong class="command">make
- install</strong></span> and you noticed some file
- was not installed properly, you can repeat the
+ <p>If you did a <span><b class="command">make
+ install</b></span> and you noticed some file was
+ not installed properly, you can repeat the
installation with this target, which will ignore
the &#8220;<span class="quote">already
installed</span>&#8221; flag.</p>
@@ -7249,8 +7259,8 @@ make build
<div class="variablelist">
<dl>
- <dt><span class="term"><code class=
- "varname">PKG_VERBOSE</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">PKG_VERBOSE</tt></span></dt>
<dd>
<p>Add a "-v" to the <a href=
@@ -7260,17 +7270,17 @@ make build
command.</p>
</dd>
- <dt><span class="term"><code class=
- "varname">DEINSTALLDEPENDS</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">DEINSTALLDEPENDS</tt></span></dt>
<dd>
<p>Remove all packages that require (depend
on) the given package. This can be used to
remove any packages that may have been pulled
in by a given package, e.g. if
- <span><strong class="command">make deinstall
- DEINSTALLDEPENDS=1</strong></span> is done in
- <code class="filename">pkgsrc/x11/kde</code>,
+ <span><b class="command">make deinstall
+ DEINSTALLDEPENDS=1</b></span> is done in
+ <tt class="filename">pkgsrc/x11/kde</tt>,
this is likely to remove whole KDE. Works by
adding &#8220;<span class=
"quote">-R</span>&#8221; to the <a href=
@@ -7292,62 +7302,59 @@ make build
current versions of the corresponding packages get
compiled and installed. This is similar to manually
noting which packages are currently installed, then
- performing a series of <span><strong class=
- "command">make deinstall</strong></span> and
- <span><strong class="command">make
- install</strong></span> (or whatever <code class=
- "varname">UPDATE_TARGET</code> is set to) for these
- packages.</p>
+ performing a series of <span><b class=
+ "command">make deinstall</b></span> and
+ <span><b class="command">make install</b></span>
+ (or whatever <tt class="varname">UPDATE_TARGET</tt>
+ is set to) for these packages.</p>
<p>You can use the &#8220;<span class=
"quote">update</span>&#8221; target to resume
- package updating in case a previous
- <span><strong class="command">make
- update</strong></span> was interrupted for some
- reason. However, in this case, make sure you don't
- call <span><strong class="command">make
- clean</strong></span> or otherwise remove the list
- of dependent packages in <code class=
- "varname">WRKDIR</code>. Otherwise you lose the
+ package updating in case a previous <span><b class=
+ "command">make update</b></span> was interrupted
+ for some reason. However, in this case, make sure
+ you don't call <span><b class="command">make
+ clean</b></span> or otherwise remove the list of
+ dependent packages in <tt class=
+ "varname">WRKDIR</tt>. Otherwise you lose the
ability to automatically update the current package
along with the dependent packages you have
installed.</p>
- <p>Resuming an interrupted <span><strong class=
- "command">make update</strong></span> will only
- work as long as the package tree remains unchanged.
- If the source code for one of the packages to be
- updated has been changed, resuming
- <span><strong class="command">make
- update</strong></span> will most certainly
- fail!</p>
+ <p>Resuming an interrupted <span><b class=
+ "command">make update</b></span> will only work as
+ long as the package tree remains unchanged. If the
+ source code for one of the packages to be updated
+ has been changed, resuming <span><b class=
+ "command">make update</b></span> will most
+ certainly fail!</p>
<p>The following variables can be used either on
- the command line or in <code class=
- "filename">/etc/mk.conf</code> to alter the
- behaviour of <span><strong class="command">make
- update</strong></span>:</p>
+ the command line or in <tt class=
+ "filename">/etc/mk.conf</tt> to alter the behaviour
+ of <span><b class="command">make
+ update</b></span>:</p>
<div class="variablelist">
<dl>
- <dt><span class="term"><code class=
- "varname">UPDATE_TARGET</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">UPDATE_TARGET</tt></span></dt>
<dd>
<p>Install target to recursively use for the
updated package and the dependent packages.
- Defaults to <code class=
- "varname">DEPENDS_TARGET</code> if set,
+ Defaults to <tt class=
+ "varname">DEPENDS_TARGET</tt> if set,
&#8220;<span class=
"quote">install</span>&#8221; otherwise for
- <span><strong class="command">make
- update</strong></span>. e.g.
- <span><strong class="command">make update
- UPDATE_TARGET=package</strong></span></p>
+ <span><b class="command">make
+ update</b></span>. e.g. <span><b class=
+ "command">make update
+ UPDATE_TARGET=package</b></span></p>
</dd>
- <dt><span class="term"><code class=
- "varname">NOCLEAN</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">NOCLEAN</tt></span></dt>
<dd>
<p>Don't clean up after updating. Useful if
@@ -7359,28 +7366,27 @@ make build
"quote">clean-update</span>&#8221; target
below) or you may run into troubles with old
source code still lying around on your next
- <span><strong class=
- "command">make</strong></span> or
- <span><strong class="command">make
- update</strong></span>.</p>
+ <span><b class="command">make</b></span> or
+ <span><b class="command">make
+ update</b></span>.</p>
</dd>
- <dt><span class="term"><code class=
- "varname">REINSTALL</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">REINSTALL</tt></span></dt>
<dd>
<p>Deinstall each package before installing
- (making <code class=
- "varname">DEPENDS_TARGET</code>). This may be
+ (making <tt class=
+ "varname">DEPENDS_TARGET</tt>). This may be
necessary if the &#8220;<span class=
"quote">clean-update</span>&#8221; target
(see below) was called after interrupting a
- running <span><strong class="command">make
- update</strong></span>.</p>
+ running <span><b class="command">make
+ update</b></span>.</p>
</dd>
- <dt><span class="term"><code class=
- "varname">DEPENDS_TARGET</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">DEPENDS_TARGET</tt></span></dt>
<dd>
<p>Allows you to disable recursion and
@@ -7388,14 +7394,14 @@ make build
is &#8220;<span class=
"quote">update</span>&#8221; for the update
target, facilitating a recursive update of
- prerequisite packages. Only set <code class=
- "varname">DEPENDS_TARGET</code> if you want
- to disable recursive updates. Use
- <code class="varname">UPDATE_TARGET</code>
- instead to just set a specific target for
- each package to be installed during
- <span><strong class="command">make
- update</strong></span> (see above).</p>
+ prerequisite packages. Only set <tt class=
+ "varname">DEPENDS_TARGET</tt> if you want to
+ disable recursive updates. Use <tt class=
+ "varname">UPDATE_TARGET</tt> instead to just
+ set a specific target for each package to be
+ installed during <span><b class=
+ "command">make update</b></span> (see
+ above).</p>
</dd>
</dl>
</div>
@@ -7405,65 +7411,62 @@ make build
<dd>
<p>Clean the source tree for all packages that
- would get updated if <span><strong class=
- "command">make update</strong></span> was called
- from the current directory. This target should not
- be used if the current package (or any of its
- depending packages) have already been de-installed
- (e.g., after calling <span><strong class=
- "command">make update</strong></span>) or you may
- lose some packages you intended to update. As a
- rule of thumb: only use this target <span class=
- "emphasis"><em>before</em></span> the first time
- you run <span><strong class="command">make
- update</strong></span> and only if you have a dirty
- package tree (e.g., if you used <code class=
- "varname">NOCLEAN</code>).</p>
+ would get updated if <span><b class="command">make
+ update</b></span> was called from the current
+ directory. This target should not be used if the
+ current package (or any of its depending packages)
+ have already been de-installed (e.g., after calling
+ <span><b class="command">make update</b></span>) or
+ you may lose some packages you intended to update.
+ As a rule of thumb: only use this target
+ <span class="emphasis"><em>before</em></span> the
+ first time you run <span><b class="command">make
+ update</b></span> and only if you have a dirty
+ package tree (e.g., if you used <tt class=
+ "varname">NOCLEAN</tt>).</p>
<p>If you unsure about whether your tree is clean
- you can either perform a <span><strong class=
- "command">make clean</strong></span> at the top of
- the tree, or use the following sequence of commands
+ you can either perform a <span><b class=
+ "command">make clean</b></span> at the top of the
+ tree, or use the following sequence of commands
from the directory of the package you want to
update (<span class=
"emphasis"><em>before</em></span> running
- <span><strong class="command">make
- update</strong></span> for the first time,
- otherwise you lose all the packages you wanted to
- update!):</p>
+ <span><b class="command">make update</b></span> for
+ the first time, otherwise you lose all the packages
+ you wanted to update!):</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make clean-update</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make clean CLEANDEPENDS=YES</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make update</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make clean-update</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make clean CLEANDEPENDS=YES</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make update</tt></b>
</pre>
<p>The following variables can be used either on
- the command line or in <code class=
- "filename">/etc/mk.conf</code> to alter the
- behaviour of <span><strong class="command">make
- clean-update</strong></span>:</p>
+ the command line or in <tt class=
+ "filename">/etc/mk.conf</tt> to alter the behaviour
+ of <span><b class="command">make
+ clean-update</b></span>:</p>
<div class="variablelist">
<dl>
- <dt><span class="term"><code class=
- "varname">CLEAR_DIRLIST</code></span></dt>
+ <dt><span class="term"><tt class=
+ "varname">CLEAR_DIRLIST</tt></span></dt>
<dd>
- <p>After <span><strong class="command">make
- clean</strong></span>, do not reconstruct the
- list of directories to update for this
- package. Only use this if
- <span><strong class="command">make
- update</strong></span> successfully installed
- all packages you wanted to update. Normally,
- this is done automatically on
- <span><strong class="command">make
- update</strong></span>, but may have been
- suppressed by the <code class=
- "varname">NOCLEAN</code> variable (see
+ <p>After <span><b class="command">make
+ clean</b></span>, do not reconstruct the list
+ of directories to update for this package.
+ Only use this if <span><b class=
+ "command">make update</b></span> successfully
+ installed all packages you wanted to update.
+ Normally, this is done automatically on
+ <span><b class="command">make
+ update</b></span>, but may have been
+ suppressed by the <tt class=
+ "varname">NOCLEAN</tt> variable (see
above).</p>
</dd>
</dl>
@@ -7484,48 +7487,47 @@ make build
<dt><span class="term">readme</span></dt>
<dd>
- <p>This target generates a <code class=
- "filename">README.html</code> file, which can be
+ <p>This target generates a <tt class=
+ "filename">README.html</tt> file, which can be
viewed using a browser such as <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/mozilla/README.html"
- class="pkgname">www/mozilla</a> or <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/links/README.html"
- class="pkgname">www/links</a>. The generated files
- contain references to any packages which are in the
- <code class="varname">PACKAGES</code> directory on
- the local host. The generated files can be made to
- refer to URLs based on <code class=
- "varname">FTP_PKG_URL_HOST</code> and <code class=
- "varname">FTP_PKG_URL_DIR</code>. For example, if I
- wanted to generate <code class=
- "filename">README.html</code> files which pointed
- to binary packages on the local machine, in the
- directory <code class=
- "filename">/usr/packages</code>, set <code class=
- "varname">FTP_PKG_URL_HOST=file://localhost</code>
- and <code class=
- "varname">FTP_PKG_URL_DIR=/usr/packages</code>. The
- <code class="varname">${PACKAGES}</code> directory
- and its subdirectories will be searched for all the
- binary packages.</p>
+ class="pkgname">www/mozilla</a> or <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/links/README.html"
+ class="pkgname">www/links</a>. The generated
+ files contain references to any packages which
+ are in the <tt class="varname">PACKAGES</tt>
+ directory on the local host. The generated files
+ can be made to refer to URLs based on <tt class=
+ "varname">FTP_PKG_URL_HOST</tt> and <tt class=
+ "varname">FTP_PKG_URL_DIR</tt>. For example, if
+ I wanted to generate <tt class=
+ "filename">README.html</tt> files which pointed
+ to binary packages on the local machine, in the
+ directory <tt class=
+ "filename">/usr/packages</tt>, set <tt class=
+ "varname">FTP_PKG_URL_HOST=file://localhost</tt>
+ and <tt class=
+ "varname">FTP_PKG_URL_DIR=/usr/packages</tt>.
+ The <tt class="varname">${PACKAGES}</tt>
+ directory and its subdirectories will be
+ searched for all the binary packages.</p>
</dd>
<dt><span class="term">readme-all</span></dt>
<dd>
- <p>Use this target to create a file <code class=
- "filename">README-all.html</code> which contains a
+ <p>Use this target to create a file <tt class=
+ "filename">README-all.html</tt> which contains a
list of all packages currently available in the
NetBSD Packages Collection, together with the
category they belong to and a short description.
- This file is compiled from the <code class=
- "filename">pkgsrc/*/README.html</code> files, so be
+ This file is compiled from the <tt class=
+ "filename">pkgsrc/*/README.html</tt> files, so be
sure to run this <span class=
- "emphasis"><em>after</em></span> a
- <span><strong class="command">make
- readme</strong></span>.</p>
+ "emphasis"><em>after</em></span> a <span><b class=
+ "command">make readme</b></span>.</p>
</dd>
<dt><span class="term">cdrom-readme</span></dt>
@@ -7535,21 +7537,21 @@ make build
&#8220;<span class="quote">readme</span>&#8221;
target (see above), but is to be used when
generating a pkgsrc tree to be written to a CD-ROM.
- This target also produces <code class=
- "filename">README.html</code> files, and can be
- made to refer to URLs based on <code class=
- "varname">CDROM_PKG_URL_HOST</code> and
- <code class="varname">CDROM_PKG_URL_DIR</code>.</p>
+ This target also produces <tt class=
+ "filename">README.html</tt> files, and can be made
+ to refer to URLs based on <tt class=
+ "varname">CDROM_PKG_URL_HOST</tt> and <tt class=
+ "varname">CDROM_PKG_URL_DIR</tt>.</p>
</dd>
<dt><span class="term">show-distfiles</span></dt>
<dd>
<p>This target shows which distfiles and patchfiles
- are needed to build the package. (<code class=
- "varname">DISTFILES</code> and <code class=
- "varname">PATCHFILES</code>, but not <code class=
- "filename">patches/*</code>)</p>
+ are needed to build the package. (<tt class=
+ "varname">DISTFILES</tt> and <tt class=
+ "varname">PATCHFILES</tt>, but not <tt class=
+ "filename">patches/*</tt>)</p>
</dd>
<dt><span class="term">show-downlevel</span></dt>
@@ -7585,8 +7587,8 @@ make build
<dd>
<p>This target shows which installed packages match
- the current package's <code class=
- "varname">DEPENDS</code>. Useful if out of date
+ the current package's <tt class=
+ "varname">DEPENDS</tt>. Useful if out of date
dependencies are causing build problems.</p>
</dd>
@@ -7596,9 +7598,9 @@ make build
<p>After a package is installed, check all its
binaries and (on ELF platforms) shared libraries to
see if they find the shared libs they need. Run by
- default if <code class=
- "varname">PKG_DEVELOPER</code> is set in
- <code class="filename">/etc/mk.conf</code>.</p>
+ default if <tt class="varname">PKG_DEVELOPER</tt>
+ is set in <tt class=
+ "filename">/etc/mk.conf</tt>.</p>
</dd>
<dt><span class="term">print-PLIST</span></dt>
@@ -7607,31 +7609,30 @@ make build
<p>After a &#8220;<span class="quote">make
install</span>&#8221; from a new or upgraded pkg,
this prints out an attempt to generate a new
- <code class="filename">PLIST</code> from a
- <span><strong class="command">find -newer
- work/.extract_done</strong></span>. An attempt is
- made to care for shared libs etc., but it is
+ <tt class="filename">PLIST</tt> from a
+ <span><b class="command">find -newer
+ work/.extract_done</b></span>. An attempt is made
+ to care for shared libs etc., but it is
<span class="emphasis"><em>strongly</em></span>
recommended to review the result before putting it
- into <code class="filename">PLIST</code>. On
- upgrades, it's useful to diff the output of this
- command against an already existing <code class=
- "filename">PLIST</code> file.</p>
+ into <tt class="filename">PLIST</tt>. On upgrades,
+ it's useful to diff the output of this command
+ against an already existing <tt class=
+ "filename">PLIST</tt> file.</p>
<p>If the package installs files via tar(1) or
other methods that don't update file access times,
be sure to add these files manually to your
- <code class="filename">PLIST</code>, as the
+ <tt class="filename">PLIST</tt>, as the
&#8220;<span class="quote">find
-newer</span>&#8221; command used by this target
won't catch them!</p>
<p>See <a href="#print-PLIST" title=
"8.3.&nbsp;Tweaking output of make print-PLIST">Section&nbsp;8.3,
- &#8220;Tweaking output of <span><strong class=
- "command">make
- print-PLIST</strong></span>&#8221;</a> for more
- information on this target.</p>
+ &#8220;Tweaking output of make
+ print-PLIST&#8221;</a> for more information on this
+ target.</p>
</dd>
<dt><span class="term">bulk-package</span></dt>
@@ -7640,8 +7641,8 @@ make build
<p>Used to do bulk builds. If an appropriate binary
package already exists, no action is taken. If not,
this target will compile, install and package it
- (and it's depends, if <code class=
- "varname">PKG_DEPENDS</code> is set properly. See
+ (and it's depends, if <tt class=
+ "varname">PKG_DEPENDS</tt> is set properly. See
<a href="#binary.configuration" title=
"5.3.1.&nbsp;Configuration">Section&nbsp;5.3.1,
&#8220;Configuration&#8221;</a>. After creating the
@@ -7663,9 +7664,9 @@ make build
"http://netbsd.gw.com/cgi-bin/man-cgi?pkg_add+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">pkg_add</span>(1)</span></a>. If
- not, <span><strong class="command">make
- bulk-package</strong></span> will be executed, but
- the installed binary not be removed.</p>
+ not, <span><b class="command">make
+ bulk-package</b></span> will be executed, but the
+ installed binary not be removed.</p>
<p>A binary package is considered
&#8220;<span class="quote">upto-date</span>&#8221;
@@ -7678,9 +7679,9 @@ make build
<div class="itemizedlist">
<ul type="disc">
<li>
- <p>None of the package's files (<code class=
- "filename">Makefile</code>, ...) were
- modified since it was built.</p>
+ <p>None of the package's files (<tt class=
+ "filename">Makefile</tt>, ...) were modified
+ since it was built.</p>
</li>
<li>
@@ -7715,17 +7716,17 @@ make build
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2590556">12.1.
+ <dt><span class="sect1"><a href="#id2571063">12.1.
General operation</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2590560">12.1.1. How to pull in variables from
+ "#id2571066">12.1.1. How to pull in variables from
/etc/mk.conf</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2590643">12.1.2. Restricted
+ "#id2571149">12.1.2. Restricted
packages</a></span></dt>
<dt><span class="sect2"><a href=
@@ -7733,15 +7734,15 @@ make build
dependencies</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591226">12.1.4. Handling conflicts with other
+ "#id2571733">12.1.4. Handling conflicts with other
packages</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591276">12.1.5. Packages that cannot or should
+ "#id2571851">12.1.5. Packages that cannot or should
not be built</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591302">12.1.6. Packages which should not be
+ "#id2571877">12.1.6. Packages which should not be
deleted, once installed</a></span></dt>
<dt><span class="sect2"><a href=
@@ -7749,37 +7750,37 @@ make build
security problems</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591462">12.1.8. How to handle compiler
+ "#id2571969">12.1.8. How to handle compiler
bugs</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591484">12.1.9. How to handle incrementing
+ "#id2571991">12.1.9. How to handle incrementing
versions when fixing an existing
package</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591533">12.1.10. Portability of
+ "#id2572108">12.1.10. Portability of
packages</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2591626">12.2.
+ <dt><span class="sect1"><a href="#id2572133">12.2.
Possible downloading issues</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2591629">12.2.1. Packages whose distfiles
+ "#id2572136">12.2.1. Packages whose distfiles
aren't available for plain
downloading</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2591692">12.2.2. How to handle modified
+ "#id2572267">12.2.2. How to handle modified
distfiles with the 'old' name</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2591704">12.3.
+ <dt><span class="sect1"><a href="#id2572279">12.3.
Configuration gotchas</a></span></dt>
<dd>
@@ -7789,64 +7790,64 @@ make build
libtool</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592180">12.3.2. Using libtool on GNU packages
+ "#id2572618">12.3.2. Using libtool on GNU packages
that already support libtool</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592264">12.3.3. GNU
+ "#id2572702">12.3.3. GNU
Autoconf/Automake</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2592309">12.4.
+ <dt><span class="sect1"><a href="#id2572747">12.4.
Building considerations</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2592312">12.4.1. CPP defines</a></span></dt>
+ "#id2572750">12.4.1. CPP defines</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2592342">12.5.
+ <dt><span class="sect1"><a href="#id2572780">12.5.
Package specific actions</a></span></dt>
<dd>
<dl>
<dt><span class="sect2"><a href=
- "#id2592345">12.5.1. Package configuration
+ "#id2572784">12.5.1. Package configuration
files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592516">12.5.2. User
+ "#id2573022">12.5.2. User
interaction</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592561">12.5.3. Handling
+ "#id2573136">12.5.3. Handling
licenses</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592644">12.5.4. Creating an account from a
+ "#id2573287">12.5.4. Creating an account from a
package</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592774">12.5.5. Installing score
+ "#id2573349">12.5.5. Installing score
files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2592818">12.5.6. Packages providing login
+ "#id2573393">12.5.6. Packages providing login
shells</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593012">12.5.7. Packages containing perl
+ "#id2573518">12.5.7. Packages containing perl
scripts</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593030">12.5.8. Packages with hardcoded paths
+ "#id2573537">12.5.8. Packages with hardcoded paths
to other interpreters</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593051">12.5.9. Packages installing perl
+ "#id2573558">12.5.9. Packages installing perl
modules</a></span></dt>
<dt><span class="sect2"><a href=
@@ -7854,36 +7855,36 @@ make build
files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593408">12.5.11. Packages installing GConf2
+ "#id2573778">12.5.11. Packages installing GConf2
data files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593508">12.5.12. Packages installing
+ "#id2573946">12.5.12. Packages installing
scrollkeeper data files</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593559">12.5.13. Packages installing X11
+ "#id2573997">12.5.13. Packages installing X11
fonts</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593606">12.5.14. Packages installing GTK2
+ "#id2574044">12.5.14. Packages installing GTK2
modules</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593675">12.5.15. Packages installing SGML or
+ "#id2574114">12.5.15. Packages installing SGML or
XML data</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593728">12.5.16. Packages installing
+ "#id2574234">12.5.16. Packages installing
extensions to the MIME database</a></span></dt>
<dt><span class="sect2"><a href=
- "#id2593798">12.5.17. Packages using
+ "#id2574305">12.5.17. Packages using
intltool</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2593812">12.6.
+ <dt><span class="sect1"><a href="#id2574318">12.6.
Feedback to the author</a></span></dt>
</dl>
</div>
@@ -7893,7 +7894,7 @@ make build
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2590556" id="id2590556"></a>12.1.&nbsp;General
+ "id2571063" id="id2571063"></a>12.1.&nbsp;General
operation</h2>
</div>
</div>
@@ -7903,36 +7904,34 @@ make build
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2590560" id=
- "id2590560"></a>12.1.1.&nbsp;How to pull in
+ <h3 class="title"><a name="id2571066" id=
+ "id2571066"></a>12.1.1.&nbsp;How to pull in
variables from /etc/mk.conf</h3>
</div>
</div>
</div>
<p>The problem with package-defined variables that can
- be overridden via <code class="varname">MAKECONF</code>
- or <code class="filename">/etc/mk.conf</code> is that
- <a href=
+ be overridden via <tt class="varname">MAKECONF</tt> or
+ <tt class="filename">/etc/mk.conf</tt> is that <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current">
<span class="citerefentry"><span class=
"refentrytitle">make</span>(1)</span></a> expands a
variable as it is used, but evaluates preprocessor like
statements (.if, .ifdef and .ifndef) as they are read.
- So, to use any variable (which may be set in
- <code class="filename">/etc/mk.conf</code>) in one of
- the .if* statements, the file <code class=
- "filename">/etc/mk.conf</code> must be included before
+ So, to use any variable (which may be set in <tt class=
+ "filename">/etc/mk.conf</tt>) in one of the .if*
+ statements, the file <tt class=
+ "filename">/etc/mk.conf</tt> must be included before
that .if* statement.</p>
<p>Rather than have a number of ad-hoc ways of
- including <code class="filename">/etc/mk.conf</code>,
- should it exist, or <code class=
- "varname">MAKECONF</code>, should it exist, include the
- <code class="filename">pkgsrc/mk/bsd.prefs.mk</code>
- file in the package Makefile before any
- preprocessor-like .if, .ifdef, or .ifndef
- statements:</p>
+ including <tt class="filename">/etc/mk.conf</tt>,
+ should it exist, or <tt class="varname">MAKECONF</tt>,
+ should it exist, include the <tt class=
+ "filename">pkgsrc/mk/bsd.prefs.mk</tt> file in the
+ package Makefile before any preprocessor-like .if,
+ .ifdef, or .ifndef statements:</p>
<pre class="programlisting">
.include "../../mk/bsd.prefs.mk"
@@ -7941,31 +7940,31 @@ make build
.endif
</pre>
- <p>If you wish to set the <code class=
- "varname">CFLAGS</code> variable in <code class=
- "filename">/etc/mk.conf</code> please make sure to
+ <p>If you wish to set the <tt class=
+ "varname">CFLAGS</tt> variable in <tt class=
+ "filename">/etc/mk.conf</tt> please make sure to
use:</p>
<pre class="programlisting">
CFLAGS+= -your -flags
</pre>
- <p>Using <code class="varname">CFLAGS=</code> (i.e.
- without the &#8220;<span class="quote">+</span>&#8221;)
- may lead to problems with packages that need to add
- their own flags. Also, you may want to take a look at
- the <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ <p>Using <tt class="varname">CFLAGS=</tt> (i.e. without
+ the &#8220;<span class="quote">+</span>&#8221;) may
+ lead to problems with packages that need to add their
+ own flags. Also, you may want to take a look at the
+ <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/cpuflags/README.html"
- class="pkgname">devel/cpuflags</a> package if you're
- interested in optimization for the current CPU.</p>
+ class="pkgname">devel/cpuflags</a> package if you're
+ interested in optimization for the current CPU.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2590643" id=
- "id2590643"></a>12.1.2.&nbsp;Restricted
+ <h3 class="title"><a name="id2571149" id=
+ "id2571149"></a>12.1.2.&nbsp;Restricted
packages</h3>
</div>
</div>
@@ -7979,7 +7978,7 @@ CFLAGS+= -your -flags
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="varname">RESTRICTED</code></p>
+ <p><tt class="varname">RESTRICTED</tt></p>
<p>This variable should be set whenever a
restriction exists (regardless of its kind). Set
@@ -7988,52 +7987,50 @@ CFLAGS+= -your -flags
</li>
<li>
- <p><code class=
- "varname">NO_BIN_ON_CDROM</code></p>
+ <p><tt class="varname">NO_BIN_ON_CDROM</tt></p>
<p>Binaries may not be placed on CD-ROM. Set this
- variable to <code class=
- "varname">${RESTRICTED}</code> whenever a binary
+ variable to <tt class=
+ "varname">${RESTRICTED}</tt> whenever a binary
package may not be included on a CD-ROM.</p>
</li>
<li>
- <p><code class="varname">NO_BIN_ON_FTP</code></p>
+ <p><tt class="varname">NO_BIN_ON_FTP</tt></p>
<p>Binaries may not be placed on an FTP server.
- Set this variable to <code class=
- "varname">${RESTRICTED}</code> whenever a binary
+ Set this variable to <tt class=
+ "varname">${RESTRICTED}</tt> whenever a binary
package may not not be made available on the
Internet.</p>
</li>
<li>
- <p><code class=
- "varname">NO_SRC_ON_CDROM</code></p>
+ <p><tt class="varname">NO_SRC_ON_CDROM</tt></p>
<p>Distfiles may not be placed on CD-ROM. Set
- this variable to <code class=
- "varname">${RESTRICTED}</code> if re-distribution
+ this variable to <tt class=
+ "varname">${RESTRICTED}</tt> if re-distribution
of the source code or other distfile(s) is not
allowed on CD-ROMs.</p>
</li>
<li>
- <p><code class="varname">NO_SRC_ON_FTP</code></p>
+ <p><tt class="varname">NO_SRC_ON_FTP</tt></p>
<p>Distfiles may not be placed on FTP. Set this
- variable to <code class=
- "varname">${RESTRICTED}</code> if re-distribution
+ variable to <tt class=
+ "varname">${RESTRICTED}</tt> if re-distribution
of the source code or other distfile(s) via the
Internet is not allowed.</p>
</li>
</ul>
</div>
- <p>Please note that the use of <code class=
- "varname">NO_PACKAGE</code>, <code class=
- "varname">IGNORE</code>, <code class=
- "varname">NO_CDROM</code>, or other generic make
+ <p>Please note that the use of <tt class=
+ "varname">NO_PACKAGE</tt>, <tt class=
+ "varname">IGNORE</tt>, <tt class=
+ "varname">NO_CDROM</tt>, or other generic make
variables to denote restrictions is deprecated, because
they unconditionally prevent users from generating
binary packages!</p>
@@ -8052,11 +8049,11 @@ CFLAGS+= -your -flags
<p>Your package may depend on some other package being
present - and there are various ways of expressing this
- dependency. pkgsrc supports the <code class=
- "varname">BUILD_DEPENDS</code> and <code class=
- "varname">DEPENDS</code> definitions, as well as
- dependencies via <code class=
- "filename">buildlink3.mk</code>, which is the preferred
+ dependency. pkgsrc supports the <tt class=
+ "varname">BUILD_DEPENDS</tt> and <tt class=
+ "varname">DEPENDS</tt> definitions, as well as
+ dependencies via <tt class=
+ "filename">buildlink3.mk</tt>, which is the preferred
way to handle dependencies, and which uses the
variables named above. See <a href="#buildlink" title=
"Chapter&nbsp;9.&nbsp;Buildlink methodology">Chapter&nbsp;9,
@@ -8064,21 +8061,21 @@ CFLAGS+= -your -flags
information.</p>
<p>The basic difference between the two variables is as
- follows: The <code class="varname">DEPENDS</code>
+ follows: The <tt class="varname">DEPENDS</tt>
definition registers that pre-requisite in the binary
package so it will be pulled in when the binary package
- is later installed, whilst the <code class=
- "varname">BUILD_DEPENDS</code> definition does not,
+ is later installed, whilst the <tt class=
+ "varname">BUILD_DEPENDS</tt> definition does not,
marking a dependency that is only needed for building
the package.</p>
<p>This means that if you only need a package present
whilst you are building, it should be noted as a
- <code class="varname">BUILD_DEPENDS</code>.</p>
+ <tt class="varname">BUILD_DEPENDS</tt>.</p>
- <p>The format for a <code class=
- "varname">BUILD_DEPENDS</code> and a <code class=
- "varname">DEPENDS</code> definition is:</p>
+ <p>The format for a <tt class=
+ "varname">BUILD_DEPENDS</tt> and a <tt class=
+ "varname">DEPENDS</tt> definition is:</p>
<pre class="programlisting">
&lt;pre-req-package-name&gt;:../../&lt;category&gt;/&lt;pre-req-package&gt;
</pre>
@@ -8096,9 +8093,9 @@ CFLAGS+= -your -flags
<li>
<p>If your package needs another package's
binaries or libraries to build or run, and if
- that package has a <code class=
- "filename">buildlink3.mk</code> file available,
- use it:</p>
+ that package has a <tt class=
+ "filename">buildlink3.mk</tt> file available, use
+ it:</p>
<pre class="programlisting">
.include "../../graphics/jpeg/buildlink3.mk"
@@ -8107,10 +8104,10 @@ CFLAGS+= -your -flags
<li>
<p>If your package needs to use another package
- to build itself and there is no <code class=
- "filename">buildlink3.mk</code> file available,
- use the <code class=
- "varname">BUILD_DEPENDS</code> definition:</p>
+ to build itself and there is no <tt class=
+ "filename">buildlink3.mk</tt> file available, use
+ the <tt class="varname">BUILD_DEPENDS</tt>
+ definition:</p>
<pre class="programlisting">
BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf
</pre>
@@ -8118,15 +8115,16 @@ BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf
<li>
<p>If your package needs a library with which to
- link and again there is no <code class=
- "filename">buildlink3.mk</code> file available,
- this is specified using the <code class=
- "varname">DEPENDS</code> definition. An example
- of this is the <a xmlns=
+ link and again there is no <tt class=
+ "filename">buildlink3.mk</tt> file available,
+ this is specified using the <tt class=
+ "varname">DEPENDS</tt> definition. An example of
+ this is the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/print/lyx/README.html"
- class="pkgname">print/lyx</a> package, which uses
- the xpm library, version 3.4j to build:</p>
+ class="pkgname">print/lyx</a> package, which
+ uses the xpm library, version 3.4j to
+ build:</p>
<pre class="programlisting">
DEPENDS+= xpm-3.4j:../../graphics/xpm
</pre>
@@ -8151,7 +8149,7 @@ DEPENDS+= xpm-[0-9]*:../../graphics/xpm
ambiguous matches such as &#8220;<span class=
"quote">tk-postgresql</span>&#8221; matching a
&#8220;<span class="quote">tk-*</span>&#8221;
- <code class="varname">DEPENDS</code>.</p>
+ <tt class="varname">DEPENDS</tt>.</p>
<p>Wildcards can also be used to specify that a
package will only build against a certain minimum
@@ -8173,20 +8171,19 @@ DEPENDS+= tiff&gt;=3.5.4:../../graphics/tiff
such as security updates or ABI changes that do
not prevent a package from building correctly.
Such recommendations can be expressed using
- <code class="varname">RECOMMENDED</code>:</p>
+ <tt class="varname">RECOMMENDED</tt>:</p>
<pre class="programlisting">
RECOMMENDED+= tiff&gt;=3.6.1:../../graphics/tiff
</pre>
- <p>In addition to the above <code class=
- "varname">DEPENDS</code> line, this denotes that
+ <p>In addition to the above <tt class=
+ "varname">DEPENDS</tt> line, this denotes that
while a package will build against
tiff&gt;=3.5.4, at least version 3.6.1 is
- recommended. <code class=
- "varname">RECOMMENDED</code> entries will be
- turned into dependencies unless explicitly
- ignored (in which case a warning will be
- printed). Packages that are built with
+ recommended. <tt class="varname">RECOMMENDED</tt>
+ entries will be turned into dependencies unless
+ explicitly ignored (in which case a warning will
+ be printed). Packages that are built with
recommendations ignored may not be uploaded to
ftp.NetBSD.org by developers and should not be
used across different systems that may have
@@ -8195,7 +8192,7 @@ RECOMMENDED+= tiff&gt;=3.6.1:../../graphics/tiff
<p>For security fixes, please update the package
vulnerabilities file as well as setting
- <code class="varname">RECOMMENDED</code>, see
+ <tt class="varname">RECOMMENDED</tt>, see
<a href="#security-handling" title=
"12.1.7.&nbsp;Handling packages with security problems">
Section 12.1.7, &#8220;Handling packages with
@@ -8206,14 +8203,15 @@ RECOMMENDED+= tiff&gt;=3.6.1:../../graphics/tiff
<li>
<p>If your package needs some executable to be
able to run correctly and if there's agail no
- <code class="filename">buildlink3.mk</code> file,
- this is specified using the <code class=
- "varname">DEPENDS</code> variable. The <a xmlns=
+ <tt class="filename">buildlink3.mk</tt> file,
+ this is specified using the <tt class=
+ "varname">DEPENDS</tt> variable. The <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/print/lyx/README.html"
- class="pkgname">print/lyx</a> package needs to be
- able to execute the latex binary from the teTeX
- package when it runs, and that is specified:</p>
+ class="pkgname">print/lyx</a> package needs to
+ be able to execute the latex binary from the
+ teTeX package when it runs, and that is
+ specified:</p>
<pre class="programlisting">
DEPENDS+= teTeX-[0-9]*:../../print/teTeX
</pre>
@@ -8229,9 +8227,9 @@ DEPENDS+= teTeX-[0-9]*:../../print/teTeX
"quote">do-configure</span>&#8221; target <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/print/ghostscript5/README.html"
- class="pkgname">print/ghostscript5</a> package (it
- relies on the jpeg sources being present in source form
- during the build):</p>
+ class="pkgname">print/ghostscript5</a> package (it
+ relies on the jpeg sources being present in source
+ form during the build):</p>
<pre class="programlisting">
if [ ! -e ${_PKGSRCDIR}/graphics/jpeg/${WRKDIR:T}/jpeg-6b ]; then \
cd ${_PKGSRCDIR}/../../graphics/jpeg &amp;&amp; ${MAKE} extract; \
@@ -8247,29 +8245,29 @@ pre-clean:
cd ${_PKGSRCDIR}/../../graphics/jpeg &amp;&amp; ${MAKE} clean
</pre>
- <p>Please also note the <code class=
- "varname">BUILD_USES_MSGFMT</code> and <code class=
- "varname">BUILD_USES_GETTEXT_M4</code> definitions,
- which are provided as convenience definitions. The
- former works out whether msgfmt(1) is part of the base
- system, and, if it isn't, installs the <a xmlns=
+ <p>Please also note the <tt class=
+ "varname">BUILD_USES_MSGFMT</tt> and <tt class=
+ "varname">BUILD_USES_GETTEXT_M4</tt> definitions, which
+ are provided as convenience definitions. The former
+ works out whether msgfmt(1) is part of the base system,
+ and, if it isn't, installs the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/gettext/README.html"
- class="pkgname">devel/gettext</a> package. The latter
- adds a build dependency on either an installed version
- of an older gettext package, or if it isn't, installs
- the <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
- href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/gettext-m4/README.html"
- class="pkgname">devel/gettext-m4</a> package.</p>
+ class="pkgname">devel/gettext</a> package. The
+ latter adds a build dependency on either an
+ installed version of an older gettext package, or if
+ it isn't, installs the <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/gettext-m4/README.html"
+ class="pkgname">devel/gettext-m4</a> package.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591226" id=
- "id2591226"></a>12.1.4.&nbsp;Handling conflicts
+ <h3 class="title"><a name="id2571733" id=
+ "id2571733"></a>12.1.4.&nbsp;Handling conflicts
with other packages</h3>
</div>
</div>
@@ -8280,26 +8278,26 @@ pre-clean:
your package installs the same set of files like
another package in our pkgsrc tree.</p>
- <p>In this case you can set <code class=
- "varname">CONFLICTS</code> to a space separated list of
+ <p>In this case you can set <tt class=
+ "varname">CONFLICTS</tt> to a space separated list of
packages (including version string) your package
conflicts with.</p>
<p>For example <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/Xaw3d/README.html"
- class="pkgname">x11/Xaw3d</a> and <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/Xaw-Xpm/README.html"
- class="pkgname">x11/Xaw-Xpm</a> install provide the
- same shared library, thus you set in <code class=
- "filename">pkgsrc/x11/Xaw3d/Makefile</code>:</p>
+ class="pkgname">x11/Xaw3d</a> and <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/x11/Xaw-Xpm/README.html"
+ class="pkgname">x11/Xaw-Xpm</a> install provide the
+ same shared library, thus you set in <tt class=
+ "filename">pkgsrc/x11/Xaw3d/Makefile</tt>:</p>
<pre class="programlisting">
CONFLICTS= Xaw-Xpm-[0-9]*
</pre>
- <p>and in <code class=
- "filename">pkgsrc/x11/Xaw-Xpm/Makefile</code>:</p>
+ <p>and in <tt class=
+ "filename">pkgsrc/x11/Xaw-Xpm/Makefile</tt>:</p>
<pre class="programlisting">
CONFLICTS= Xaw3d-[0-9]*
</pre>
@@ -8316,8 +8314,8 @@ CONFLICTS= Xaw3d-[0-9]*
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591276" id=
- "id2591276"></a>12.1.5.&nbsp;Packages that cannot
+ <h3 class="title"><a name="id2571851" id=
+ "id2571851"></a>12.1.5.&nbsp;Packages that cannot
or should not be built</h3>
</div>
</div>
@@ -8326,20 +8324,19 @@ CONFLICTS= Xaw3d-[0-9]*
<p>There are several reasons why a package might be
instructed to not build under certain circumstances. If
the package builds and runs on most platforms, the
- exceptions should be noted with <code class=
- "varname">NOT_FOR_PLATFORM</code>. If the package
- builds and runs on a small handful of platforms, set
- <code class="varname">ONLY_FOR_PLATFORM</code> instead.
- If the package should be skipped (for example, because
- it provides functionality already provided by the
- system), set <code class=
- "varname">PKG_SKIP_REASON</code> to a descriptive
- message. If the package should fail because some
- preconditions are not met, set <code class=
- "varname">PKG_FAIL_REASON</code> to a descriptive
+ exceptions should be noted with <tt class=
+ "varname">NOT_FOR_PLATFORM</tt>. If the package builds
+ and runs on a small handful of platforms, set
+ <tt class="varname">ONLY_FOR_PLATFORM</tt> instead. If
+ the package should be skipped (for example, because it
+ provides functionality already provided by the system),
+ set <tt class="varname">PKG_SKIP_REASON</tt> to a
+ descriptive message. If the package should fail because
+ some preconditions are not met, set <tt class=
+ "varname">PKG_FAIL_REASON</tt> to a descriptive
message.</p>
- <p><code class="varname">IGNORE</code> is deprecated
+ <p><tt class="varname">IGNORE</tt> is deprecated
because it didn't provide enough information to
determine whether the build should fail.</p>
</div>
@@ -8348,17 +8345,17 @@ CONFLICTS= Xaw3d-[0-9]*
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591302" id=
- "id2591302"></a>12.1.6.&nbsp;Packages which
+ <h3 class="title"><a name="id2571877" id=
+ "id2571877"></a>12.1.6.&nbsp;Packages which
should not be deleted, once installed</h3>
</div>
</div>
</div>
<p>To ensure that a package may not be deleted, once it
- has been installed, the <code class=
- "varname">PKG_PRESERVE</code> definition should be set
- in the package Makefile. This will be carried into any
+ has been installed, the <tt class=
+ "varname">PKG_PRESERVE</tt> definition should be set in
+ the package Makefile. This will be carried into any
binary package that is made from this pkgsrc entry. A
&#8220;<span class="quote">preserved</span>&#8221;
package will not be deleted using <a href=
@@ -8381,28 +8378,27 @@ CONFLICTS= Xaw3d-[0-9]*
</div>
<p>When a vulnerability is found, this should be noted
- in <code class=
- "filename">localsrc/security/advisories/pkg-vulnerabilities</code>,
+ in <tt class=
+ "filename">localsrc/security/advisories/pkg-vulnerabilities</tt>,
and after the commit of that file, it should be copied
- to both <code class=
- "filename">/pub/NetBSD/packages/distfiles/pkg-vulnerabilities</code>
- and <code class=
- "filename">/pub/NetBSD/packages/distfiles/vulnerabilities</code>
- on ftp.NetBSD.org using <code class=
- "filename">localsrc/security/advisories/Makefile</code>.
- In addition, if a <code class=
- "filename">buildlink3.mk</code> file exists for an
- affected package, bumping <code class=
- "varname">PKGREVISION</code> and creating a
- corresponding <code class=
- "varname">BUILDLINK_RECOMMENDED.<em class=
- "replaceable"><code>pkg</code></em></code> entry should
- be considered. See <a href="#buildlink" title=
+ to both <tt class=
+ "filename">/pub/NetBSD/packages/distfiles/pkg-vulnerabilities</tt>
+ and <tt class=
+ "filename">/pub/NetBSD/packages/distfiles/vulnerabilities</tt>
+ on ftp.NetBSD.org using <tt class=
+ "filename">localsrc/security/advisories/Makefile</tt>.
+ In addition, if a <tt class=
+ "filename">buildlink3.mk</tt> file exists for an
+ affected package, bumping <tt class=
+ "varname">PKGREVISION</tt> and creating a corresponding
+ <tt class="varname">BUILDLINK_RECOMMENDED.<i class=
+ "replaceable"><tt>pkg</tt></i></tt> entry should be
+ considered. See <a href="#buildlink" title=
"Chapter&nbsp;9.&nbsp;Buildlink methodology">Chapter&nbsp;9,
<i>Buildlink methodology</i></a> for more information
- about writing <code class=
- "filename">buildlink3.mk</code> files and <code class=
- "varname">BUILDLINK_*</code> definitions.</p>
+ about writing <tt class="filename">buildlink3.mk</tt>
+ files and <tt class="varname">BUILDLINK_*</tt>
+ definitions.</p>
<p>Also, if the fix should be applied to the stable
pkgsrc branch, be sure to submit a pullup request!</p>
@@ -8412,8 +8408,8 @@ CONFLICTS= Xaw3d-[0-9]*
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591462" id=
- "id2591462"></a>12.1.8.&nbsp;How to handle
+ <h3 class="title"><a name="id2571969" id=
+ "id2571969"></a>12.1.8.&nbsp;How to handle
compiler bugs</h3>
</div>
</div>
@@ -8426,11 +8422,11 @@ CONFLICTS= Xaw3d-[0-9]*
or never finishing compiling a file.</p>
<p>Typically a workaround involves testing the
- <code class="varname">MACHINE_ARCH</code> and compiler
+ <tt class="varname">MACHINE_ARCH</tt> and compiler
version, disabling optimisation for that
- file/<code class="varname">MACHINE_ARCH</code>/compiler
- combination, and documenting it in <code class=
- "filename">pkgsrc/doc/HACKS</code>. See that file for a
+ file/<tt class="varname">MACHINE_ARCH</tt>/compiler
+ combination, and documenting it in <tt class=
+ "filename">pkgsrc/doc/HACKS</tt>. See that file for a
number of examples!</p>
</div>
@@ -8438,8 +8434,8 @@ CONFLICTS= Xaw3d-[0-9]*
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591484" id=
- "id2591484"></a>12.1.9.&nbsp;How to handle
+ <h3 class="title"><a name="id2571991" id=
+ "id2571991"></a>12.1.9.&nbsp;How to handle
incrementing versions when fixing an existing
package</h3>
</div>
@@ -8447,29 +8443,29 @@ CONFLICTS= Xaw3d-[0-9]*
</div>
<p>When making fixes to an existing package it can be
- useful to change the version number in <code class=
- "varname">PKGNAME</code>. To avoid conflicting with
+ useful to change the version number in <tt class=
+ "varname">PKGNAME</tt>. To avoid conflicting with
future versions by the original author, a
&#8220;<span class="quote">nb1</span>&#8221;,
&#8220;<span class="quote">nb2</span>&#8221;, ...
suffix can be used on package versions by setting
- <code class="varname">PKGREVISION=1</code> (2, ...).
- The &#8220;<span class="quote">nb</span>&#8221; is
- treated like a &#8220;<span class=
- "quote">.</span>&#8221; by the pkg tools. e.g.</p>
+ <tt class="varname">PKGREVISION=1</tt> (2, ...). The
+ &#8220;<span class="quote">nb</span>&#8221; is treated
+ like a &#8220;<span class="quote">.</span>&#8221; by
+ the pkg tools. e.g.</p>
<pre class="programlisting">
DISTNAME= foo-17.42
PKGREVISION= 9
</pre>
- <p>will result in a <code class=
- "varname">PKGNAME</code> of &#8220;<span class=
+ <p>will result in a <tt class="varname">PKGNAME</tt> of
+ &#8220;<span class=
"quote">foo-17.42nb9</span>&#8221;.</p>
<p>When a new release of the package is released, the
- <code class="varname">PKGREVISION</code> should be
- removed. e.g. on a new minor release of the above
- package, things should be like:</p>
+ <tt class="varname">PKGREVISION</tt> should be removed.
+ e.g. on a new minor release of the above package,
+ things should be like:</p>
<pre class="programlisting">
DISTNAME= foo-17.43
</pre>
@@ -8479,8 +8475,8 @@ DISTNAME= foo-17.43
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591533" id=
- "id2591533"></a>12.1.10.&nbsp;Portability of
+ <h3 class="title"><a name="id2572108" id=
+ "id2572108"></a>12.1.10.&nbsp;Portability of
packages</h3>
</div>
</div>
@@ -8496,15 +8492,15 @@ DISTNAME= foo-17.43
<div class="titlepage">
<div>
<div>
- <h4 class="title"><a name="id2591607" id=
- "id2591607"></a>12.1.10.1.&nbsp;${INSTALL},
+ <h4 class="title"><a name="id2572114" id=
+ "id2572114"></a>12.1.10.1.&nbsp;${INSTALL},
${INSTALL_DATA_DIR}, ...</h4>
</div>
</div>
</div>
- <p>The BSD-compatible <span><strong class=
- "command">install</strong></span> supplied with some
+ <p>The BSD-compatible <span><b class=
+ "command">install</b></span> supplied with some
operating systems will not perform more than one
operation at a time. As such, you should call
&#8220;<span class="quote">${INSTALL}</span>&#8221;,
@@ -8522,7 +8518,7 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2591626" id="id2591626"></a>12.2.&nbsp;Possible
+ "id2572133" id="id2572133"></a>12.2.&nbsp;Possible
downloading issues</h2>
</div>
</div>
@@ -8532,8 +8528,8 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591629" id=
- "id2591629"></a>12.2.1.&nbsp;Packages whose
+ <h3 class="title"><a name="id2572136" id=
+ "id2572136"></a>12.2.1.&nbsp;Packages whose
distfiles aren't available for plain
downloading</h3>
</div>
@@ -8541,61 +8537,62 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
</div>
<p>If you need to download from a dynamic URL you can
- set <code class="varname">DYNAMIC_MASTER_SITES</code>
- and a <span><strong class="command">make
- fetch</strong></span> will call <code class=
- "filename">files/getsite.sh</code> with the name of
- each file to download as an argument, expecting it to
- output the URL of the directory from which to download
- it. <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
- href=
+ set <tt class="varname">DYNAMIC_MASTER_SITES</tt> and a
+ <span><b class="command">make fetch</b></span> will
+ call <tt class="filename">files/getsite.sh</tt> with
+ the name of each file to download as an argument,
+ expecting it to output the URL of the directory from
+ which to download it. <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/graphics/ns-cult3d/README.html"
- class="pkgname">graphics/ns-cult3d</a> is an example of
- this usage.</p>
+ class="pkgname">graphics/ns-cult3d</a> is an example
+ of this usage.</p>
<p>If the download can't be automated, because the user
must submit personal information to apply for a
password, or must pay for the source, or whatever, you
- can set <code class="varname">_FETCH_MESSAGE</code> to
- a macro which displays a message explaining the
- situation. <code class="varname">_FETCH_MESSAGE</code>
- must be executable shell commands, not just a message.
- (Generally, it executes <code class=
- "varname">${ECHO}</code>). As of this writing, the
+ can set <tt class="varname">_FETCH_MESSAGE</tt> to a
+ macro which displays a message explaining the
+ situation. <tt class="varname">_FETCH_MESSAGE</tt> must
+ be executable shell commands, not just a message.
+ (Generally, it executes <tt class=
+ "varname">${ECHO}</tt>). As of this writing, the
following packages use this: <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/audio/realplayer/README.html"
- class="pkgname">audio/realplayer</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/cad/simian/README.html"
- class="pkgname">cad/simian</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/ipv6socket/README.html"
- class="pkgname">devel/ipv6socket</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/emulators/vmware-module/README.html"
- class="pkgname">emulators/vmware-module</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/fonts/acroread-jpnfont/README.html"
- class="pkgname">fonts/acroread-jpnfont</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/sysutils/storage-manager/README.html"
- class="pkgname">sysutils/storage-manager</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/ap-aolserver/README.html"
- class="pkgname">www/ap-aolserver</a>, <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
- "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/openacs/README.html"
- class="pkgname">www/openacs</a>. Try to be consistent
- with them.</p>
+ class="pkgname">audio/realplayer</a>, <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/cad/simian/README.html"
+ class="pkgname">cad/simian</a>, <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/ipv6socket/README.html"
+ class="pkgname">devel/ipv6socket</a>, <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/emulators/vmware-module/README.html"
+ class="pkgname">emulators/vmware-module</a>,
+ <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/fonts/acroread-jpnfont/README.html"
+ class="pkgname">fonts/acroread-jpnfont</a>, <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/sysutils/storage-manager/README.html"
+ class="pkgname">sysutils/storage-manager</a>,
+ <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/ap-aolserver/README.html"
+ class="pkgname">www/ap-aolserver</a>, <a xmlns=
+ "http://www.w3.org/TR/xhtml1/transitional" href=
+ "ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/www/openacs/README.html"
+ class="pkgname">www/openacs</a>. Try to be
+ consistent with them.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2591692" id=
- "id2591692"></a>12.2.2.&nbsp;How to handle
+ <h3 class="title"><a name="id2572267" id=
+ "id2572267"></a>12.2.2.&nbsp;How to handle
modified distfiles with the 'old' name</h3>
</div>
</div>
@@ -8610,8 +8607,8 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
package's md5 checksum to match the package on the
master site (beware, any mirrors may not be up to date
yet!), and to remove the old distfile from
- ftp.NetBSD.org's <code class=
- "filename">/pub/NetBSD/packages/distfiles</code>
+ ftp.NetBSD.org's <tt class=
+ "filename">/pub/NetBSD/packages/distfiles</tt>
directory. Furthermore, a mail to the package's author
seems appropriate making sure the distfile was really
updated on purpose, and that no trojan horse or so
@@ -8624,8 +8621,8 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2591704" id=
- "id2591704"></a>12.3.&nbsp;Configuration
+ "id2572279" id=
+ "id2572279"></a>12.3.&nbsp;Configuration
gotchas</h2>
</div>
</div>
@@ -8652,11 +8649,11 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
hand to test things. The <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/libtool/README.html"
- class="pkgname">devel/libtool</a> pkg can help here, as
- it just &#8220;<span class="quote">knows</span>&#8221;
- how to build both static and dynamic libraries from a
- set of source files, thus being platform
- independent.</p>
+ class="pkgname">devel/libtool</a> pkg can help here,
+ as it just &#8220;<span class=
+ "quote">knows</span>&#8221; how to build both static
+ and dynamic libraries from a set of source files,
+ thus being platform independent.</p>
<p>Here's how to use libtool in a pkg in seven simple
steps:</p>
@@ -8664,9 +8661,8 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
<div class="orderedlist">
<ol type="1">
<li>
- <p>Add <code class=
- "varname">USE_LIBTOOL=yes</code> to the package
- Makefile.</p>
+ <p>Add <tt class="varname">USE_LIBTOOL=yes</tt>
+ to the package Makefile.</p>
</li>
<li>
@@ -8675,11 +8671,11 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2
${CC}</span>&#8221; in place of
&#8220;<span class="quote">${CC}</span>&#8221;.
You could even add it to the definition of
- <code class="varname">CC</code>, if only
- libraries are being built in a given Makefile.
- This one command will build both PIC and non-PIC
- library objects, so you need not have separate
- shared and non-shared library rules.</p>
+ <tt class="varname">CC</tt>, if only libraries
+ are being built in a given Makefile. This one
+ command will build both PIC and non-PIC library
+ objects, so you need not have separate shared and
+ non-shared library rules.</p>
</li>
<li>
@@ -8694,15 +8690,15 @@ ${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX
</pre>
<p>Note that the library is changed to have a
- <code class="filename">.la</code> extension, and
- the objects are changed to have a <code class=
- "filename">.lo</code> extension. Change
- <code class="varname">OBJS</code> as necessary.
- This automatically creates all of the
- <code class="filename">.a</code>, <code class=
- "filename">.so.major.minor</code>, and ELF
- symlinks (if necessary) in the build directory.
- Be sure to include &#8220;<span class=
+ <tt class="filename">.la</tt> extension, and the
+ objects are changed to have a <tt class=
+ "filename">.lo</tt> extension. Change <tt class=
+ "varname">OBJS</tt> as necessary. This
+ automatically creates all of the <tt class=
+ "filename">.a</tt>, <tt class=
+ "filename">.so.major.minor</tt>, and ELF symlinks
+ (if necessary) in the build directory. Be sure to
+ include &#8220;<span class=
"quote">-version-info</span>&#8221;, especially
when major and minor are zero, as libtool will
otherwise strip off the shared library
@@ -8747,30 +8743,27 @@ dynamic linker chooses the library with the greater REVISION number.
argument</span>&#8221; is the install directory
of the library being built.</p>
- <p>In the <code class="filename">PLIST</code>,
- include all of the <code class=
- "filename">.a</code>, <code class=
- "filename">.la</code>, and <code class=
- "filename">.so</code>, <code class=
- "filename">.so.<em class=
- "replaceable"><code>major</code></em></code> and
- <code class="filename">.so.<em class=
- "replaceable"><code>major</code></em>.<em class=
- "replaceable"><code>minor</code></em></code>
- files.</p>
+ <p>In the <tt class="filename">PLIST</tt>,
+ include all of the <tt class="filename">.a</tt>,
+ <tt class="filename">.la</tt>, and <tt class=
+ "filename">.so</tt>, <tt class=
+ "filename">.so.<i class=
+ "replaceable"><tt>major</tt></i></tt> and
+ <tt class="filename">.so.<i class=
+ "replaceable"><tt>major</tt></i>.<i class=
+ "replaceable"><tt>minor</tt></i></tt> files.</p>
</li>
<li>
- <p>When linking shared object (<code class=
- "filename">.so</code>) files, i.e. files that are
+ <p>When linking shared object (<tt class=
+ "filename">.so</tt>) files, i.e. files that are
loaded via dlopen(3), NOT shared libraries, use
&#8220;<span class="quote">-module
-avoid-version</span>&#8221; to prevent them
getting version tacked on.</p>
- <p>The <code class="filename">PLIST</code> file
- gets the <code class="filename">foo.so</code>
- entry.</p>
+ <p>The <tt class="filename">PLIST</tt> file gets
+ the <tt class="filename">foo.so</tt> entry.</p>
</li>
<li>
@@ -8793,16 +8786,16 @@ dynamic linker chooses the library with the greater REVISION number.
&#8220;<span class=
"quote">-L../somelib</span>&#8221;), because it
expects you to change that argument to be the
- <code class="filename">.la</code> file. e.g.</p>
+ <tt class="filename">.la</tt> file. e.g.</p>
<pre class="programlisting">
${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib
</pre>
<p>should be changed to:</p>
<pre class="programlisting">
-${LIBTOOL} --mode=link ${CC} -o <em class=
-"replaceable"><code>someprog</code></em> <em class=
-"replaceable"><code>../somelib/somelib.la</code></em>
+${LIBTOOL} --mode=link ${CC} -o <i class=
+"replaceable"><tt>someprog</tt></i> <i class=
+"replaceable"><tt>../somelib/somelib.la</tt></i>
</pre>
<p>and it will do the right thing with the
@@ -8820,14 +8813,14 @@ ${LIBTOOL} --mode=link ${CC} -o <em class=
"refentrytitle">cp</span>(1)</span></a> command
with &#8220;<span class="quote">${LIBTOOL}
--mode=install</span>&#8221;, and change the
- library name to <code class=
- "filename">.la</code>. e.g.</p>
+ library name to <tt class="filename">.la</tt>.
+ e.g.</p>
<pre class="programlisting">
${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
</pre>
- <p>This will install the static <code class=
- "filename">.a</code>, shared library, any needed
+ <p>This will install the static <tt class=
+ "filename">.a</tt>, shared library, any needed
symlinks, and run <a href=
"http://netbsd.gw.com/cgi-bin/man-cgi?ldconfig+8+NetBSD-current">
<span class="citerefentry"><span class=
@@ -8835,15 +8828,13 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
</li>
<li>
- <p>In your <code class="filename">PLIST</code>,
- include all of the <code class=
- "filename">.a</code>, <code class=
- "filename">.la</code>, and <code class=
- "filename">.so</code>, <code class=
- "filename">.so.CURRENT</code> and <code class=
- "filename">.so.CURRENT.REVISION</code> files
- (this is a change from the previous
- behaviour).</p>
+ <p>In your <tt class="filename">PLIST</tt>,
+ include all of the <tt class="filename">.a</tt>,
+ <tt class="filename">.la</tt>, and <tt class=
+ "filename">.so</tt>, <tt class=
+ "filename">.so.CURRENT</tt> and <tt class=
+ "filename">.so.CURRENT.REVISION</tt> files (this
+ is a change from the previous behaviour).</p>
</li>
</ol>
</div>
@@ -8853,40 +8844,39 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592180" id=
- "id2592180"></a>12.3.2.&nbsp;Using libtool on GNU
+ <h3 class="title"><a name="id2572618" id=
+ "id2572618"></a>12.3.2.&nbsp;Using libtool on GNU
packages that already support libtool</h3>
</div>
</div>
</div>
- <p>Add <code class="varname">USE_LIBTOOL=yes</code> to
- the package Makefile. This will override the package's
- own libtool in most cases. For older libtool using
+ <p>Add <tt class="varname">USE_LIBTOOL=yes</tt> to the
+ package Makefile. This will override the package's own
+ libtool in most cases. For older libtool using
packages, libtool is made by ltconfig script during the
do-configure step; you can check the libtool script
- location by doing <span><strong class="command">make
- configure; find work*/ -name
- libtool</strong></span>.</p>
-
- <p><code class="varname">LIBTOOL_OVERRIDE</code>
- specifies which libtool scripts, relative to
- <code class="varname">WRKSRC</code>, to override. By
- default, it is set to &#8220;<span class=
- "quote">libtool */libtool */*/libtool</span>&#8221;. If
- this does not match the location of the package's
- libtool script(s), set it as appropriate.</p>
-
- <p>If you do not need <code class="filename">*.a</code>
+ location by doing <span><b class="command">make
+ configure; find work*/ -name libtool</b></span>.</p>
+
+ <p><tt class="varname">LIBTOOL_OVERRIDE</tt> specifies
+ which libtool scripts, relative to <tt class=
+ "varname">WRKSRC</tt>, to override. By default, it is
+ set to &#8220;<span class="quote">libtool */libtool
+ */*/libtool</span>&#8221;. If this does not match the
+ location of the package's libtool script(s), set it as
+ appropriate.</p>
+
+ <p>If you do not need <tt class="filename">*.a</tt>
static libraries built and installed, then use
- <code class="varname">SHLIBTOOL_OVERRIDE</code>
+ <tt class="varname">SHLIBTOOL_OVERRIDE</tt>
instead.</p>
<p>If your package makes use of the platform
independent library for loading dynamic shared objects,
that comes with libtool (libltdl), you should include
- the libtool buildlink3.mk (and set <code class=
- "varname">USE_BUILDLINK3=YES</code>).</p>
+ the libtool buildlink3.mk (and set <tt class=
+ "varname">USE_BUILDLINK3=YES</tt>).</p>
<p>Some packages use libtool incorrectly so that the
package may not work or build in some circumstances.
@@ -8904,9 +8894,8 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
<ol type="1">
<li>
<p>The shared object is named correctly,
- i.e. <code class=
- "filename">libfoo.la</code>, not
- <code class="filename">foo.la</code></p>
+ i.e. <tt class="filename">libfoo.la</tt>,
+ not <tt class="filename">foo.la</tt></p>
</li>
<li>
@@ -8921,8 +8910,8 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
<p>The use of libltdl without the correct calls
to initialisation routines. The function
lt_dlinit() should be called and the macro
- <code class=
- "varname">LTDL_SET_PRELOADED_SYMBOLS</code>
+ <tt class=
+ "varname">LTDL_SET_PRELOADED_SYMBOLS</tt>
included in executables.</p>
</li>
</ul>
@@ -8933,8 +8922,8 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592264" id=
- "id2592264"></a>12.3.3.&nbsp;GNU
+ <h3 class="title"><a name="id2572702" id=
+ "id2572702"></a>12.3.3.&nbsp;GNU
Autoconf/Automake</h3>
</div>
</div>
@@ -8944,11 +8933,11 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
executed to regenerate the configure script and
Makefile.in makefile templates, then they should be
executed in a pre-configure target. Two Makefile
- fragments are provided in <code class=
- "filename">pkgsrc/mk/autoconf.mk</code> and
- <code class="filename">pkgsrc/mk/automake.mk</code> to
- help dealing with these tools. See comments in these
- files for details.</p>
+ fragments are provided in <tt class=
+ "filename">pkgsrc/mk/autoconf.mk</tt> and <tt class=
+ "filename">pkgsrc/mk/automake.mk</tt> to help dealing
+ with these tools. See comments in these files for
+ details.</p>
<p>For packages that need only autoconf:</p>
<pre class="programlisting">
@@ -8981,16 +8970,16 @@ pre-configure:
<p>Packages which use GNU Automake will almost
certainly require GNU Make, but that's automatically
- provided for you in <code class=
- "filename">mk/automake.mk</code>.</p>
+ provided for you in <tt class=
+ "filename">mk/automake.mk</tt>.</p>
<p>There are times when the configure process makes
additional changes to the generated files, which then
causes the build process to try to re-execute the
automake sequence. This is prevented by touching
various files in the configure stage. If this causes
- problems with your package you can set <code class=
- "varname">AUTOMAKE_OVERRIDE=NO</code> in the package
+ problems with your package you can set <tt class=
+ "varname">AUTOMAKE_OVERRIDE=NO</tt> in the package
Makefile.</p>
</div>
</div>
@@ -9000,7 +8989,7 @@ pre-configure:
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2592309" id="id2592309"></a>12.4.&nbsp;Building
+ "id2572747" id="id2572747"></a>12.4.&nbsp;Building
considerations</h2>
</div>
</div>
@@ -9010,8 +8999,8 @@ pre-configure:
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592312" id=
- "id2592312"></a>12.4.1.&nbsp;CPP defines</h3>
+ <h3 class="title"><a name="id2572750" id=
+ "id2572750"></a>12.4.1.&nbsp;CPP defines</h3>
</div>
</div>
</div>
@@ -9023,8 +9012,8 @@ pre-configure:
<p>To test whether you are working on a 4.4 BSD-derived
system, you should use the BSD definition, which is
- defined in <code class=
- "filename">&lt;sys/param.h&gt;</code> on said
+ defined in <tt class=
+ "filename">&lt;sys/param.h&gt;</tt> on said
systems.</p>
<pre class="programlisting">
#include &lt;sys/param.h&gt;
@@ -9050,7 +9039,7 @@ pre-configure:
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2592342" id="id2592342"></a>12.5.&nbsp;Package
+ "id2572780" id="id2572780"></a>12.5.&nbsp;Package
specific actions</h2>
</div>
</div>
@@ -9060,81 +9049,78 @@ pre-configure:
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592345" id=
- "id2592345"></a>12.5.1.&nbsp;Package
+ <h3 class="title"><a name="id2572784" id=
+ "id2572784"></a>12.5.1.&nbsp;Package
configuration files</h3>
</div>
</div>
</div>
<p>Packages should be taught to look for their
- configuration files in <code class=
- "varname">${PKG_SYSCONFDIR}</code>, which is passed
+ configuration files in <tt class=
+ "varname">${PKG_SYSCONFDIR}</tt>, which is passed
through to the configure and build processes.
- <code class="varname">PKG_SYSCONFDIR</code> may be
+ <tt class="varname">PKG_SYSCONFDIR</tt> may be
customized in various ways by setting other make
variables:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class="varname">PKG_SYSCONFBASE</code>
- is the main config directory under which all
- package configuration files are to be found. This
- defaults to <code class=
- "filename">${PREFIX}/etc</code>, but may be
- overridden in <code class=
- "filename">/etc/mk.conf</code>.</p>
+ <p><tt class="varname">PKG_SYSCONFBASE</tt> is
+ the main config directory under which all package
+ configuration files are to be found. This
+ defaults to <tt class=
+ "filename">${PREFIX}/etc</tt>, but may be
+ overridden in <tt class=
+ "filename">/etc/mk.conf</tt>.</p>
</li>
<li>
- <p><code class="varname">PKG_SYSCONFSUBDIR</code>
- is the subdirectory of <code class=
- "varname">PKG_SYSCONFBASE</code> under which the
+ <p><tt class="varname">PKG_SYSCONFSUBDIR</tt> is
+ the subdirectory of <tt class=
+ "varname">PKG_SYSCONFBASE</tt> under which the
configuration files for a particular package may
be found, e.g. the Apache configuration files may
- all be found under the <code class=
- "filename">httpd/</code> subdirectory of
- <code class="varname">${PKG_SYSCONFBASE}</code>.
- This should be set in the package Makefile.</p>
+ all be found under the <tt class=
+ "filename">httpd/</tt> subdirectory of <tt class=
+ "varname">${PKG_SYSCONFBASE}</tt>. This should be
+ set in the package Makefile.</p>
</li>
<li>
- <p>By default, <code class=
- "varname">PKG_SYSCONFDIR</code> is set to
- <code class=
- "varname">${PKG_SYSCONFBASE}/${PKG_SYSCONFSUBDIR}</code>,
- but this may be overridden by setting
- <code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code>
- for a particular package, where <code class=
- "varname">PKG_SYSCONFVAR</code> defaults to
- <code class="varname">${PKGBASE}</code>. This is
- not meant to be set by a package Makefile, but is
+ <p>By default, <tt class=
+ "varname">PKG_SYSCONFDIR</tt> is set to
+ <tt class="varname">${PKG_SYSCONFBASE}/${PKG_SYSCONFSUBDIR}</tt>,
+ but this may be overridden by setting <tt class=
+ "varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</tt>
+ for a particular package, where <tt class=
+ "varname">PKG_SYSCONFVAR</tt> defaults to
+ <tt class="varname">${PKGBASE}</tt>. This is not
+ meant to be set by a package Makefile, but is
reserved for users who wish to override the
- <code class="varname">PKG_SYSCONFDIR</code>
- setting for a particular package with a special
+ <tt class="varname">PKG_SYSCONFDIR</tt> setting
+ for a particular package with a special
location.</p>
</li>
</ul>
</div>
<p>The only variables that users should customize are
- <code class="varname">PKG_SYSCONFBASE</code> and
- <code class=
- "varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code>.
- Users will typically want to set <code class=
- "varname">PKG_SYSCONFBASE</code> to <code class=
- "filename">/etc</code>, or to accept the default
- location of <code class=
- "filename">${PREFIX}/etc</code>.</p>
+ <tt class="varname">PKG_SYSCONFBASE</tt> and <tt class=
+ "varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</tt>. Users
+ will typically want to set <tt class=
+ "varname">PKG_SYSCONFBASE</tt> to <tt class=
+ "filename">/etc</tt>, or to accept the default location
+ of <tt class="filename">${PREFIX}/etc</tt>.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592516" id=
- "id2592516"></a>12.5.2.&nbsp;User
+ <h3 class="title"><a name="id2573022" id=
+ "id2573022"></a>12.5.2.&nbsp;User
interaction</h3>
</div>
</div>
@@ -9164,11 +9150,11 @@ pre-configure:
</ul>
</div>
- <p>The <code class="varname">INTERACTIVE_STAGE</code>
+ <p>The <tt class="varname">INTERACTIVE_STAGE</tt>
definition is provided to notify the pkgsrc mechanism
of an interactive stage which will be needed, and this
- should be set in the package's <code class=
- "filename">Makefile</code>. e.g.</p>
+ should be set in the package's <tt class=
+ "filename">Makefile</tt>. e.g.</p>
<pre class="programlisting">
INTERACTIVE_STAGE= build
</pre>
@@ -9183,8 +9169,8 @@ INTERACTIVE_STAGE= configure install
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592561" id=
- "id2592561"></a>12.5.3.&nbsp;Handling
+ <h3 class="title"><a name="id2573136" id=
+ "id2573136"></a>12.5.3.&nbsp;Handling
licenses</h3>
</div>
</div>
@@ -9204,12 +9190,12 @@ INTERACTIVE_STAGE= configure install
installed.</p>
<p>Placing a certain package under a certain license
- works by setting the <code class=
- "varname">LICENSE</code> variable to a string
- identifying the license, e.g. in <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
+ works by setting the <tt class="varname">LICENSE</tt>
+ variable to a string identifying the license, e.g. in
+ <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/graphics/graphviz/README.html"
- class="pkgname">graphics/graphviz</a>:</p>
+ class="pkgname">graphics/graphviz</a>:</p>
<pre class="programlisting">
LICENSE= graphviz-license
</pre>
@@ -9218,8 +9204,7 @@ LICENSE= graphviz-license
that the package underlies a license which he hasn't
accepted (yet):</p>
<pre class="programlisting">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make</code></strong>
+<tt class="prompt">%</tt> <b class="userinput"><tt>make</tt></b>
===&gt; graphviz-1.12 has an unacceptable license: graphviz-license.
===&gt; To build this package, add this line to your /etc/mk.conf:
===&gt; ACCEPTABLE_LICENSES+=graphviz-license
@@ -9227,39 +9212,39 @@ LICENSE= graphviz-license
*** Error code 1
</pre>
- <p>The license can be viewed with <span><strong class=
- "command">make show-license</strong></span>, and if it
- is considered appropriate, the line printed above can
- be added to <code class="filename">/etc/mk.conf</code>
- to indicate acceptance of the particular license:</p>
+ <p>The license can be viewed with <span><b class=
+ "command">make show-license</b></span>, and if it is
+ considered appropriate, the line printed above can be
+ added to <tt class="filename">/etc/mk.conf</tt> to
+ indicate acceptance of the particular license:</p>
<pre class="programlisting">
ACCEPTABLE_LICENSES+=graphviz-license
</pre>
<p>When adding a package with a new license, the
- license text should be added to <code class=
- "filename">pkgsrc/licenses</code> for displaying. A
- list of known licenses can be seen in this directory as
- well as by looking at the list of (commented out)
- <code class="varname">ACCEPTABLE_LICENSES</code>
- variable settings in <code class=
- "filename">pkgsrc/mk/defaults/mk.conf</code>.</p>
+ license text should be added to <tt class=
+ "filename">pkgsrc/licenses</tt> for displaying. A list
+ of known licenses can be seen in this directory as well
+ as by looking at the list of (commented out) <tt class=
+ "varname">ACCEPTABLE_LICENSES</tt> variable settings in
+ <tt class=
+ "filename">pkgsrc/mk/defaults/mk.conf</tt>.</p>
<p>Is there is a <span class=
"emphasis"><em>really</em></span> pressing need to
accept all licenses at once, like when trying to
download or mirror all distfiles or doing a bulk build
to test if all packages in pkgsrc build, this can be
- done by setting <code class=
- "varname">_ACCEPTABLE=yes</code>.</p>
+ done by setting <tt class=
+ "varname">_ACCEPTABLE=yes</tt>.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592644" id=
- "id2592644"></a>12.5.4.&nbsp;Creating an account
+ <h3 class="title"><a name="id2573287" id=
+ "id2573287"></a>12.5.4.&nbsp;Creating an account
from a package</h3>
</div>
</div>
@@ -9267,11 +9252,11 @@ ACCEPTABLE_LICENSES+=graphviz-license
<p>There are two make variables used to control the
creation of package-specific groups and users at
- pre-install time. The first is <code class=
- "varname">PKG_GROUPS</code>, which is a list of
+ pre-install time. The first is <tt class=
+ "varname">PKG_GROUPS</tt>, which is a list of
group[:groupid] elements, where the groupid is
- optional. The second is <code class=
- "varname">PKG_USERS</code>, which is a list of elements
+ optional. The second is <tt class=
+ "varname">PKG_USERS</tt>, which is a list of elements
of the form:</p>
<pre class="programlisting">
user:group[:[userid][:[description][:[home][:shell]]]]
@@ -9293,28 +9278,27 @@ user:group[:[userid][:[description][:[home][:shell]]]]
</pre>
<p>By default, a new user will have home directory
- <code class="filename">/nonexistent</code>, and login
- shell <code class="filename">/sbin/nologin</code>
- unless they are specified as part of the user
- element.</p>
-
- <p>The package <code class="filename">Makefile</code>
- must also set <code class=
- "varname">USE_PKGINSTALL=YES</code>. This will cause
- the users and groups to be created at pre-install time,
- and the admin will be prompted to remove them at
- post-deinstall time. Automatic creation of the users
- and groups can be toggled on and off by setting the
- <code class="varname">PKG_CREATE_USERGROUP</code>
- variable prior to package installation.</p>
+ <tt class="filename">/nonexistent</tt>, and login shell
+ <tt class="filename">/sbin/nologin</tt> unless they are
+ specified as part of the user element.</p>
+
+ <p>The package <tt class="filename">Makefile</tt> must
+ also set <tt class="varname">USE_PKGINSTALL=YES</tt>.
+ This will cause the users and groups to be created at
+ pre-install time, and the admin will be prompted to
+ remove them at post-deinstall time. Automatic creation
+ of the users and groups can be toggled on and off by
+ setting the <tt class=
+ "varname">PKG_CREATE_USERGROUP</tt> variable prior to
+ package installation.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592774" id=
- "id2592774"></a>12.5.5.&nbsp;Installing score
+ <h3 class="title"><a name="id2573349" id=
+ "id2573349"></a>12.5.5.&nbsp;Installing score
files</h3>
</div>
</div>
@@ -9327,47 +9311,45 @@ user:group[:[userid][:[description][:[home][:shell]]]]
and the score files owned by the appropriate group
and/or owner (traditionally the "games" user/group).
The following variables, documented in more detail in
- <code class="filename">mk/defaults/mk.conf</code>,
- control this behaviour: <code class=
- "varname">SETGIDGAME</code>, <code class=
- "varname">GAMEDATAMODE</code>, <code class=
- "varname">GAMEGRP</code>, <code class=
- "varname">GAMEMODE</code>, <code class=
- "varname">GAMEOWN</code>.</p>
+ <tt class="filename">mk/defaults/mk.conf</tt>, control
+ this behaviour: <tt class="varname">SETGIDGAME</tt>,
+ <tt class="varname">GAMEDATAMODE</tt>, <tt class=
+ "varname">GAMEGRP</tt>, <tt class=
+ "varname">GAMEMODE</tt>, <tt class=
+ "varname">GAMEOWN</tt>.</p>
<p>Note that per default, setgid installation of games
- is disabled; setting <code class=
- "varname">SETGIDGAME=YES</code> will set all the other
+ is disabled; setting <tt class=
+ "varname">SETGIDGAME=YES</tt> will set all the other
variables accordingly.</p>
<p>A package should therefor never hard code file
- ownership or access permissions but rely on
- <code class="varname">INSTALL_GAME</code> and
- <code class="varname">INSTALL_GAME_DATA</code> to set
- these correctly.</p>
+ ownership or access permissions but rely on <tt class=
+ "varname">INSTALL_GAME</tt> and <tt class=
+ "varname">INSTALL_GAME_DATA</tt> to set these
+ correctly.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2592818" id=
- "id2592818"></a>12.5.6.&nbsp;Packages providing
+ <h3 class="title"><a name="id2573393" id=
+ "id2573393"></a>12.5.6.&nbsp;Packages providing
login shells</h3>
</div>
</div>
</div>
<p>If the purpose of the package is to provide a login
- shell, the variable <code class=
- "varname">PKG_SHELL</code> should contain the full
- pathname of the shell executable installed by this
- package. The package <code class=
- "filename">Makefile</code> must also set <code class=
- "varname">USE_PKGINSTALL=YES</code> to use the
- automatically generated <code class=
- "filename">INSTALL</code>/<code class=
- "filename">DEINSTALL</code> scripts.</p>
+ shell, the variable <tt class="varname">PKG_SHELL</tt>
+ should contain the full pathname of the shell
+ executable installed by this package. The package
+ <tt class="filename">Makefile</tt> must also set
+ <tt class="varname">USE_PKGINSTALL=YES</tt> to use the
+ automatically generated <tt class=
+ "filename">INSTALL</tt>/<tt class=
+ "filename">DEINSTALL</tt> scripts.</p>
<p>An example taken from shells/zsh:</p>
<pre class="programlisting">
@@ -9375,39 +9357,39 @@ user:group[:[userid][:[description][:[home][:shell]]]]
PKG_SHELL= ${PREFIX}/bin/zsh
</pre>
- <p>The shell is registered into <code class=
- "filename">/etc/shells</code> file automatically in the
- post-install target by the generated <code class=
- "filename">INSTALL</code> script and removed in the
- deinstall target by the <code class=
- "filename">DEINSTALL</code> script.</p>
+ <p>The shell is registered into <tt class=
+ "filename">/etc/shells</tt> file automatically in the
+ post-install target by the generated <tt class=
+ "filename">INSTALL</tt> script and removed in the
+ deinstall target by the <tt class=
+ "filename">DEINSTALL</tt> script.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593012" id=
- "id2593012"></a>12.5.7.&nbsp;Packages containing
+ <h3 class="title"><a name="id2573518" id=
+ "id2573518"></a>12.5.7.&nbsp;Packages containing
perl scripts</h3>
</div>
</div>
</div>
<p>If your package contains interpreted perl scripts,
- set <code class="varname">REPLACE_PERL</code> to ensure
- that the proper interpreter path is set. <code class=
- "varname">REPLACE_PERL</code> should contain a list of
- scripts, relative to <code class=
- "varname">WRKSRC</code>, that you want adjusted.</p>
+ set <tt class="varname">REPLACE_PERL</tt> to ensure
+ that the proper interpreter path is set. <tt class=
+ "varname">REPLACE_PERL</tt> should contain a list of
+ scripts, relative to <tt class="varname">WRKSRC</tt>,
+ that you want adjusted.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593030" id=
- "id2593030"></a>12.5.8.&nbsp;Packages with
+ <h3 class="title"><a name="id2573537" id=
+ "id2573537"></a>12.5.8.&nbsp;Packages with
hardcoded paths to other interpreters</h3>
</div>
</div>
@@ -9417,9 +9399,9 @@ user:group[:[userid][:[description][:[home][:shell]]]]
paths to other interpreters besides (or as well as)
perl. To correct the full pathname to the script
interpreter, you need to set the following definitions
- in your <code class="filename">Makefile</code> (we
- shall use <span><strong class=
- "command">tclsh</strong></span> in this example):</p>
+ in your <tt class="filename">Makefile</tt> (we shall
+ use <span><b class="command">tclsh</b></span> in this
+ example):</p>
<pre class="programlisting">
REPLACE_INTERPRETER+= tcl
_REPLACE.tcl.old= .*/bin/tclsh
@@ -9433,43 +9415,43 @@ user:group[:[userid][:[description][:[home][:shell]]]]
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593051" id=
- "id2593051"></a>12.5.9.&nbsp;Packages installing
+ <h3 class="title"><a name="id2573558" id=
+ "id2573558"></a>12.5.9.&nbsp;Packages installing
perl modules</h3>
</div>
</div>
</div>
<p>Makefiles of packages providing perl5 modules should
- include the Makefile fragment <code class=
- "filename">../../lang/perl5/module.mk</code>. It
- provides a <span><strong class=
- "command">do-configure</strong></span> target for the
- standard perl configuration for such modules as well as
- various hooks to tune this configuration. See comments
- in this file for details.</p>
+ include the Makefile fragment <tt class=
+ "filename">../../lang/perl5/module.mk</tt>. It provides
+ a <span><b class="command">do-configure</b></span>
+ target for the standard perl configuration for such
+ modules as well as various hooks to tune this
+ configuration. See comments in this file for
+ details.</p>
<p>Perl5 modules will install into different places
depending on the version of perl used during the build
process. To address this, pkgsrc will append lines to
- the <code class="filename">PLIST</code> corresponding
- to the files listed in the installed <code class=
- "filename">.packlist</code> file generated by most
- perl5 modules. This is invoked by defining <code class=
- "varname">PERL5_PACKLIST</code> to a space-separated
- list of paths to packlist files, e.g.:</p>
+ the <tt class="filename">PLIST</tt> corresponding to
+ the files listed in the installed <tt class=
+ "filename">.packlist</tt> file generated by most perl5
+ modules. This is invoked by defining <tt class=
+ "varname">PERL5_PACKLIST</tt> to a space-separated list
+ of paths to packlist files, e.g.:</p>
<pre class="programlisting">
PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</pre>
- <p>The variables <code class=
- "varname">PERL5_SITELIB</code>, <code class=
- "varname">PERL5_SITEARCH</code>, and <code class=
- "varname">PERL5_ARCHLIB</code> represent the three
+ <p>The variables <tt class=
+ "varname">PERL5_SITELIB</tt>, <tt class=
+ "varname">PERL5_SITEARCH</tt>, and <tt class=
+ "varname">PERL5_ARCHLIB</tt> represent the three
locations in which perl5 modules may be installed, and
may be used by perl5 packages that don't have a
packlist. These three variables are also substituted
- for in the <code class="filename">PLIST</code>.</p>
+ for in the <tt class="filename">PLIST</tt>.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
@@ -9492,30 +9474,30 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<ul type="disc">
<li>
<p>is considered to be installed in the directory
- <code class=
- "filename">${PREFIX}/${INFO_DIR}</code>,</p>
+ <tt class=
+ "filename">${PREFIX}/${INFO_DIR}</tt>,</p>
</li>
<li>
<p>is registered in the Info directory file
- <code class=
- "filename">${PREFIX}/${INFO_DIR}/dir</code>,</p>
+ <tt class=
+ "filename">${PREFIX}/${INFO_DIR}/dir</tt>,</p>
</li>
<li>
<p>and must be listed as a filename in the
- <code class="varname">INFO_FILES</code> variable
- in the package Makefile.</p>
+ <tt class="varname">INFO_FILES</tt> variable in
+ the package Makefile.</p>
</li>
</ul>
</div>
- <p><code class="varname">INFO_DIR</code> defaults to
+ <p><tt class="varname">INFO_DIR</tt> defaults to
&#8220;<span class="quote">info</span>&#8221; and can
- be overridden in the package Makefile. <code class=
- "filename">INSTALL</code> and <code class=
- "filename">DEINSTALL</code> scripts will be generated
- to handle registration of the info files in the Info
+ be overridden in the package Makefile. <tt class=
+ "filename">INSTALL</tt> and <tt class=
+ "filename">DEINSTALL</tt> scripts will be generated to
+ handle registration of the info files in the Info
directory file. The &#8220;<span class=
"quote">install-info</span>&#8221; command used for the
info files registration is either provided by the
@@ -9524,75 +9506,72 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<p>A package which needs the &#8220;<span class=
"quote">makeinfo</span>&#8221; command at build time
- must define the variable <code class=
- "varname">USE_MAKEINFO</code> in its Makefile. If a
+ must define the variable <tt class=
+ "varname">USE_MAKEINFO</tt> in its Makefile. If a
minimum version of the &#8220;<span class=
"quote">makeinfo</span>&#8221; command is needed it
- should be noted with the <code class=
- "varname">TEXINFO_REQD</code> variable in the package
- <code class="filename">Makefile</code>. By default, a
+ should be noted with the <tt class=
+ "varname">TEXINFO_REQD</tt> variable in the package
+ <tt class="filename">Makefile</tt>. By default, a
minimum version of 3.12 is required. If the system does
- not provide a <span><strong class=
- "command">makeinfo</strong></span> command or if it
- does not match the required minimum, a build dependency
- on the <a xmlns=
- "http://www.w3.org/TR/xhtml1/transitional" href=
+ not provide a <span><b class=
+ "command">makeinfo</b></span> command or if it does not
+ match the required minimum, a build dependency on the
+ <a xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/devel/gtexinfo/README.html"
- class="pkgname">devel/gtexinfo</a> package will be
- added automatically.</p>
+ class="pkgname">devel/gtexinfo</a> package will be
+ added automatically.</p>
<p>The build and installation process of the software
provided by the package should not use the
- <span><strong class=
- "command">install-info</strong></span> command as the
- registration of info files is the task of the package
- <code class="filename">INSTALL</code> script, and it
- must use the appropriate <span><strong class=
- "command">makeinfo</strong></span> command.</p>
+ <span><b class="command">install-info</b></span>
+ command as the registration of info files is the task
+ of the package <tt class="filename">INSTALL</tt>
+ script, and it must use the appropriate <span><b class=
+ "command">makeinfo</b></span> command.</p>
<p>To achieve this goal the pkgsrc infrastructure
- creates overriding scripts for the <span><strong class=
- "command">install-info</strong></span> and
- <span><strong class="command">makeinfo</strong></span>
- commands in a directory listed early in <code class=
- "varname">PATH</code>.</p>
-
- <p>The script overriding <span><strong class=
- "command">install-info</strong></span> has no effect
- except the logging of a message. The script overriding
- <span><strong class="command">makeinfo</strong></span>
- logs a message and according to the value of
- <code class="varname">USE_MAKEINFO</code> and
- <code class="varname">TEXINFO_REQD</code> either run
- the appropriate <span><strong class=
- "command">makeinfo</strong></span> command or exit on
- error.</p>
+ creates overriding scripts for the <span><b class=
+ "command">install-info</b></span> and <span><b class=
+ "command">makeinfo</b></span> commands in a directory
+ listed early in <tt class="varname">PATH</tt>.</p>
+
+ <p>The script overriding <span><b class=
+ "command">install-info</b></span> has no effect except
+ the logging of a message. The script overriding
+ <span><b class="command">makeinfo</b></span> logs a
+ message and according to the value of <tt class=
+ "varname">USE_MAKEINFO</tt> and <tt class=
+ "varname">TEXINFO_REQD</tt> either run the appropriate
+ <span><b class="command">makeinfo</b></span> command or
+ exit on error.</p>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593408" id=
- "id2593408"></a>12.5.11.&nbsp;Packages installing
+ <h3 class="title"><a name="id2573778" id=
+ "id2573778"></a>12.5.11.&nbsp;Packages installing
GConf2 data files</h3>
</div>
</div>
</div>
- <p>If a package installs <code class=
- "filename">.schemas</code> or <code class=
- "filename">.entries</code> files, used by GConf2, you
+ <p>If a package installs <tt class=
+ "filename">.schemas</tt> or <tt class=
+ "filename">.entries</tt> files, used by GConf2, you
need to take some extra steps to make sure they get
registered in the database:</p>
<div class="orderedlist">
<ol type="1">
<li>
- <p>Include <code class=
- "filename">../../devel/GConf2/schemas.mk</code>
- instead of its <code class=
- "filename">buildlink3.mk</code> file. This takes
+ <p>Include <tt class=
+ "filename">../../devel/GConf2/schemas.mk</tt>
+ instead of its <tt class=
+ "filename">buildlink3.mk</tt> file. This takes
care of rebuilding the GConf2 database at
installation and deinstallation time, and tells
the package where to install GConf2 data files
@@ -9603,11 +9582,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<li>
<p>Ensure that the package installs its
- <code class="filename">.schemas</code> files
- under <code class=
- "filename">${PREFIX}/share/gconf/schemas</code>.
- If they get installed under <code class=
- "filename">${PREFIX}/etc</code>, you will need to
+ <tt class="filename">.schemas</tt> files under
+ <tt class=
+ "filename">${PREFIX}/share/gconf/schemas</tt>. If
+ they get installed under <tt class=
+ "filename">${PREFIX}/etc</tt>, you will need to
manually patch the package.</p>
</li>
@@ -9622,23 +9601,21 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</li>
<li>
- <p>Define the <code class=
- "varname">GCONF2_SCHEMAS</code> variable in your
- <code class="filename">Makefile</code> with a
- list of all <code class=
- "filename">.schemas</code> files installed by the
- package, if any. Names must not contain any
- directories in them.</p>
+ <p>Define the <tt class=
+ "varname">GCONF2_SCHEMAS</tt> variable in your
+ <tt class="filename">Makefile</tt> with a list of
+ all <tt class="filename">.schemas</tt> files
+ installed by the package, if any. Names must not
+ contain any directories in them.</p>
</li>
<li>
- <p>Define the <code class=
- "varname">GCONF2_ENTRIES</code> variable in your
- <code class="filename">Makefile</code> with a
- list of all <code class=
- "filename">.entries</code> files installed by the
- package, if any. Names must not contain any
- directories in them.</p>
+ <p>Define the <tt class=
+ "varname">GCONF2_ENTRIES</tt> variable in your
+ <tt class="filename">Makefile</tt> with a list of
+ all <tt class="filename">.entries</tt> files
+ installed by the package, if any. Names must not
+ contain any directories in them.</p>
</li>
</ol>
</div>
@@ -9648,25 +9625,25 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593508" id=
- "id2593508"></a>12.5.12.&nbsp;Packages installing
+ <h3 class="title"><a name="id2573946" id=
+ "id2573946"></a>12.5.12.&nbsp;Packages installing
scrollkeeper data files</h3>
</div>
</div>
</div>
- <p>If a package installs <code class=
- "filename">.omf</code> files, used by scrollkeeper, you
- need to take some extra steps to make sure they get
- registered in the database:</p>
+ <p>If a package installs <tt class="filename">.omf</tt>
+ files, used by scrollkeeper, you need to take some
+ extra steps to make sure they get registered in the
+ database:</p>
<div class="orderedlist">
<ol type="1">
<li>
- <p>Include <code class=
- "filename">../../textproc/scrollkeeper/omf.mk</code>
- instead of its <code class=
- "filename">buildlink3.mk</code> file. This takes
+ <p>Include <tt class=
+ "filename">../../textproc/scrollkeeper/omf.mk</tt>
+ instead of its <tt class=
+ "filename">buildlink3.mk</tt> file. This takes
care of rebuilding the scrollkeeper database at
installation and deinstallation time, and
disallows any access to it directly from the
@@ -9675,15 +9652,15 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<li>
<p>Check the PLIST and remove any entries under
- the <code class=
- "filename">libdata/scrollkeeper</code> directory,
+ the <tt class=
+ "filename">libdata/scrollkeeper</tt> directory,
as they will be handled automatically.</p>
</li>
<li>
- <p>Remove the <code class=
- "filename">share/omf</code> directory from the
- PLIST. It will be handled by scrollkeeper.</p>
+ <p>Remove the <tt class="filename">share/omf</tt>
+ directory from the PLIST. It will be handled by
+ scrollkeeper.</p>
</li>
</ol>
</div>
@@ -9693,8 +9670,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593559" id=
- "id2593559"></a>12.5.13.&nbsp;Packages installing
+ <h3 class="title"><a name="id2573997" id=
+ "id2573997"></a>12.5.13.&nbsp;Packages installing
X11 fonts</h3>
</div>
</div>
@@ -9703,22 +9680,20 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<p>If a package installs font files, you will need to
rebuild the fonts database in the directory where they
get installed at installation and deinstallation time.
- This can be automatically done by using <code class=
- "filename">mk/fonts.mk</code>, which you need to
- include in your <code class=
- "filename">Makefile</code>.</p>
+ This can be automatically done by using <tt class=
+ "filename">mk/fonts.mk</tt>, which you need to include
+ in your <tt class="filename">Makefile</tt>.</p>
<p>When the file is included, you can list the
- directories where fonts are installed in the
- <code class="varname">FONTS_<em class=
- "replaceable"><code>type</code></em>_DIRS</code>
- variables, where <em class=
- "replaceable"><code>type</code></em> can be one of
- &#8220;<span class="quote">TTF</span>&#8221;,
+ directories where fonts are installed in the <tt class=
+ "varname">FONTS_<i class=
+ "replaceable"><tt>type</tt></i>_DIRS</tt> variables,
+ where <i class="replaceable"><tt>type</tt></i> can be
+ one of &#8220;<span class="quote">TTF</span>&#8221;,
&#8220;<span class="quote">TYPE1</span>&#8221; or
&#8220;<span class="quote">X11</span>&#8221;. Also make
- sure that the database file <code class=
- "filename">fonts.dir</code> is not listed in the
+ sure that the database file <tt class=
+ "filename">fonts.dir</tt> is not listed in the
PLIST.</p>
<p>Note that you should not create new directories for
@@ -9731,8 +9706,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593606" id=
- "id2593606"></a>12.5.14.&nbsp;Packages installing
+ <h3 class="title"><a name="id2574044" id=
+ "id2574044"></a>12.5.14.&nbsp;Packages installing
GTK2 modules</h3>
</div>
</div>
@@ -9745,24 +9720,22 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="orderedlist">
<ol type="1">
<li>
- <p>Include <code class=
- "filename">../../x11/gtk2/modules.mk</code>
- instead of its <code class=
- "filename">buildlink3.mk</code> file. This takes
- care of rebuilding the database at installation
- and deinstallation time.</p>
+ <p>Include <tt class=
+ "filename">../../x11/gtk2/modules.mk</tt> instead
+ of its <tt class="filename">buildlink3.mk</tt>
+ file. This takes care of rebuilding the database
+ at installation and deinstallation time.</p>
</li>
<li>
- <p>Set <code class=
- "varname">GTK2_IMMODULES=YES</code> if your
- package installs GTK2 immodules.</p>
+ <p>Set <tt class=
+ "varname">GTK2_IMMODULES=YES</tt> if your package
+ installs GTK2 immodules.</p>
</li>
<li>
- <p>Set <code class=
- "varname">GTK2_LOADERS=YES</code> if your package
- installs GTK2 loaders.</p>
+ <p>Set <tt class="varname">GTK2_LOADERS=YES</tt>
+ if your package installs GTK2 loaders.</p>
</li>
<li>
@@ -9772,13 +9745,13 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class=
- "filename">libdata/gtk-2.0/gdk-pixbuf.loaders</code></p>
+ <p><tt class=
+ "filename">libdata/gtk-2.0/gdk-pixbuf.loaders</tt></p>
</li>
<li>
- <p><code class=
- "filename">libdata/gtk-2.0/gtk.immodules</code></p>
+ <p><tt class=
+ "filename">libdata/gtk-2.0/gtk.immodules</tt></p>
</li>
</ul>
</div>
@@ -9786,7 +9759,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<li>
<p>Check the PLIST and remove any entries under
- the <code class="filename">libdata/gtk-2.0</code>
+ the <tt class="filename">libdata/gtk-2.0</tt>
directory, as they will be handled
automatically.</p>
</li>
@@ -9798,8 +9771,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593675" id=
- "id2593675"></a>12.5.15.&nbsp;Packages installing
+ <h3 class="title"><a name="id2574114" id=
+ "id2574114"></a>12.5.15.&nbsp;Packages installing
SGML or XML data</h3>
</div>
</div>
@@ -9813,29 +9786,29 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="orderedlist">
<ol type="1">
<li>
- <p>Include <code class=
- "filename">../../textproc/xmlcatmgr/catalogs.mk</code>
- in your <code class="filename">Makefile</code>,
- which takes care of registering those files in
+ <p>Include <tt class=
+ "filename">../../textproc/xmlcatmgr/catalogs.mk</tt>
+ in your <tt class="filename">Makefile</tt>, which
+ takes care of registering those files in
system-wide catalogs at installation and
deinstallation time.</p>
</li>
<li>
- <p>Set <code class="varname">SGML_CATALOGS</code>
- to the full path of any SGML catalogs installed
- by the package.</p>
+ <p>Set <tt class="varname">SGML_CATALOGS</tt> to
+ the full path of any SGML catalogs installed by
+ the package.</p>
</li>
<li>
- <p>Set <code class="varname">XML_CATALOGS</code>
- to the full path of any XML catalogs installed by
+ <p>Set <tt class="varname">XML_CATALOGS</tt> to
+ the full path of any XML catalogs installed by
the package.</p>
</li>
<li>
- <p>Set <code class="varname">SGML_ENTRIES</code>
- to individual entries to be added to the SGML
+ <p>Set <tt class="varname">SGML_ENTRIES</tt> to
+ individual entries to be added to the SGML
catalog. These come in groups of three strings;
see xmlcatmgr(1) for more information
(specifically, arguments recognized by the 'add'
@@ -9844,8 +9817,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</li>
<li>
- <p>Set <code class="varname">XML_ENTRIES</code>
- to individual entries to be added to the XML
+ <p>Set <tt class="varname">XML_ENTRIES</tt> to
+ individual entries to be added to the XML
catalog. These come in groups of three strings;
see xmlcatmgr(1) for more information
(specifically, arguments recognized by the 'add'
@@ -9860,44 +9833,42 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593728" id=
- "id2593728"></a>12.5.16.&nbsp;Packages installing
+ <h3 class="title"><a name="id2574234" id=
+ "id2574234"></a>12.5.16.&nbsp;Packages installing
extensions to the MIME database</h3>
</div>
</div>
</div>
<p>If a package provides extensions to the MIME
- database by installing <code class=
- "filename">.xml</code> files inside <code class=
- "filename">${PREFIX}/share/mime/packages</code>, you
- need to take some extra steps to ensure that the
- database is kept consistent with respect to these new
- files:</p>
+ database by installing <tt class="filename">.xml</tt>
+ files inside <tt class=
+ "filename">${PREFIX}/share/mime/packages</tt>, you need
+ to take some extra steps to ensure that the database is
+ kept consistent with respect to these new files:</p>
<div class="orderedlist">
<ol type="1">
<li>
- <p>Include <code class=
- "filename">../../databases/shared-mime-info/mimedb.mk</code>
- (avoid using the <code class=
- "filename">buildlink3.mk</code> file from this
- same directory, which is reserved for inclusion
- from other <code class=
- "filename">buildlink3.mk</code> files). It takes
- care of rebuilding the MIME database at
- installation and deinstallation time, and
- disallows any access to it directly from the
+ <p>Include <tt class=
+ "filename">../../databases/shared-mime-info/mimedb.mk</tt>
+ (avoid using the <tt class=
+ "filename">buildlink3.mk</tt> file from this same
+ directory, which is reserved for inclusion from
+ other <tt class="filename">buildlink3.mk</tt>
+ files). It takes care of rebuilding the MIME
+ database at installation and deinstallation time,
+ and disallows any access to it directly from the
package.</p>
</li>
<li>
<p>Check the PLIST and remove any entries under
- the <code class="filename">share/mime</code>
+ the <tt class="filename">share/mime</tt>
directory, <span class=
"emphasis"><em>except</em></span> for files saved
- under <code class=
- "filename">share/mime/packages</code>. The former
+ under <tt class=
+ "filename">share/mime/packages</tt>. The former
are handled automatically by the
update-mime-database program, but the later are
package-dependent and must be removed by the
@@ -9906,9 +9877,9 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</li>
<li>
- <p>Remove any <code class=
- "filename">share/mime/*</code> directories from
- the PLIST. They will be handled by the
+ <p>Remove any <tt class=
+ "filename">share/mime/*</tt> directories from the
+ PLIST. They will be handled by the
shared-mime-info package.</p>
</li>
</ol>
@@ -9919,16 +9890,16 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2593798" id=
- "id2593798"></a>12.5.17.&nbsp;Packages using
+ <h3 class="title"><a name="id2574305" id=
+ "id2574305"></a>12.5.17.&nbsp;Packages using
intltool</h3>
</div>
</div>
</div>
<p>If a package uses intltool during its build, include
- the <code class=
- "filename">../../textproc/intltool/buildlink3.mk</code>
+ the <tt class=
+ "filename">../../textproc/intltool/buildlink3.mk</tt>
file, which forces it to use the intltool package
provided by pkgsrc, instead of the one bundled with the
distribution file.</p>
@@ -9945,7 +9916,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2593812" id="id2593812"></a>12.6.&nbsp;Feedback
+ "id2574318" id="id2574318"></a>12.6.&nbsp;Feedback
to the author</h2>
</div>
</div>
@@ -9983,159 +9954,153 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="itemizedlist">
<ul type="disc">
<li>
- <p>Be sure to set <code class=
- "varname">PKG_DEVELOPER=1</code> in <code class=
- "filename">/etc/mk.conf</code></p>
+ <p>Be sure to set <tt class=
+ "varname">PKG_DEVELOPER=1</tt> in <tt class=
+ "filename">/etc/mk.conf</tt></p>
</li>
<li>
<p>Install <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/url2pkg/README.html"
- class="pkgname">pkgtools/url2pkg</a>, create a
- directory for a new package, change into it, then run
- <span><strong class=
- "command">url2pkg</strong></span>:</p>
+ class="pkgname">pkgtools/url2pkg</a>, create a
+ directory for a new package, change into it, then
+ run <span><b class=
+ "command">url2pkg</b></span>:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>mkdir /usr/pkgsrc/<em class=
-"replaceable"><code>category</code></em>/<em class=
-"replaceable"><code>examplepkg</code></em></code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cd /usr/pkgsrc/<em class=
-"replaceable"><code>category</code></em>/<em class=
-"replaceable"><code>examplepkg</code></em></code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>url2pkg http://www.example.com/path/to/distfile.tar.gz</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>mkdir /usr/pkgsrc/<i class=
+"replaceable"><tt>category</tt></i>/<i class=
+"replaceable"><tt>examplepkg</tt></i></tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cd /usr/pkgsrc/<i class=
+"replaceable"><tt>category</tt></i>/<i class=
+"replaceable"><tt>examplepkg</tt></i></tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>url2pkg http://www.example.com/path/to/distfile.tar.gz</tt></b>
</pre>
</li>
<li>
- <p>Edit the <code class="filename">Makefile</code> as
+ <p>Edit the <tt class="filename">Makefile</tt> as
requested.</p>
</li>
<li>
- <p>Fill in the <code class="filename">DESCR</code>
+ <p>Fill in the <tt class="filename">DESCR</tt>
file</p>
</li>
<li>
- <p>Run <span><strong class="command">make
- configure</strong></span></p>
+ <p>Run <span><b class="command">make
+ configure</b></span></p>
</li>
<li>
<p>Add any dependencies glimpsed from documentation
- and the configure step to the package's <code class=
- "filename">Makefile</code>.</p>
+ and the configure step to the package's <tt class=
+ "filename">Makefile</tt>.</p>
</li>
<li>
<p>Make the package compile, doing multiple rounds
of</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>pkgvi ${WRKSRC}/some/file/that/does/not/compile</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>mkpatches</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>patchdiff</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>mv ${WRKDIR}/.newpatches/* patches</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make mps</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>make clean</code></strong>
+<tt class="prompt">%</tt> <b class="userinput"><tt>make</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>pkgvi ${WRKSRC}/some/file/that/does/not/compile</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>mkpatches</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>patchdiff</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>mv ${WRKDIR}/.newpatches/* patches</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>make mps</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>make clean</tt></b>
</pre>
<p>Doing as non-root user will ensure that no files
are modified that shouldn't be, especially during the
- build phase. <span><strong class=
- "command">mkpatches</strong></span>,
- <span><strong class=
- "command">patchdiff</strong></span> and
- <span><strong class="command">pkgvi</strong></span>
- are from the <a xmlns=
+ build phase. <span><b class=
+ "command">mkpatches</b></span>, <span><b class=
+ "command">patchdiff</b></span> and <span><b class=
+ "command">pkgvi</b></span> are from the <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkgdiff/README.html"
- class="pkgname">pkgtools/pkgdiff</a> package.</p>
+ class="pkgname">pkgtools/pkgdiff</a> package.</p>
</li>
<li>
- <p>Look at the <code class=
- "filename">Makefile</code>, fix if necessary; see
- <a href="#components.Makefile" title=
- "7.1.&nbsp;Makefile">Section&nbsp;7.1,
- &#8220;<code class=
- "filename">Makefile</code>&#8221;</a>.</p>
+ <p>Look at the <tt class="filename">Makefile</tt>,
+ fix if necessary; see <a href="#components.Makefile"
+ title="7.1.&nbsp;Makefile">Section&nbsp;7.1,
+ &#8220;Makefile&#8221;</a>.</p>
</li>
<li>
- <p>Generate a <code class=
- "filename">PLIST</code>:</p>
+ <p>Generate a <tt class="filename">PLIST</tt>:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make install</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make print-PLIST &gt;PLIST</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make deinstall</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make install</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make deinstall</code></strong>
-</pre>
-
- <p>You usually need to be <code class=
- "username">root</code> to do this. Look if there are
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make install</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make print-PLIST &gt;PLIST</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make deinstall</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make install</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make deinstall</tt></b>
+</pre>
+
+ <p>You usually need to be <tt class=
+ "username">root</tt> to do this. Look if there are
any files left:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make print-PLIST</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make print-PLIST</tt></b>
</pre>
<p>If this reveals any files that are missing in
- <code class="filename">PLIST</code>, add them.</p>
+ <tt class="filename">PLIST</tt>, add them.</p>
</li>
<li>
- <p>Now that the <code class="filename">PLIST</code>
- is OK, install the package again and make a binary
+ <p>Now that the <tt class="filename">PLIST</tt> is
+ OK, install the package again and make a binary
package:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make reinstall</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make package</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make reinstall</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make package</tt></b>
</pre>
</li>
<li>
<p>Delete the installed package:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>pkg_delete blub</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>pkg_delete blub</tt></b>
</pre>
</li>
<li>
- <p>Repeat the above <span><strong class=
- "command">make print-PLIST</strong></span> command,
- which shouldn't find anything now:</p>
+ <p>Repeat the above <span><b class="command">make
+ print-PLIST</b></span> command, which shouldn't find
+ anything now:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make print-PLIST</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make print-PLIST</tt></b>
</pre>
</li>
<li>
<p>Reinstall the binary package:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>pkgadd .../blub.tgz</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>pkgadd .../blub.tgz</tt></b>
</pre>
</li>
@@ -10144,15 +10109,14 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</li>
<li>
- <p>Run <span><strong class=
- "command">pkglint</strong></span> from <a xmlns=
+ <p>Run <span><b class="command">pkglint</b></span>
+ from <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkglint/README.html"
- class="pkgname">pkgtools/pkglint</a>, and fix the
- problems it reports:</p>
+ class="pkgname">pkgtools/pkglint</a>, and fix the
+ problems it reports:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>pkglint</code></strong>
+<tt class="prompt">#</tt> <b class="userinput"><tt>pkglint</tt></b>
</pre>
</li>
@@ -10181,17 +10145,17 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2594342">14.1.
+ <dt><span class="sect1"><a href="#id2574849">14.1.
Submitting your packages</a></span></dt>
- <dt><span class="sect1"><a href="#id2594389">14.2.
+ <dt><span class="sect1"><a href="#id2575036">14.2.
Committing: Importing a package into
CVS</a></span></dt>
- <dt><span class="sect1"><a href="#id2594520">14.3.
+ <dt><span class="sect1"><a href="#id2575168">14.3.
Updating a package to a newer version</a></span></dt>
- <dt><span class="sect1"><a href="#id2594539">14.4.
+ <dt><span class="sect1"><a href="#id2575187">14.4.
Moving a package in pkgsrc</a></span></dt>
</dl>
</div>
@@ -10201,8 +10165,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2594342" id=
- "id2594342"></a>14.1.&nbsp;Submitting your
+ "id2574849" id=
+ "id2574849"></a>14.1.&nbsp;Submitting your
packages</h2>
</div>
</div>
@@ -10220,9 +10184,14 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<p>Our policy is that we accept binaries only from
pkgsrc developers to guarantee that the packages
don't contain any trojan horses etc. This is not to
- piss anyone off but rather to protect our users!
+ annoy anyone but rather to protect our users!
You're still free to put up your home-made binary
- packages and tell the world where to get them.</p>
+ packages and tell the world where to get them.
+ NetBSD developers doing bulk builds and wanting to
+ upload them please see <a href="#bulk-upload"
+ title="5.3.8.&nbsp;Uploading results of a bulk build">
+ Section&nbsp;5.3.8, &#8220;Uploading results of a
+ bulk build&#8221;</a>.</p>
</li>
<li>
@@ -10234,8 +10203,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<i>Debugging</i></a> and the rest of this document.
Next, generate an uuencoded gzipped tar(1) archive,
preferably with all files in a single directory.
- Finally, <span><strong class=
- "command">send-pr</strong></span> with category
+ Finally, <span><b class=
+ "command">send-pr</b></span> with category
&#8220;<span class="quote">pkg</span>&#8221;, a
synopsis which includes the package name and
version number, a short description of your package
@@ -10263,8 +10232,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2594389" id=
- "id2594389"></a>14.2.&nbsp;Committing: Importing a
+ "id2575036" id=
+ "id2575036"></a>14.2.&nbsp;Committing: Importing a
package into CVS</h2>
</div>
</div>
@@ -10274,13 +10243,13 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
with write access to the pkgsrc repository. Please
remember that cvs imports files relative to the current
working directory, and that the pathname that you give
- the <span><strong class="command">cvs
- import</strong></span> command is so that it knows where
- to place the files in the repository. Newly created
- packages should be imported with a vendor tag of
- &#8220;<span class="quote">TNF</span>&#8221; and a
- release tag of &#8220;<span class=
- "quote">pkgsrc-base</span>&#8221;, e.g:</p>
+ the <span><b class="command">cvs import</b></span>
+ command is so that it knows where to place the files in
+ the repository. Newly created packages should be imported
+ with a vendor tag of &#8220;<span class=
+ "quote">TNF</span>&#8221; and a release tag of
+ &#8220;<span class="quote">pkgsrc-base</span>&#8221;,
+ e.g:</p>
<pre class="programlisting">
% cd .../pkgsrc/category/pkgname
% cvs import pkgsrc/category/pkgname TNF pkgsrc-base
@@ -10290,19 +10259,18 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
out of the way, or cvs will complain the next time you
&#8220;<span class="quote">cvs update</span>&#8221; your
source tree. Also don't forget to add the new package to
- the category's <code class=
- "filename">Makefile</code>.</p>
+ the category's <tt class="filename">Makefile</tt>.</p>
<p>The commit message of the initial import should
- include part of the <code class="filename">DESCR</code>
- file, so people reading the mailing lists know what the
- package is/does.</p>
+ include part of the <tt class="filename">DESCR</tt> file,
+ so people reading the mailing lists know what the package
+ is/does.</p>
<p>Please note all package updates/additions in
- <code class="filename">pkgsrc/doc/CHANGES</code>. It's
- very important to keep this file up to date and
- conforming to the existing format, because it will be
- used by scripts to automatically update pages on <a href=
+ <tt class="filename">pkgsrc/doc/CHANGES</tt>. It's very
+ important to keep this file up to date and conforming to
+ the existing format, because it will be used by scripts
+ to automatically update pages on <a href=
"http://www.NetBSD.org/" target="_top">www.NetBSD.org</a>
and other sites. Additionally, check the pkgsrc/doc/TODO
file and remove the entry for the package you updated, in
@@ -10320,7 +10288,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2594520" id="id2594520"></a>14.3.&nbsp;Updating
+ "id2575168" id="id2575168"></a>14.3.&nbsp;Updating
a package to a newer version</h2>
</div>
</div>
@@ -10371,7 +10339,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2594539" id="id2594539"></a>14.4.&nbsp;Moving a
+ "id2575187" id="id2575187"></a>14.4.&nbsp;Moving a
package in pkgsrc</h2>
</div>
</div>
@@ -10389,35 +10357,34 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<p>Alternatively to the first two steps you can
also do:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cvs -d user@cvs.NetBSD.org:/cvsroot export -D today pkgsrc/category/package</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cvs -d user@cvs.NetBSD.org:/cvsroot export -D today pkgsrc/category/package</tt></b>
</pre>
<p>and use that for further work.</p>
</li>
<li>
- <p>Fix <code class="varname">CATEGORIES</code> and
- any <code class="varname">DEPENDS</code> paths that
- just did &#8220;<span class=
+ <p>Fix <tt class="varname">CATEGORIES</tt> and any
+ <tt class="varname">DEPENDS</tt> paths that just
+ did &#8220;<span class=
"quote">../package</span>&#8221; instead of
&#8220;<span class=
"quote">../../category/package</span>&#8221;.</p>
</li>
<li>
- <p><span><strong class="command">cvs
- import</strong></span> the modified package in the
- new place.</p>
+ <p><span><b class="command">cvs import</b></span>
+ the modified package in the new place.</p>
</li>
<li>
<p>Check if any package depends on it:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cd /usr/pkgsrc</code></strong>
-<code class="prompt">%</code> <strong class=
-"userinput"><code>grep /package */*/Makefile* */*/buildlink*</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cd /usr/pkgsrc</tt></b>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>grep /package */*/Makefile* */*/buildlink*</tt></b>
</pre>
</li>
@@ -10427,26 +10394,25 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
</li>
<li>
- <p><span><strong class="command">cvs rm
- (-f)</strong></span> the package at the old
- location.</p>
+ <p><span><b class="command">cvs rm (-f)</b></span>
+ the package at the old location.</p>
</li>
<li>
- <p>Remove from <code class=
- "filename">oldcategory/Makefile</code>.</p>
+ <p>Remove from <tt class=
+ "filename">oldcategory/Makefile</tt>.</p>
</li>
<li>
- <p>Add to <code class=
- "filename">newcategory/Makefile</code>.</p>
+ <p>Add to <tt class=
+ "filename">newcategory/Makefile</tt>.</p>
</li>
<li>
<p>Commit the changed and removed files:</p>
<pre class="screen">
-<code class="prompt">%</code> <strong class=
-"userinput"><code>cvs commit oldcategory/package oldcategory/Makefile newcategory/Makefile</code></strong>
+<tt class="prompt">%</tt> <b class=
+"userinput"><tt>cvs commit oldcategory/package oldcategory/Makefile newcategory/Makefile</tt></b>
</pre>
<p>(and any packages from step 5, of course).</p>
@@ -10472,45 +10438,43 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2594765">A.1.
+ <dt><span class="sect1"><a href="#id2575345">A.1.
files</a></span></dt>
<dd>
<dl>
- <dt><span class="sect2"><a href="#id2594769">A.1.1.
+ <dt><span class="sect2"><a href="#id2575348">A.1.1.
Makefile</a></span></dt>
- <dt><span class="sect2"><a href="#id2594776">A.1.2.
+ <dt><span class="sect2"><a href="#id2575355">A.1.2.
DESCR</a></span></dt>
- <dt><span class="sect2"><a href="#id2594791">A.1.3.
+ <dt><span class="sect2"><a href="#id2575370">A.1.3.
PLIST</a></span></dt>
- <dt><span class="sect2"><a href="#id2594798">A.1.4.
- Checking a package with <span><strong class=
- "command">pkglint</strong></span></a></span></dt>
+ <dt><span class="sect2"><a href="#id2575378">A.1.4.
+ Checking a package with pkglint</a></span></dt>
</dl>
</dd>
- <dt><span class="sect1"><a href="#id2594839">A.2. Steps
+ <dt><span class="sect1"><a href="#id2575418">A.2. Steps
for building, installing, packaging</a></span></dt>
</dl>
</div>
<p>We checked to find a piece of software that wasn't in the
packages collection, and picked GNU bison. Quite why someone
- would want to have <span><strong class=
- "command">bison</strong></span> when Berkeley
- <span><strong class="command">yacc</strong></span> is already
- present in the tree is beyond us, but it's useful for the
- purposes of this exercise.</p>
+ would want to have <span><b class="command">bison</b></span>
+ when Berkeley <span><b class="command">yacc</b></span> is
+ already present in the tree is beyond us, but it's useful for
+ the purposes of this exercise.</p>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2594765" id="id2594765"></a>A.1.&nbsp;files</h2>
+ "id2575345" id="id2575345"></a>A.1.&nbsp;files</h2>
</div>
</div>
</div>
@@ -10519,8 +10483,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2594769" id=
- "id2594769"></a>A.1.1.&nbsp;Makefile</h3>
+ <h3 class="title"><a name="id2575348" id=
+ "id2575348"></a>A.1.1.&nbsp;Makefile</h3>
</div>
</div>
</div>
@@ -10547,8 +10511,8 @@ INFO_FILES= bison.info
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2594776" id=
- "id2594776"></a>A.1.2.&nbsp;DESCR</h3>
+ <h3 class="title"><a name="id2575355" id=
+ "id2575355"></a>A.1.2.&nbsp;DESCR</h3>
</div>
</div>
</div>
@@ -10564,8 +10528,8 @@ of the NetBSD source tree is beyond me.
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2594791" id=
- "id2594791"></a>A.1.3.&nbsp;PLIST</h3>
+ <h3 class="title"><a name="id2575370" id=
+ "id2575370"></a>A.1.3.&nbsp;PLIST</h3>
</div>
</div>
</div>
@@ -10582,10 +10546,9 @@ share/bison.hairy
<div class="titlepage">
<div>
<div>
- <h3 class="title"><a name="id2594798" id=
- "id2594798"></a>A.1.4.&nbsp;Checking a package with
- <span><strong class=
- "command">pkglint</strong></span></h3>
+ <h3 class="title"><a name="id2575378" id=
+ "id2575378"></a>A.1.4.&nbsp;Checking a package with
+ <span><b class="command">pkglint</b></span></h3>
</div>
</div>
</div>
@@ -10593,15 +10556,13 @@ share/bison.hairy
<p>The NetBSD package system comes with <a xmlns=
"http://www.w3.org/TR/xhtml1/transitional" href=
"ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/pkglint/README.html"
- class="pkgname">pkgtools/pkglint</a> which helps to check
- the contents of these files. After installation it is
- quite easy to use, just change to the directory of the
- package you wish to examine and execute
- <span><strong class=
- "command">pkglint</strong></span>:</p>
+ class="pkgname">pkgtools/pkglint</a> which helps to
+ check the contents of these files. After installation
+ it is quite easy to use, just change to the directory
+ of the package you wish to examine and execute
+ <span><b class="command">pkglint</b></span>:</p>
<pre class="screen">
-<code class="prompt">$</code> <strong class=
-"userinput"><code>pkglint</code></strong>
+<tt class="prompt">$</tt> <b class="userinput"><tt>pkglint</tt></b>
OK: checking ./DESCR.
OK: checking Makefile.
OK: checking distinfo.
@@ -10611,8 +10572,8 @@ looks fine.
<p>Depending on the supplied command line arguments (see
pkglint(1)) more verbose checks will be performed. Use
- e.g. <span><strong class="command">pkglint
- -v</strong></span> for a very verbose check.</p>
+ e.g. <span><b class="command">pkglint -v</b></span> for a
+ very verbose check.</p>
</div>
</div>
@@ -10621,7 +10582,7 @@ looks fine.
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2594839" id="id2594839"></a>A.2.&nbsp;Steps for
+ "id2575418" id="id2575418"></a>A.2.&nbsp;Steps for
building, installing, packaging</h2>
</div>
</div>
@@ -10630,26 +10591,26 @@ looks fine.
<p>Create the directory where the package lives, plus any
auxiliary directories:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd /usr/pkgsrc/lang</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mkdir bison</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>cd bison</code></strong>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>mkdir patches</code></strong>
-</pre>
-
- <p>Create <code class="filename">Makefile</code>,
- <code class="filename">DESCR</code> and <code class=
- "filename">PLIST</code> (see <a href="#components" title=
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd /usr/pkgsrc/lang</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mkdir bison</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>cd bison</tt></b>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>mkdir patches</tt></b>
+</pre>
+
+ <p>Create <tt class="filename">Makefile</tt>, <tt class=
+ "filename">DESCR</tt> and <tt class="filename">PLIST</tt>
+ (see <a href="#components" title=
"Chapter&nbsp;7.&nbsp;Package components - files, directories and contents">
Chapter 7, <i>Package components - files, directories and
contents</i></a>) then continue with fetching the
distfile:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make fetch</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make fetch</tt></b>
&gt;&gt; bison-1.25.tar.gz doesn't seem to exist on this system.
&gt;&gt; Attempting to fetch from ftp://prep.ai.mit.edu/pub/gnu//.
Requesting ftp://prep.ai.mit.edu/pub/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/)
@@ -10664,17 +10625,16 @@ Requesting ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//bison-1.25.tar.gz (via f
Successfully retrieved file.
</pre>
- <p>Generate the checksum of the distfile into <code class=
- "filename">distinfo</code>:</p>
+ <p>Generate the checksum of the distfile into <tt class=
+ "filename">distinfo</tt>:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make makesum</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make makesum</tt></b>
</pre>
<p>Now compile:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make</code></strong>
+<tt class="prompt">#</tt> <b class="userinput"><tt>make</tt></b>
&gt;&gt; Checksum OK for bison-1.25.tar.gz.
===&gt; Extracting for bison-1.25
===&gt; Patching for bison-1.25
@@ -10729,8 +10689,8 @@ sed -e "/^#line/ s|bison|/usr/pkg/share/bison|" &lt; ./bison.simple &gt; bison.s
<p>Everything seems OK, so install the files:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make install</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make install</tt></b>
&gt;&gt; Checksum OK for bison-1.25.tar.gz.
===&gt; Installing for bison-1.25
sh ./mkinstalldirs /usr/pkg/bin /usr/pkg/share /usr/pkg/info /usr/pkg/man/man1
@@ -10746,12 +10706,12 @@ cd .; for f in bison.info*; do /usr/bin/install -c -o bin -g bin -m 644 $f /usr
</pre>
<p>You can now use bison, and also - if you decide so -
- remove it with <span><strong class="command">pkg_delete
- bison</strong></span>. Should you decide that you want a
- binary package, do this now:</p>
+ remove it with <span><b class="command">pkg_delete
+ bison</b></span>. Should you decide that you want a binary
+ package, do this now:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make package</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make package</tt></b>
&gt;&gt; Checksum OK for bison-1.25.tar.gz.
===&gt; Building package for bison-1.25
Creating package bison-1.25.tgz
@@ -10762,8 +10722,8 @@ Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'
<p>Now that you don't need the source and object files any
more, clean up:</p>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make clean</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make clean</tt></b>
===&gt; Cleaning for bison-1.25
</pre>
</div>
@@ -10802,8 +10762,7 @@ Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'
</div>
</div>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make</code></strong>
+<tt class="prompt">#</tt> <b class="userinput"><tt>make</tt></b>
===&gt; Checking for vulnerabilities in figlet-2.2.1nb2
=&gt; figlet221.tar.gz doesn't seem to exist on this system.
=&gt; Attempting to fetch figlet221.tar.gz from ftp://ftp.figlet.org/pub/figlet/program/unix/.
@@ -10874,9 +10833,9 @@ gcc -O2 -DDEFAULTFONTDIR=\"/usr/pkg/share/figlet\" -DDEFAULTFONTFILE=\"standard
chmod a+x figlet
gcc -O2 -o chkfont chkfont.c
=&gt; Unwrapping files-to-be-installed.
-<code class="prompt">#</code>
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make install</code></strong>
+<tt class="prompt">#</tt>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make install</tt></b>
===&gt; Checking for vulnerabilities in figlet-2.2.1nb2
===&gt; Installing for figlet-2.2.1nb2
install -d -o root -g wheel -m 755 /usr/pkg/bin
@@ -10891,7 +10850,7 @@ cp fonts/*.flf /usr/pkg/share/figlet
cp fonts/*.flc /usr/pkg/share/figlet
cp figlet.6 /usr/pkg/man/man6
===&gt; Registering installation for figlet-2.2.1nb2
-<code class="prompt">#</code>
+<tt class="prompt">#</tt>
</pre>
</div>
@@ -10906,15 +10865,15 @@ cp figlet.6 /usr/pkg/man/man6
</div>
</div>
<pre class="screen">
-<code class="prompt">#</code> <strong class=
-"userinput"><code>make package</code></strong>
+<tt class="prompt">#</tt> <b class=
+"userinput"><tt>make package</tt></b>
===&gt; Checking for vulnerabilities in figlet-2.2.1nb2
===&gt; Packaging figlet-2.2.1nb2
===&gt; Building binary package for figlet-2.2.1nb2
Creating package /home/cvs/pkgsrc/packages/i386/All/figlet-2.2.1nb2.tgz
Using SrcDir value of /usr/pkg
Registering depends:.
-<code class="prompt">#</code>
+<tt class="prompt">#</tt>
</pre>
</div>
</div>
@@ -11008,7 +10967,7 @@ Registering depends:.
<p>Upload /usr/pkgsrc/packages to</p>
<pre class="programlisting">
ftp://ftp.NetBSD.org/pub/NetBSD/packages/\
- pkgsrc-2004Q3/\ # pkgsrc-branch
+ pkgsrc-2004Q4/\ # pkgsrc-branch
`uname -s`-`uname -r`/ # OS &amp; version
`uname -p` # architecture
@@ -11016,9 +10975,9 @@ Registering depends:.
</li>
<li>
- <p>If necessary, create a symlink <span><strong class=
- "command">ln -s `uname -m` `uname -p`</strong></span>
- (amiga -&gt; m68k, ...)</p>
+ <p>If necessary, create a symlink <span><b class=
+ "command">ln -s `uname -m` `uname -p`</b></span> (amiga
+ -&gt; m68k, ...)</p>
</li>
</ol>
</div>
@@ -11039,10 +10998,10 @@ Registering depends:.
<p><b>Table of Contents</b></p>
<dl>
- <dt><span class="sect1"><a href="#id2595758">D.1.
+ <dt><span class="sect1"><a href="#id2576133">D.1.
Targets</a></span></dt>
- <dt><span class="sect1"><a href="#id2595829">D.2.
+ <dt><span class="sect1"><a href="#id2576408">D.2.
Procedure</a></span></dt>
</dl>
</div>
@@ -11055,32 +11014,31 @@ Registering depends:.
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2595758" id="id2595758"></a>D.1.&nbsp;Targets</h2>
+ "id2576133" id="id2576133"></a>D.1.&nbsp;Targets</h2>
</div>
</div>
</div>
- <p>The pkgsrc guide's source code is stored in <code class=
- "filename">pkgsrc/doc/guide/files</code>, and several files
+ <p>The pkgsrc guide's source code is stored in <tt class=
+ "filename">pkgsrc/doc/guide/files</tt>, and several files
are created from it:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
- <p><code class=
- "filename">pkgsrc/doc/pkgsrc.txt</code>, which
- replaces <code class=
- "filename">pkgsrc/Packages.txt</code></p>
+ <p><tt class="filename">pkgsrc/doc/pkgsrc.txt</tt>,
+ which replaces <tt class=
+ "filename">pkgsrc/Packages.txt</tt></p>
</li>
<li>
- <p><code class=
- "filename">pkgsrc/doc/pkgsrc.html</code></p>
+ <p><tt class=
+ "filename">pkgsrc/doc/pkgsrc.html</tt></p>
</li>
<li>
- <p><code class=
- "filename">http://www.NetBSD.org/Documentation/pkgsrc/</code>:
+ <p><tt class=
+ "filename">http://www.NetBSD.org/Documentation/pkgsrc/</tt>:
the documentation on the NetBSD website will be built
from pkgsrc and kept up to date on the web server
itself. This means you <span class=
@@ -11089,14 +11047,14 @@ Registering depends:.
</li>
<li>
- <p><code class=
- "filename">http://www.NetBSD.org/Documentation/pkgsrc/pkgsrc.pdf</code>:
+ <p><tt class=
+ "filename">http://www.NetBSD.org/Documentation/pkgsrc/pkgsrc.pdf</tt>:
PDF version of the pkgsrc guide.</p>
</li>
<li>
- <p><code class=
- "filename">http://www.NetBSD.org/Documentation/pkgsrc/pkgsrc.ps</code>:
+ <p><tt class=
+ "filename">http://www.NetBSD.org/Documentation/pkgsrc/pkgsrc.ps</tt>:
PostScript version of the pkgsrc guide.</p>
</li>
</ul>
@@ -11108,8 +11066,8 @@ Registering depends:.
<div>
<div>
<h2 class="title" style="clear: both"><a name=
- "id2595829" id=
- "id2595829"></a>D.2.&nbsp;Procedure</h2>
+ "id2576408" id=
+ "id2576408"></a>D.2.&nbsp;Procedure</h2>
</div>
</div>
</div>
@@ -11129,62 +11087,58 @@ Registering depends:.
PostScript- and PDF version. You will need both
packages installed, to make sure documentation is
consistent across all formats. The packages can be
- found in <code class=
- "filename">pkgsrc/meta-pkgs/netbsd-doc</code> and
- <code class=
- "filename">pkgsrc/meta-pkgs/netbsd-doc-print</code>.</p>
+ found in <tt class=
+ "filename">pkgsrc/meta-pkgs/netbsd-doc</tt> and
+ <tt class=
+ "filename">pkgsrc/meta-pkgs/netbsd-doc-print</tt>.</p>
</li>
<li>
- <p>Edit the XML file(s) in <code class=
- "filename">pkgsrc/doc/guide/files</code>.</p>
+ <p>Edit the XML file(s) in <tt class=
+ "filename">pkgsrc/doc/guide/files</tt>.</p>
</li>
<li>
- <p>Run <span><strong class="command">make extract
- &amp;&amp; make do-lint</strong></span> in
- <code class="filename">pkgsrc/doc/guide</code> to
- check the XML syntax, and fix it if needed.</p>
+ <p>Run <span><b class="command">make extract
+ &amp;&amp; make do-lint</b></span> in <tt class=
+ "filename">pkgsrc/doc/guide</tt> to check the XML
+ syntax, and fix it if needed.</p>
</li>
<li>
- <p>Run <span><strong class=
- "command">make</strong></span> in <code class=
- "filename">pkgsrc/doc/guide</code> to build the HTML
- and ASCII version.</p>
+ <p>Run <span><b class="command">make</b></span> in
+ <tt class="filename">pkgsrc/doc/guide</tt> to build
+ the HTML and ASCII version.</p>
</li>
<li>
- <p>If all is well, run <span><strong class=
- "command">make install-doc</strong></span> to put the
- generated files into <code class=
- "filename">pkgsrc/doc</code>.</p>
+ <p>If all is well, run <span><b class="command">make
+ install-doc</b></span> to put the generated files
+ into <tt class="filename">pkgsrc/doc</tt>.</p>
</li>
<li>
- <p><span><strong class="command">cvs commit
- pkgsrc/doc/guide/files</strong></span></p>
+ <p><span><b class="command">cvs commit
+ pkgsrc/doc/guide/files</b></span></p>
</li>
<li>
- <p><span><strong class="command">cvs commit -m
- re-generate
- pkgsrc/doc/pkgsrc.{html,txt}</strong></span></p>
+ <p><span><b class="command">cvs commit -m re-generate
+ pkgsrc/doc/pkgsrc.{html,txt}</b></span></p>
</li>
<li>
<p>Until the webserver on www.NetBSD.org is really
updated automatically to pick up changes to the
- pkgsrc guide automatically, also run
- <span><strong class="command">make install-htdoc
- HTDOCSDIR=../../../htdocs</strong></span> (or
- similar, adjust <code class=
- "varname">HTDOCSDIR</code>!).</p>
+ pkgsrc guide automatically, also run <span><b class=
+ "command">make install-htdoc
+ HTDOCSDIR=../../../htdocs</b></span> (or similar,
+ adjust <tt class="varname">HTDOCSDIR</tt>!).</p>
</li>
<li>
- <p><span><strong class="command">cvs commit
- htdocs/Documentation/pkgsrc</strong></span></p>
+ <p><span><b class="command">cvs commit
+ htdocs/Documentation/pkgsrc</b></span></p>
</li>
</ul>
</div>
diff --git a/doc/pkgsrc.txt b/doc/pkgsrc.txt
index fe3c186478e..6bae26c4ca0 100644
--- a/doc/pkgsrc.txt
+++ b/doc/pkgsrc.txt
@@ -27,53 +27,53 @@ creating new packages.
Table of Contents
1. Introduction
-
+
1.1. Introduction
1.2. Overview
1.3. Terminology
1.4. Typography
-
+
I. The pkgsrc user's guide
-
+
2. Where to get pkgsrc
-
+
2.1. As tar file
2.2. Via SUP
2.3. Via CVS
-
+
3. Using pkgsrc on systems other than NetBSD
-
+
3.1. Bootstrapping pkgsrc
3.2. Platform specific notes
-
+
3.2.1. Darwin (Mac OS X)
3.2.2. FreeBSD
3.2.3. Interix
3.2.4. IRIX
3.2.5. OpenBSD
3.2.6. Solaris
-
+
4. Using pkgsrc
-
+
4.1. Working with binary packages
-
+
4.1.1. Where to get binary packages
4.1.2. How to use binary packages
4.1.3. A word of warning
-
+
4.2. Building packages from source
-
+
4.2.1. Requirements
4.2.2. Fetching distfiles
4.2.3. How to build and install
4.2.4. Selecting the compiler
-
+
5. Creating binary packages
-
+
5.1. Building a single binary package
5.2. Settings for creation of binary packages
5.3. Doing a bulk build of all packages
-
+
5.3.1. Configuration
5.3.2. Other environmental considerations
5.3.3. Operation
@@ -81,13 +81,14 @@ I. The pkgsrc user's guide
5.3.5. Disk space requirements
5.3.6. Setting up a sandbox for chroot'ed builds
5.3.7. Building a partial set of packages
-
+ 5.3.8. Uploading results of a bulk build
+
5.4. Creating a multiple CD-ROM packages collection
-
+
5.4.1. Example of cdpack
-
+
6. Frequently Asked Questions
-
+
6.1. Is there a mailing list for pkg-related discussion?
6.2. Where's the pkgviews documentation?
6.3. Utilities for package management (pkgtools)
@@ -97,17 +98,16 @@ I. The pkgsrc user's guide
6.7. How to fetch files from behind a firewall
6.8. How do I tell make fetch to do passive FTP?
6.9. How to fetch all distfiles at once
- 6.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc"
- mean?
- 6.11. What does "Could not find bsd.own.mk" mean?
+ 6.10. What does Don't know how to make /usr/share/tmac/tmac.andoc mean?
+ 6.11. What does Could not find bsd.own.mk mean?
6.12. Using 'sudo' with pkgsrc
6.13. Configuration files handling and placement
6.14. Automated security checks
-
+
II. The pkgsrc developer's guide
-
+
7. Package components - files, directories and contents
-
+
7.1. Makefile
7.2. distinfo
7.3. patches/*
@@ -115,9 +115,9 @@ II. The pkgsrc developer's guide
7.5. Optional files
7.6. work*
7.7. files/*
-
+
8. PLIST issues
-
+
8.1. RCS ID
8.2. Semi-automatic PLIST generation
8.3. Tweaking output of make print-PLIST
@@ -126,35 +126,35 @@ II. The pkgsrc developer's guide
8.6. Changing PLIST source with PLIST_SRC
8.7. Platform specific and differing PLISTs
8.8. Sharing directories between packages
-
+
9. Buildlink methodology
-
+
9.1. Converting packages to use buildlink3
9.2. Writing buildlink3.mk files
-
+
9.2.1. Anatomy of a buildlink3.mk file
9.2.2. Updating BUILDLINK_DEPENDS.pkg in buildlink3.mk files
-
+
9.3. Writing builtin.mk files
-
+
9.3.1. Anatomy of a builtin.mk file
9.3.2. Global preferences for native or pkgsrc software
-
+
10. Options handling
-
+
10.1. Global default options
10.2. Converting packages to use bsd.options.mk
-
+
11. The build process
-
+
11.1. Program location
11.2. Main targets
11.3. Other helpful targets
-
+
12. Notes on fixes for packages
-
+
12.1. General operation
-
+
12.1.1. How to pull in variables from /etc/mk.conf
12.1.2. Restricted packages
12.1.3. Handling dependencies
@@ -166,25 +166,25 @@ II. The pkgsrc developer's guide
12.1.9. How to handle incrementing versions when fixing an existing
package
12.1.10. Portability of packages
-
+
12.2. Possible downloading issues
-
+
12.2.1. Packages whose distfiles aren't available for plain
downloading
12.2.2. How to handle modified distfiles with the 'old' name
-
+
12.3. Configuration gotchas
-
+
12.3.1. Shared libraries - libtool
12.3.2. Using libtool on GNU packages that already support libtool
12.3.3. GNU Autoconf/Automake
-
+
12.4. Building considerations
-
+
12.4.1. CPP defines
-
+
12.5. Package specific actions
-
+
12.5.1. Package configuration files
12.5.2. User interaction
12.5.3. Handling licenses
@@ -202,39 +202,39 @@ II. The pkgsrc developer's guide
12.5.15. Packages installing SGML or XML data
12.5.16. Packages installing extensions to the MIME database
12.5.17. Packages using intltool
-
+
12.6. Feedback to the author
-
+
13. Debugging
14. Submitting and Committing
-
+
14.1. Submitting your packages
14.2. Committing: Importing a package into CVS
14.3. Updating a package to a newer version
14.4. Moving a package in pkgsrc
-
+
A. A simple example package: bison
-
+
A.1. files
-
+
A.1.1. Makefile
A.1.2. DESCR
A.1.3. PLIST
A.1.4. Checking a package with pkglint
-
+
A.2. Steps for building, installing, packaging
-
+
B. Build logs
-
+
B.1. Building figlet
B.2. Packaging figlet
-
+
C. Layout of the FTP server's package archive
D. Editing guidelines for the pkgsrc guide
-
+
D.1. Targets
D.2. Procedure
-
+
Chapter 1. Introduction
Table of Contents
@@ -261,13 +261,13 @@ descriptions are all simple.
pkgsrc currently contains several thousand packages, including:
* www/apache - The Apache web server
-
+
* www/mozilla - The Mozilla web browser
-
+
* meta-pkgs/gnome - The GNOME Desktop Environment
-
+
* meta-pkgs/kde3 - The K Desktop Environment
-
+
...just to name a few.
pkgsrc has built-in support for handling varying dependencies, such as pthreads
@@ -278,23 +278,23 @@ NetBSD only. Since then, pkgsrc has grown a lot, and now supports the following
platforms:
* Darwin (Mac OS X)
-
+
* DragonFlyBSD
-
+
* FreeBSD
-
+
* Microsoft Windows, via Interix
-
+
* IRIX
-
+
* Linux
-
+
* NetBSD (of course)
-
+
* OpenBSD
-
+
* Solaris
-
+
1.2. Overview
This document is divided into two parts. The first, The pkgsrc user's guide,
@@ -307,59 +307,59 @@ users without knowing about the package's building details.
This document is available in various formats:
* HTML
-
+
* PDF
-
+
* PS
-
+
* TXT
-
+
1.3. Terminology
There has been a lot of talk about "ports", "packages", etc. so far. Here is a
description of all the terminology used within this document.
Package
-
+
A set of files and building instructions that describe what's necessary to
build a certain piece of software using pkgsrc. Packages are traditionally
stored under /usr/pkgsrc.
-
+
The NetBSD package system
-
+
This is the former name of "pkgsrc". It is part of the NetBSD operating
system and can be bootstrap to run on non-NetBSD operating systems as well.
It handles building (compiling), installing, and removing of packages.
-
+
Distfile
-
+
This term describes the file or files that are provided by the author of
the piece of software to distribute his work. All the changes necessary to
build on NetBSD are reflected in the corresponding package. Usually the
distfile is in the form of a compressed tar-archive, but other types are
possible, too. Distfiles are usually stored below /usr/pkgsrc/distfiles.
-
+
Port
-
+
This is the term used by FreeBSD and OpenBSD people for what we call a
package. In NetBSD terminology, "port" refers to a different architecture.
-
+
Precompiled/binary package
-
+
A set of binaries built with pkgsrc from a distfile and stuffed together in
a single .tgz file so it can be installed on machines of the same machine
architecture without the need to recompile. Packages are usually generated
in /usr/pkgsrc/packages; there is also an archive on ftp.NetBSD.org.
-
+
Sometimes, this is referred to by the term "package" too, especially in the
context of precompiled packages.
-
+
Program
-
+
The piece of software to be installed which will be constructed from all
the files in the Distfile by the actions defined in the corresponding
package.
-
+
1.4. Typography
When giving examples for commands, shell prompts are used to show if the
@@ -372,44 +372,44 @@ The pkgsrc user's guide
Table of Contents
2. Where to get pkgsrc
-
+
2.1. As tar file
2.2. Via SUP
2.3. Via CVS
-
+
3. Using pkgsrc on systems other than NetBSD
-
+
3.1. Bootstrapping pkgsrc
3.2. Platform specific notes
-
+
3.2.1. Darwin (Mac OS X)
3.2.2. FreeBSD
3.2.3. Interix
3.2.4. IRIX
3.2.5. OpenBSD
3.2.6. Solaris
-
+
4. Using pkgsrc
-
+
4.1. Working with binary packages
-
+
4.1.1. Where to get binary packages
4.1.2. How to use binary packages
4.1.3. A word of warning
-
+
4.2. Building packages from source
-
+
4.2.1. Requirements
4.2.2. Fetching distfiles
4.2.3. How to build and install
4.2.4. Selecting the compiler
-
+
5. Creating binary packages
-
+
5.1. Building a single binary package
5.2. Settings for creation of binary packages
5.3. Doing a bulk build of all packages
-
+
5.3.1. Configuration
5.3.2. Other environmental considerations
5.3.3. Operation
@@ -417,13 +417,14 @@ Table of Contents
5.3.5. Disk space requirements
5.3.6. Setting up a sandbox for chroot'ed builds
5.3.7. Building a partial set of packages
-
+ 5.3.8. Uploading results of a bulk build
+
5.4. Creating a multiple CD-ROM packages collection
-
+
5.4.1. Example of cdpack
-
+
6. Frequently Asked Questions
-
+
6.1. Is there a mailing list for pkg-related discussion?
6.2. Where's the pkgviews documentation?
6.3. Utilities for package management (pkgtools)
@@ -433,12 +434,12 @@ Table of Contents
6.7. How to fetch files from behind a firewall
6.8. How do I tell make fetch to do passive FTP?
6.9. How to fetch all distfiles at once
- 6.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
- 6.11. What does "Could not find bsd.own.mk" mean?
+ 6.10. What does Don't know how to make /usr/share/tmac/tmac.andoc mean?
+ 6.11. What does Could not find bsd.own.mk mean?
6.12. Using 'sudo' with pkgsrc
6.13. Configuration files handling and placement
6.14. Automated security checks
-
+
Chapter 2. Where to get pkgsrc
Table of Contents
@@ -493,14 +494,14 @@ Table of Contents
3.1. Bootstrapping pkgsrc
3.2. Platform specific notes
-
+
3.2.1. Darwin (Mac OS X)
3.2.2. FreeBSD
3.2.3. Interix
3.2.4. IRIX
3.2.5. OpenBSD
3.2.6. Solaris
-
+
3.1. Bootstrapping pkgsrc
For Operating Systems other than NetBSD, we provide a bootstrap kit to build
@@ -509,19 +510,19 @@ NetBSD, pkgsrc and the bootstrap kit have support for the following operating
systems:
* Darwin (Mac OS X)
-
+
* FreeBSD
-
+
* Interix (Windows 2000, XP, 2003)
-
+
* IRIX
-
+
* Linux
-
+
* OpenBSD
-
+
* Solaris
-
+
Support for other platforms is under development.
Installing the bootstrap kit should be as simple as:
@@ -537,7 +538,7 @@ package database directory where pkgsrc will do it's internal bookkeeping.
However, these can also be set using command-line parameters.
Binary packages for the pkgsrc tools and an initial set of packages is
-available for supported platforms. An up-to-date list of these can be found on
+available for supported platforms. An up-to-date list of these can be found on
www.pkgsrc.org.
3.2. Platform specific notes
@@ -551,7 +552,7 @@ OS X, by using a disk image, or a UFS partition.
Before you start, you will need to download and install the Mac OS X Developer
Tools from Apple's Developer Connection. See http://developer.apple.com/macosx/
-for details. Also, make sure you install X11 for Mac OS X and the X11 SDK from
+for details. Also, make sure you install X11 for Mac OS X and the X11 SDK from
http://www.apple.com/macosx/x11/download/ if you intend to build packages that
use the X11 Window System.
@@ -619,25 +620,25 @@ with the FreeBSD userland tools. There are several steps:
1. FreeBSD stores its ports pkg database in /var/db/pkg. It is therefore
recommended that you choose a different location (e.g. /usr/pkgdb) by using
the --pkgdbdir option to the bootstrap script.
-
+
2. If you do not intend to use the FreeBSD ports tools, it's probably a good
idea to move them out of the way to avoid confusion, e.g.
-
+
# cd /usr/sbin
# mv pkg_add pkg_add.orig
# mv pkg_create pkg_create.orig
# mv pkg_delete pkg_delete.orig
# mv pkg_info pkg_info.orig
-
+
3. An example /etc/mk.conf file will be placed in /etc/mk.conf.example file
when you use the bootstrap script.
-
+
3.2.3. Interix
Interix is a POSIX compatible subsystem for the Windows NT kernel, providing a
Unix-like environment with a tighter kernel integration than available with
Cygwin. It is part of the Windows Services for Unix package, available for free
-for any licensed copy of Windows 2000, XP, or 2003. SFU can be downloaded from
+for any licensed copy of Windows 2000, XP, or 2003. SFU can be downloaded from
http://www.microsoft.com/windows/sfu/.
Services for Unix 3.5, current as of this writing, has been tested. 3.0 or 3.1
@@ -650,13 +651,13 @@ At an absolute minimum, the following packages must be installed from the
Windows Services for Unix 3.5 distribution in order to use pkgsrc:
* Utilities -> Base Utilities
-
+
* Interix GNU Components -> (all)
-
+
* Remote Connectivity
-
+
* Interix SDK
-
+
When using pkgsrc on Interix, DO NOT install the Utilities subcomponent "UNIX
Perl". That is Perl 5.6 without shared module support, installed to /usr/local,
and will only cause confusion. Instead, install Perl 5.8 from pkgsrc (or from a
@@ -679,21 +680,21 @@ pkgsrc, note the following things.
* To uninstall UNIX Perl, use Add/Remove Programs, select Microsoft Windows
Services for UNIX, then click Change. In the installer, choose Add or
Remove, then uncheck Utilities->UNIX Perl.
-
+
* To enable case-sensitivity for the filesystem, run REGEDIT.EXE, and change
the following registry key:
-
+
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel
-
+
Set the DWORD value "obcaseinsensitive" to 0; then reboot.
-
+
* To enable setuid binaries (optional), run REGEDIT.EXE, and change the
following registry key:
-
+
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Services for UNIX
-
+
Set the DWORD value "EnableSetuidBinaries" to 1; then reboot.
-
+
3.2.3.3. Important notes for using pkgsrc
The package imanager (either the pkgsrc "su" user, or the user running
@@ -752,27 +753,27 @@ with the OpenBSD userland tools. There are several steps:
1. OpenBSD stores its ports pkg database in /var/db/pkg. It is therefore
recommended that you choose a different location (e.g. /usr/pkgdb) by using
the --pkgdbdir option to the bootstrap script.
-
+
2. If you do not intend to use the OpenBSD ports tools, it's probably a good
idea to move them out of the way to avoid confusion, e.g.
-
+
# cd /usr/sbin
# mv pkg_add pkg_add.orig
# mv pkg_create pkg_create.orig
# mv pkg_delete pkg_delete.orig
# mv pkg_info pkg_info.orig
-
+
3. An example /etc/mk.conf file will be placed in /etc/mk.conf.example file
when you use the bootstrap script. OpenBSD's make program uses /etc/mk.conf
as well. You can work around this by enclosing all the pkgsrc specific
parts of the file with:
-
+
.ifdef BSD_PKG_MK
# pkgsrc stuff, e.g. insert defaults/mk.conf or similar here
.else
# OpenBSD stuff
.endif
-
+
3.2.6. Solaris
@@ -783,15 +784,15 @@ The following packages are required on Solaris 8 for the bootstrap process and
to build packages.
* SUNWsprot
-
+
* SUNWarc
-
+
* SUNWbtool
-
+
* SUNWtoo
-
+
* SUNWlibm
-
+
Please note the use of GNU binutils on Solaris is not supported.
3.2.6.1. If you are using gcc
@@ -811,13 +812,13 @@ freewareSearch.html.
You will need at least the following packages installed (from WorkShop 5.0)
* SPROcc - Sun WorkShop Compiler C 5.0
-
+
* SPROcpl - Sun WorkShop Compiler C++ 5.0
-
+
* SPROild - Sun WorkShop Incremental Linker
-
+
* SPROlang - Sun WorkShop Compilers common components
-
+
You should set CC, CXX and optionally, CPP in /etc/mk.conf, eg.
CC= cc
@@ -836,18 +837,18 @@ Chapter 4. Using pkgsrc
Table of Contents
4.1. Working with binary packages
-
+
4.1.1. Where to get binary packages
4.1.2. How to use binary packages
4.1.3. A word of warning
-
+
4.2. Building packages from source
-
+
4.2.1. Requirements
4.2.2. Fetching distfiles
4.2.3. How to build and install
4.2.4. Selecting the compiler
-
+
4.1. Working with binary packages
This section describes how to find, retrieve and install a precompiled binary
@@ -909,7 +910,7 @@ the "xbase" and "xcomp" distribution sets are required, too.
4.2.2. Fetching distfiles
The distfile (i.e. the unmodified source) must exist on your system for the
-packages system to be able to build it. If it does not exist, pkgsrc will use
+packages system to be able to build it. If it does not exist, pkgsrc will use
ftp(1) to fetch it automatically.
You can overwrite some of the major distribution sites to fit to sites that are
@@ -969,21 +970,21 @@ added to help with this.
1. If you invoke the make(1) command with PKG_DEBUG_LEVEL=2, then a huge
amount of information will be displayed. For example,
-
+
make patch PKG_DEBUG_LEVEL=2
-
+
will show all the commands that are invoked, up to and including the
"patch" stage.
-
+
2. If you want to know the value of a certain make(1) definition, then the
VARNAME definition should be used, in conjunction with the show-var target.
e.g. to show the expansion of the make(1) variable DISTFILES:
-
+
% make show-var VARNAME=LOCALBASE
/usr/pkg
%
-
-
+
+
If you want to install a binary package that you've either created yourself
(see next section), that you put into pkgsrc/packages manually or that is
@@ -1008,32 +1009,32 @@ By default, pkgsrc will use GCC to build packages. This may be overridden by
setting the following variables in /etc/mk.conf:
PKGSRC_COMPILER:
-
+
This is a list of values specifying the chain of compilers to invoke when
building packages. Valid values are:
-
+
* distcc: distributed C/C++ (chainable)
-
+
* ccache: compiler cache (chainable)
-
+
* gcc: GNU C/C++ Compiler
-
+
* mipspro: Silicon Graphics, Inc. MIPSpro (n32/n64)
-
+
* mipspro: Silicon Graphics, Inc. MIPSpro (o32)
-
+
* sunpro: Microsystems, Inc. WorkShip/Forte/Sun ONE Studio
-
+
The default is "gcc". You can use ccache and/or distcc with an appropriate
PKGSRC_COMPILER setting, e.g. "ccache gcc". This variable should always be
terminated with a value for a real compiler.
-
+
GCC_REQD:
-
+
This specifies the minimum version of GCC to use when building packages. If
the system GCC doesn't satisfy this requirement, then pkgsrc will build and
install one of the GCC packages to use instead.
-
+
Chapter 5. Creating binary packages
Table of Contents
@@ -1041,7 +1042,7 @@ Table of Contents
5.1. Building a single binary package
5.2. Settings for creation of binary packages
5.3. Doing a bulk build of all packages
-
+
5.3.1. Configuration
5.3.2. Other environmental considerations
5.3.3. Operation
@@ -1049,11 +1050,12 @@ Table of Contents
5.3.5. Disk space requirements
5.3.6. Setting up a sandbox for chroot'ed builds
5.3.7. Building a partial set of packages
-
+ 5.3.8. Uploading results of a bulk build
+
5.4. Creating a multiple CD-ROM packages collection
-
+
5.4.1. Example of cdpack
-
+
5.1. Building a single binary package
Once you have built and installed a package, you can create a binary package
@@ -1133,7 +1135,7 @@ nearly 3 GB of disk space.
As /usr/pkg will be completely deleted at the start of bulk builds, make sure
your login shell is placed somewhere else. Either drop it into /usr/local/bin
-(and adjust your login shell in the passwd file), or (re-)install it via
+(and adjust your login shell in the passwd file), or (re-)install it via
pkg_add(1) from /etc/rc.local, so you can login after a reboot (remember that
your current process won't die if the package is removed, you just can't start
any new instances of the shell any more). Also, if you use NetBSD earlier than
@@ -1176,22 +1178,22 @@ logs in the directory specified by FTP in the build.conf file.
The bulk builds consist of three steps:
1. pre-build
-
+
The script updates your pkgsrc tree via (anon)cvs, then cleans out any
broken distfiles, and removes all packages installed.
-
+
2. the bulk build
-
+
This is basically "make bulk-package" with an optimised order in which
packages will be built. Packages that don't require other packages will be
built first, and packages with many dependencies will be built later.
-
+
3. post-build
-
+
Generates a report that's placed in the directory specified in the
build.conf file named broken.html, a short version of that report will also
be mailed to the build's admin.
-
+
During the build, a list of broken packages will be compiled in /usr/pkgsrc
/.broken (or .../.broken.${MACHINE} if OBJMACHINE is set), individual build
logs of broken builds can be found in the package's directory. These files are
@@ -1203,11 +1205,11 @@ rebuild them, and they can be used to debug these broken package builds later.
Currently, roughly the following requirements are valid for NetBSD 2.0/i386:
* 10 GB - distfiles (NFS ok)
-
+
* 8 GB - full set of all binaries (NFS ok)
-
+
* 5 GB - temp space for compiling (local disk recommended)
-
+
Note that all pkgs will be de-installed as soon as they are turned into a
binary package, and that sources are removed, so there is no excessively huge
demand to disk space. Afterwards, if the package is needed again, it will be
@@ -1234,56 +1236,56 @@ NetBSD installation or doing a make distribution DESTDIR=/usr/sandbox in /usr/
src/etc, be sure the following items are present and properly configured:
1. Kernel
-
+
# cp /netbsd /usr/sandbox
-
+
2. /dev/*
-
+
# cd /usr/sandbox/dev ; sh MAKEDEV all
-
+
3. /etc/resolv.conf (for security/smtpd and mail):
-
+
# cp /etc/resolv.conf /usr/sandbox/etc
-
+
4. Working(!) mail config (hostname, sendmail.cf):
-
+
# cp /etc/mail/sendmail.cf /usr/sandbox/etc/mail
-
+
5. /etc/localtime (for security/smtpd):
-
+
# ln -sf /usr/share/zoneinfo/UTC /usr/sandbox/etc/localtime
-
+
6. /usr/src (system sources, for sysutils/aperture, net/ppp-mppe):
-
+
# ln -s ../disk1/cvs .
# ln -s cvs/src-1.6 src
-
+
7. Create /var/db/pkg (not part of default install):
-
+
# mkdir /usr/sandbox/var/db/pkg
-
+
8. Create /usr/pkg (not part of default install):
-
+
# mkdir /usr/sandbox/usr/pkg
-
+
9. Checkout pkgsrc via cvs into /usr/sandbox/usr/pkgsrc:
-
+
# cd /usr/sandbox/usr
# cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -d -P pkgsrc
-
+
Do not mount/link this to the copy of your pkgsrc tree you do development
in, as this will likely cause problems!
-
+
10. Make /usr/sandbox/usr/pkgsrc/packages and .../distfiles point somewhere
appropriate. NFS- and/or nullfs-mounts may come in handy!
-
+
11. Edit /etc/mk.conf, see Section 5.3.1.1, "/etc/mk.conf".
-
+
12. Adjust mk/bulk/build.conf to suit your needs.
-
+
13. If you have set CVS_USER in build.conf, make sure that account exists and
can do a cvs ${CVS_FLAGS} update properly!
-
+
When the chroot sandbox is setup, you can start the build with the following
steps:
@@ -1302,13 +1304,13 @@ In addition to building a complete set of all packages in pkgsrc, the pkgsrc/mk
pkgsrc. By setting defining SPECIFIC_PKGS in /etc/mk.conf, the variables
* SITE_SPECIFIC_PKGS
-
+
* HOST_SPECIFIC_PKGS
-
+
* GROUP_SPECIFIC_PKGS
-
+
* USER_SPECIFIC_PKGS
-
+
will define the set of packages which should be built. The bulk build code will
also include any packages which are needed as dependencies for the explicitly
listed packages.
@@ -1317,6 +1319,73 @@ One use of this is to do a bulk build with SPECIFIC_PKGS in a chroot sandbox
periodically to have a complete set of the binary packages needed for your site
available without the overhead of building extra packages that are not needed.
+5.3.8. Uploading results of a bulk build
+
+This section describes how pkgsrc developers can upload binary pkgs built by
+bulk builds to ftp.NetBSD.org.
+
+First, make sure that you have RSYNC_DST set properly in your mk/bulk/
+build.conf file, i.e. adjust it to something like one of the following:
+
+RSYNC_DST=$CVS_USER@ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload
+
+Please use appropviate values for "pkgsrc-200xQ4", "NetBSD-a.b.c" and "arch"
+here. If your login on ftp.NetBSD.org is different from CVS_USER, write your
+login directly into the variable, e.g. my local account is "feyrer", but for my
+login "hubertf", I use:
+
+RSYNC_DST=hubertf@ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload
+
+A separate upload directory is used here to allow "closing" the directory
+during upload. To do so, run the following command on ftp.NetBSD.org next:
+
+nbftp% mkdir -p -m 750 /pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload
+
+Please note that /pub/NetBSD/packages is only appropriate for packages for the
+NetBSD operating system. Binary packages for other operating systems should go
+into /pub/pkgsrc.
+
+Before uploading the binary pkgs, ssh authentication needs to be setup next.
+This example shows how to setup temporary keys for the root account inside the
+sandbox (assuming that no keys should be present there usually):
+
+# chroot /usr/sandbox
+chroot-# rm $HOME/.ssh/id-dsa*
+chroot-# ssh-keygen -t dsa
+chroot-# cat $HOME/.ssh/id-dsa.pub
+
+Now take the output of id-dsa.pub and append it to your ~/.ssh/authorized_keys
+file on ftp.netBSD.org. You can remove the key after the upload is done!
+
+Next, test if your ssh connection really works:
+
+chroot-# ssh ftp.NetBSD.org date
+
+Use "-l yourNetBSDlogin" here as appropriate!
+
+Now after all this works, you can exit the sandbox and start the upload:
+
+chroot-# exit
+# cd /usr/sandbox/usr/pkgsrc
+# sh mk/bulk/do-sandbox-upload
+
+The upload process may take quite some time. Use "ls" or "du" on the FTP server
+to monitor progress of the upload.
+
+After the upload has ended, first thing is to revoke ssh access:
+
+nbftp% vi ~/.ssh/authorized_keys
+Gdd:x!
+
+Use whatever is needed to remove the key you've entered before! Last, move the
+uploaded packages out of the upload directory to have them accessible to
+everyone:
+
+nbftp% cd /pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch
+nbftp% mv upload/* .
+nbftp% rmdir upload
+nbftp% chmod 755 .
+
5.4. Creating a multiple CD-ROM packages collection
After your pkgsrc bulk-build has completed, you may wish to create a CD-ROM set
@@ -1368,8 +1437,8 @@ Table of Contents
6.7. How to fetch files from behind a firewall
6.8. How do I tell make fetch to do passive FTP?
6.9. How to fetch all distfiles at once
-6.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
-6.11. What does "Could not find bsd.own.mk" mean?
+6.10. What does Don't know how to make /usr/share/tmac/tmac.andoc mean?
+6.11. What does Could not find bsd.own.mk mean?
6.12. Using 'sudo' with pkgsrc
6.13. Configuration files handling and placement
6.14. Automated security checks
@@ -1402,65 +1471,65 @@ duplicate the documentation that comes with each package.
Utilities used by pkgsrc (automatically installed when needed):
* pkgtools/x11-links: symlinks for use by buildlink
-
+
OS tool augmentation (automatically installed when needed):
* pkgtools/digest: calculates SHA1 checksums (and other kinds)
-
+
* pkgtools/libnbcompat: compat library for pkg tools
-
+
* pkgtools/mtree: installed on non-BSD systems due to lack of native mtree
-
+
* pkgtools/pkg_install: up-to-date replacement for /usr/sbin/pkg_install, or
for use on operating systems where pkg_install is not present
-
+
Utilities used by pkgsrc (not automatically installed):
* pkgtools/pkg_tarup: create a binary package from an already-installed
package. used by 'make replace' to save the old package
-
+
* pkgtools/dfdisk: adds extra functionality to pkgsrc, allowing it to fetch
distfiles from multiple locations. It currently supports the following
methods: multiple CD-ROMs and network FTP/HTTP connections.
-
+
* pkgtools/xpkgwedge: put X11 packages someplace else (enabled by default)
-
+
* devel/cpuflags: will determine the best compiler flags to optimise code for
your current CPU and compiler.
-
+
Utilities for keeping track of installed packages, being up to date, etc:
* pkgtools/pkg_chk: installs pkg_chk, which reports on packages whose
installed versions do not match the latest pkgsrc entries
-
+
* pkgtools/pkgdep: makes dependency graphs of packages, to aid in choosing a
strategy for updating
-
+
* pkgtools/pkgdepgraph: make graph from above (uses graphviz)
-
+
* pkgtools/pkglint: This provides two distinct abilities: check a pkgsrc
entry for correctness (pkglint) check for and remove out-of-date distfiles
and binary packages (lintpkgsrc)
-
+
* pkgtools/pkgsurvey: report what packages you have installed
-
+
Utilities for people maintaining or creating individual packages:
* pkgtools/pkgdiff: automate making and maintaining patches for a package
(includes pkgdiff, pkgvi, mkpatches, ...)
-
+
* pkgtools/rpm2pkg, pkgtools/url2pkg: aids in converting to pkgsrc
-
+
* pkgtools/gensolpkg: convert pkgsrc to a Solaris package
-
+
Utilities for people maintaining pkgsrc (or more obscure pkg utilities)
* pkgtools/pkgconflict: find packages that conflict but aren't marked as such
-
+
* pkgtools/pkg_comp: build packages in a chrooted area
-
+
* pkgtools/libkver: spoof kernel version for chrooted cross builds
-
+
6.4. How to use pkgsrc as non-root
If you want to use pkgsrc as non-root user, you can set some variables to make
@@ -1473,7 +1542,7 @@ X11R6, /usr/openwin, ...), you will have to add the following lines into
mk.conf:
X11_TYPE=XFree86
-
+
6.6. How can I install/use X.org from pkgsrc?
@@ -1482,7 +1551,7 @@ X11R6, /usr/openwin, ...) you will have to add the following lines into
mk.conf:
X11_TYPE=xorg
-
+
6.7. How to fetch files from behind a firewall
@@ -1579,7 +1648,7 @@ binary package or from security/sudo) and then put the following into your /etc
.if exists(/usr/pkg/bin/sudo)
SU_CMD=/usr/pkg/bin/sudo /bin/sh -c
.endif
-
+
6.13. Configuration files handling and placement
@@ -1597,24 +1666,24 @@ customized in various ways:
1. PKG_SYSCONFBASE is the main config directory under which all package
configuration files are to be found. Users will typically want to set it to
/etc, or accept the default location of $PREFIX/etc.
-
+
2. PKG_SYSCONFSUBDIR is the subdirectory of PKG_SYSCONFBASE under which the
configuration files for a particular package may be found. Defaults to $
{SYSCONFBASE}.
-
+
3. PKG_SYSCONFVAR is the special suffix used to distinguish any overriding
values for a particular package (see next item). It defaults to ${PKGBASE},
but for a collection of related packages that should all have the same
PKG_SYSCONFDIR value, it can be set in each of the package Makefiles to a
common value.
-
+
4. PKG_SYSCONFDIR.${PKG_SYSCONFVAR} overrides the value of ${PKG_SYSCONFDIR}
for packages with the same value for PKG_SYSCONFVAR.
-
+
As an example, all the various KDE packages may want to set PKG_SYSCONFVAR
to "kde" so admins can set PKG_SYSCONFDIR.kde in /etc/mk.conf to define
where to install KDE config files.
-
+
Programs' configuration directory should be defined during the configure stage.
Packages that use GNU autoconf can usually do this by using the "--sysconfdir"
parameter, but this brings some problems as we will see now. When you change
@@ -1657,14 +1726,14 @@ packages installed on a system can take place. To do this, install the security
security vulnerabilities information. This list is kept up to date by the
NetBSD security officer and the NetBSD packages team, and is distributed
from the NetBSD ftp server:
-
+
ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities
-
+
2. "audit-packages", an easy way to audit the current machine, checking each
vulnerability which is known. If a vulnerable package is installed, it will
be shown by output to stdout, including a description of the type of
vulnerability, and a URL containing more information.
-
+
Use of the audit-packages package is strongly recommended!
The following message is displayed as part of the audit-packages installation
@@ -1692,14 +1761,14 @@ if [ -x ${PREFIX}/sbin/audit-packages ]; then
fi
===========================================================================
-
+
The pkgsrc developer's guide
Table of Contents
7. Package components - files, directories and contents
-
+
7.1. Makefile
7.2. distinfo
7.3. patches/*
@@ -1707,9 +1776,9 @@ Table of Contents
7.5. Optional files
7.6. work*
7.7. files/*
-
+
8. PLIST issues
-
+
8.1. RCS ID
8.2. Semi-automatic PLIST generation
8.3. Tweaking output of make print-PLIST
@@ -1718,35 +1787,35 @@ Table of Contents
8.6. Changing PLIST source with PLIST_SRC
8.7. Platform specific and differing PLISTs
8.8. Sharing directories between packages
-
+
9. Buildlink methodology
-
+
9.1. Converting packages to use buildlink3
9.2. Writing buildlink3.mk files
-
+
9.2.1. Anatomy of a buildlink3.mk file
9.2.2. Updating BUILDLINK_DEPENDS.pkg in buildlink3.mk files
-
+
9.3. Writing builtin.mk files
-
+
9.3.1. Anatomy of a builtin.mk file
9.3.2. Global preferences for native or pkgsrc software
-
+
10. Options handling
-
+
10.1. Global default options
10.2. Converting packages to use bsd.options.mk
-
+
11. The build process
-
+
11.1. Program location
11.2. Main targets
11.3. Other helpful targets
-
+
12. Notes on fixes for packages
-
+
12.1. General operation
-
+
12.1.1. How to pull in variables from /etc/mk.conf
12.1.2. Restricted packages
12.1.3. Handling dependencies
@@ -1758,24 +1827,24 @@ Table of Contents
12.1.9. How to handle incrementing versions when fixing an existing
package
12.1.10. Portability of packages
-
+
12.2. Possible downloading issues
-
+
12.2.1. Packages whose distfiles aren't available for plain downloading
12.2.2. How to handle modified distfiles with the 'old' name
-
+
12.3. Configuration gotchas
-
+
12.3.1. Shared libraries - libtool
12.3.2. Using libtool on GNU packages that already support libtool
12.3.3. GNU Autoconf/Automake
-
+
12.4. Building considerations
-
+
12.4.1. CPP defines
-
+
12.5. Package specific actions
-
+
12.5.1. Package configuration files
12.5.2. User interaction
12.5.3. Handling licenses
@@ -1793,17 +1862,17 @@ Table of Contents
12.5.15. Packages installing SGML or XML data
12.5.16. Packages installing extensions to the MIME database
12.5.17. Packages using intltool
-
+
12.6. Feedback to the author
-
+
13. Debugging
14. Submitting and Committing
-
+
14.1. Submitting your packages
14.2. Committing: Importing a package into CVS
14.3. Updating a package to a newer version
14.4. Moving a package in pkgsrc
-
+
Chapter 7. Package components - files, directories and contents
Table of Contents
@@ -1854,7 +1923,7 @@ The MASTER_SITES may be set to one of the predefined sites:
${MASTER_SITE_SUSE}
${MASTER_SITE_TEX_CTAN}
${MASTER_SITE_XCONTRIB}
- ${MASTER_SITE_XEMACS}
+ ${MASTER_SITE_XEMACS}
If one of these predefined sites is chosen, you may require the ability to
specify a subdirectory of that site. Since these macros may expand to more than
@@ -1862,7 +1931,7 @@ one actual site, you must use the following construct to specify a
subdirectory:
${MASTER_SITE_GNU:=subdirectory/name/}
- ${MASTER_SITE_SOURCEFORGE:=project_name/}
+ ${MASTER_SITE_SOURCEFORGE:=project_name/}
Note the trailing slash after the subdirectory name.
@@ -1898,22 +1967,22 @@ Please pay attention to the following gotchas:
* Add MANCOMPRESSED if manpages are installed in compressed form by the
package; see comment in bsd.pkg.mk.
-
+
* Replace /usr/local with "${PREFIX}" in all files (see patches, below).
-
+
* If the package installs any info files, see Section 12.5.10, "Packages
installing info files".
-
+
* Set MAINTAINER to be yourself. If you really can't maintain the package for
future updates, set it to <tech-pkg@NetBSD.org>.
-
+
* If a home page for the software in question exists, add the variable
HOMEPAGE right after MAINTAINER. The value of this variable should be the
URL for the home page.
-
+
* Be sure to set the COMMENT variable to a short description of the package,
not containing the pkg's name.
-
+
7.2. distinfo
Most important, the mandatory message digest, or checksum, of all the distfiles
@@ -1925,7 +1994,7 @@ digest algorithm used was, at one stage, md5, but that was felt lacking
compared to sha1, and so sha1 is now the default algorithm. The distfile size
is also generated and stored in new distinfo files. The pkgtools/digest utility
calculates all of the digests in the distinfo file, and it provides various
-different algorithms. At the current time, the algorithms provided are: md5,
+different algorithms. At the current time, the algorithms provided are: md5,
rmd160, sha1, sha256, sha384 and sha512.
Some packages have different sets of distfiles on a per architecture basis, for
@@ -1964,9 +2033,9 @@ these problems.
For even more automation, we recommend using mkpatches from the same package to
make a whole set of patches. You just have to backup files before you edit them
-to filename.orig, e.g. with cp -p filename filename.orig or, easier, by using
+to filename.orig, e.g. with cp -p filename filename.orig or, easier, by using
pkgvi again from the same package. If you upgrade a package this way, you can
-easily compare the new set of patches with the previously existing one with
+easily compare the new set of patches with the previously existing one with
patchdiff.
When you have finished a package, remember to generate the checksums for the
@@ -1988,50 +2057,50 @@ after pkgsrc patches are applied.
7.4. Other mandatory files
DESCR
-
+
A multi-line description of the piece of software. This should include any
credits where they are due. Please bear in mind that others do not share
your sense of humour (or spelling idiosyncrasies), and that others will
read everything that you write here.
-
+
PLIST
-
+
This file governs the files that are installed on your system: all the
binaries, manual pages, etc. There are other directives which may be
entered in this file, to control the creation and deletion of directories,
and the location of inserted files. See Chapter 8, PLIST issues for more
information.
-
+
7.5. Optional files
INSTALL
-
+
This shell script is invoked twice by pkg_add(1). First time after package
extraction and before files are moved in place, the second time after the
files to install are moved in place. This can be used to do any custom
- procedures not possible with @exec commands in PLIST. See pkg_add(1) and
+ procedures not possible with @exec commands in PLIST. See pkg_add(1) and
pkg_create(1) for more information.
-
+
DEINSTALL
-
+
This script is executed before and after any files are removed. It is this
script's responsibility to clean up any additional messy details around the
package's installation, since all pkg_delete knows is how to delete the
- files created in the original distribution. See pkg_delete(1) and
+ files created in the original distribution. See pkg_delete(1) and
pkg_create(1) for more information.
-
+
MESSAGE
-
+
Display this file after installation of the package. Useful for things like
legal notices on almost-free software and hints for updating config files
after installing modules for apache, PHP etc. Please note that you can
modify variables in it easily by using MESSAGE_SUBST in the package's
Makefile:
-
+
MESSAGE_SUBST+= SOMEVAR="somevalue"
-
+
replaces "${SOMEVAR}" with "somevalue" in MESSAGE.
-
+
7.6. work*
When you type make the distribution files are unpacked into this directory. It
@@ -2112,13 +2181,13 @@ For example, to get all files inside the libdata/foo directory removed from the
resulting PLIST:
PRINT_PLIST_AWK+= /^libdata\/foo/ { next; }
-
+
And to get all the @dirrm lines referring to a specific (shared) directory
converted to @comments:
PRINT_PLIST_AWK+= /^@dirrm share\/specific/ { print "@comment " $$0; next; }
-
+
8.4. Variable substitution in PLIST
@@ -2126,7 +2195,7 @@ A number of variables are substituted automatically in PLISTs when a package is
installed on a system. This includes the following variables:
${MACHINE_ARCH}, ${MACHINE_GNU_ARCH}
-
+
Some packages like emacs and perl embed information about which
architecture they were built on into the pathnames where they install their
file. To handle this case, PLIST will be preprocessed before actually used,
@@ -2134,30 +2203,30 @@ ${MACHINE_ARCH}, ${MACHINE_GNU_ARCH}
The same is done if the string ${MACHINE_GNU_ARCH} is embedded in PLIST
somewhere - use this on packages that have GNU autoconf created configure
scripts.
-
+
Legacy note
-
+
There used to be a symbol "$ARCH" that was replaced by the output of uname
-m, but that's no longer supported and has been removed.
-
+
${OPSYS}, ${LOWER_OPSYS}, ${OS_VERSION}
-
+
Some packages want to embed the OS name and version into some paths. To do
this, use these variables in the PLIST:
-
+
* ${OPSYS} - output of "uname -s"
-
+
* ${LOWER_OPSYS} - lowercase common name (eg. "solaris")
-
+
* ${OS_VERSION} - "uname -r"
-
+
${PKGLOCALEDIR}
-
+
Packages that install locale files should list them in the PLIST as "$
{PKGLOCALEDIR}/locale/de/LC_MESSAGES/..." instead of "share/locale/de/
LC_MESSAGES/...". This properly handles the fact that different operating
systems expect locale files to be either in share or lib by default.
-
+
For a complete list of values which are replaced by default, please look in
bsd.pkg.mk (and search for PLIST_SUBST).
@@ -2190,11 +2259,11 @@ system being used. These differences can be automatically handled by using the
following files:
* PLIST.common
-
+
* PLIST.${OPSYS}
-
+
* PLIST.common_end
-
+
If PLIST.${OPSYS} exists, these files are used instead of PLIST. This allows
packages which behave in this way to be handled gracefully. Manually overriding
PLIST_SRC for other more exotic uses is also possible.
@@ -2211,7 +2280,7 @@ unrelated packages, it's often not worth to add an extra package to remove it.
Therefore, one simply does:
@unexec ${RMDIR} %D/path/to/shared/directory 2>/dev/null || ${TRUE}
-
+
in the PLISTs of all affected packages, instead of the regular "@dirrm" line.
@@ -2221,16 +2290,16 @@ solutions are available:
1. If the packages have a common dependency, the directory can be removed in
that. For example, see textproc/scrollkeeper, which removes the shared
directory share/omf.
-
+
2. If the packages using the directory are not related at all (they have no
common dependencies), a *-dirs package is used.
-
+
From now on, we'll discuss the second solution. To get an idea of the *-dirs
packages available, issue:
% cd .../pkgsrc
% ls -d */*-dirs
-
+
Their use from other packages is very simple. The USE_DIRS variable takes a
list of package names (without the "-dirs" part) together with the required
@@ -2240,7 +2309,7 @@ For example, if a package installs files under share/applications, it should
have the following line in it:
USE_DIRS+= xdg-1.1
-
+
After regenerating the PLIST using make print-PLIST, you should get the right
(commented out) lines.
@@ -2255,28 +2324,28 @@ Table of Contents
9.1. Converting packages to use buildlink3
9.2. Writing buildlink3.mk files
-
+
9.2.1. Anatomy of a buildlink3.mk file
9.2.2. Updating BUILDLINK_DEPENDS.pkg in buildlink3.mk files
-
+
9.3. Writing builtin.mk files
-
+
9.3.1. Anatomy of a builtin.mk file
9.3.2. Global preferences for native or pkgsrc software
-
+
Buildlink is a framework in pkgsrc that controls what headers and libraries are
seen by a package's configure and build processes. This is implemented in a two
step process:
1. Symlink headers and libraries for dependencies into BUILDLINK_DIR, which by
default is a subdirectory of WRKDIR.
-
+
2. Create wrapper scripts that are used in place of the normal compiler tools
that translate -I${LOCALBASE}/include and -L${LOCALBASE}/lib into
references to BUILDLINK_DIR. The wrapper scripts also make native compiler
on some operating systems look like GCC, so that packages that expect GCC
won't require modifications to build with those native compilers.
-
+
This normalizes the environment in which a package is built so that the package
may be built consistently despite what other software may be installed. Please
note that the normal system header and library paths, e.g. /usr/include, /usr/
@@ -2289,19 +2358,19 @@ The process of converting packages to use the buildlink3 framework
("bl3ifying") is fairly straightforward. The things to keep in mind are:
1. Set USE_BUILDLINK3 to "yes".
-
+
2. Ensure that the build always calls the wrapper scripts instead of the
actual toolchain. Some packages are tricky, and the only way to know for
sure is the check ${WRKDIR}/.work.log to see if the wrappers are being
invoked.
-
+
3. Don't override PREFIX from within the package Makefile, e.g. Java VMs,
standalone shells, etc., because the code to symlink files into $
{BUILDLINK_DIR} looks for files relative to "pkg_info -qp pkgname".
-
+
4. Remember that only the buildlink3.mk files that you list in a package's
Makefile are added as dependencies for that package.
-
+
If a dependency on a particular package is required for its libraries and
headers, then we replace:
@@ -2316,29 +2385,29 @@ issues:
* bdb.buildlink3.mk chooses either the native or a pkgsrc Berkeley DB
implementation based on the values of BDB_ACCEPTED and BDB_DEFAULT.
-
+
* curses.buildlink3.mk If the system comes with neither Curses nor NCurses,
this will take care to install the devel/ncurses package.
-
+
* krb5.buildlink3.mk uses the value of KRB5_ACCEPTED to choose between adding
a dependency on Heimdal or MIT-krb5 for packages that require a Kerberos 5
implementation.
-
+
* motif.buildlink3.mk checks for a system-provided Motif installation or adds
a dependency on x11/lesstif or x11/openmotif;
-
+
* ossaudio.buildlink3.mk defines several variables that may be used by
packages that use the Open Sound System (OSS) API;
-
+
* pgsql.buildlink3.mk will accept either Postgres 7.3 or 7.4, whichever is
found installed. See the file for more information.
-
+
* pthread.buildlink3.mk uses the value of PTHREAD_OPTS and checks for native
pthreads or adds a dependency on devel/pth as needed;
-
+
* xaw.buildlink3.mk uses the value of XAW_TYPE to choose a particular Athena
widgets library.
-
+
The comments in those buildlink3.mk files provide a more complete description
of how to use them properly.
@@ -2350,7 +2419,7 @@ buildlink3.mk file should always provide enough information to add the correct
type of dependency relationship and include any other buildlink3.mk files that
it needs to find headers and libraries that it needs in turn.
-To generate an initial buildlink3.mk file for further editing, Rene Hexel's
+To generate an initial buildlink3.mk file for further editing, Rene Hexel's
pkgtools/createbuildlink package is highly recommended. For most packages, the
following command will generate a good starting point for buildlink3.mk files:
@@ -2382,7 +2451,7 @@ BUILDLINK_PKGSRCDIR.tiff?= ../../graphics/tiff
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
The header and footer manipulate BUILDLINK_DEPTH, which is common across all
buildlink3.mk files and is used to track at what depth we are including
@@ -2399,28 +2468,28 @@ within a buildlink3.mk file.
The third section is protected from multiple inclusion and controls how the
dependency on pkg is added. Several important variables are set in the section:
- * BUILDLINK_DEPENDS.pkg is the actual dependency recorded in the installed
+ * BUILDLINK_DEPENDS. pkg is the actual dependency recorded in the installed
package; this should always be set using += to ensure that we're appending
to any pre-existing list of values. This variable should be set to the
first version of the package that had the last change in the major number
of a shared library or that had a major API change.
-
+
* BUILDLINK_PKGSRCDIR.pkg is the location of the pkg pkgsrc directory;
-
+
* BUILDLINK_DEPMETHOD.pkg (not shown above) controls whether we use
BUILD_DEPENDS or DEPENDS to add the dependency on pkg. The build dependency
is selected by setting BUILDLINK_DEPMETHOD.pkg to "build". By default, the
full dependency is used.
-
- * BUILDLINK_INCDIRS.pkg and BUILDLINK_LIBDIRS. pkg (not shown above) are
+
+ * BUILDLINK_INCDIRS. pkg and BUILDLINK_LIBDIRS.pkg (not shown above) are
lists of subdirectories of ${BUILDLINK_PREFIX.pkg} to add to the header and
library search paths. These default to "include" and "lib" respectively.
-
+
* BUILDLINK_CPPFLAGS.pkg (not shown above) is the list of preprocessor flags
to add to CPPFLAGS, which are passed on to the configure and build phases.
The "-I" option should be avoided and instead be handled using
BUILDLINK_INCDIRS.pkg as above.
-
+
The following variables are all optionally defined within this second section
(protected against multiple inclusion) and control which package files are
symlinked into ${BUILDLINK_DIR} and how their names are transformed during the
@@ -2429,24 +2498,24 @@ symlinking:
* BUILDLINK_FILES.pkg (not shown above) is a shell glob pattern relative to $
{BUILDLINK_PREFIX.pkg} to be symlinked into ${BUILDLINK_DIR}, e.g. include/
*.h.
-
+
* BUILDLINK_FILES_CMD.pkg (not shown above) is a shell pipeline that outputs
to stdout a list of files relative to ${BUILDLINK_PREFIX.pkg}. The
resulting files are to be symlinked into ${BUILDLINK_DIR}. By default, this
takes the +CONTENTS of a pkg and filters it through $
{BUILDLINK_CONTENTS_FILTER.pkg}.
-
+
* BUILDLINK_CONTENTS_FILTER.pkg (not shown above) is a filter command that
filters +CONTENTS input into a list of files relative to $
{BUILDLINK_PREFIX.pkg} on stdout. By default for overwrite packages,
BUILDLINK_CONTENTS_FILTER.pkg outputs the contents of the include and lib
directories in the package +CONTENTS, and for pkgviews packages, it outputs
any libtool archives in lib directories.
-
+
* BUILDLINK_TRANSFORM.pkg (not shown above) is a list of sed arguments used
to transform the name of the source filename into a destination filename,
e.g. -e "s|/curses.h|/ncurses.h|g".
-
+
The last section includes any buildlink3.mk needed for pkg's library
dependencies. Including these buildlink3.mk files means that the headers and
libraries for these dependencies are also symlinked into ${BUILDLINK_DIR}
@@ -2459,16 +2528,15 @@ BUILDLINK_DEPENDS.pkg after a package update:
1. if the sonames (major number of the library version) of any installed
shared libraries change;
-
+
2. if the API or interface to the header files change.
-
+
In these cases, BUILDLINK_DEPENDS.pkg should be adjusted to require at least
the new package version. In some cases, the packages that depend on this new
version may need their PKGREVISIONs increased and, if they have buildlink3.mk
-files, their BUILDLINK_DEPENDS. pkg adjusted, too. This is needed so that
-binary packages made using it will require the correct package dependency and
-not settle for an older one which will not contain the necessary shared
-libraries.
+files, their BUILDLINK_DEPENDS.pkg adjusted, too. This is needed so that binary
+packages made using it will require the correct package dependency and not
+settle for an older one which will not contain the necessary shared libraries.
Please take careful consideration before adjusting BUILDLINK_DEPENDS.pkg as we
don't want to cause unneeded package deletions and rebuilds. In many cases, new
@@ -2488,13 +2556,13 @@ software is appropriate.
The only requirements of a builtin.mk file for pkg are:
1. It should set USE_BUILTIN.pkg to either "yes" or "no" after it is included.
-
+
2. It should not override any USE_BUILTIN.pkg which is already set before the
builtin.mk file is included.
-
+
3. It should be written to allow multiple inclusion. This is very important
and takes careful attention to Makefile coding.
-
+
9.3.1. Anatomy of a builtin.mk file
The following is the recommended template for builtin.mk files:
@@ -2537,7 +2605,7 @@ CHECK_BUILTIN.foo?= no
# "yes" or "no".
#
.endif # CHECK_BUILTIN.foo
-
+
The first section sets IS_BUILTIN.pkg depending on if pkg really exists in the
base system. This should not be a base system software with similar
@@ -2551,13 +2619,13 @@ internally within the builtin.mk file.
The third section sets USE_BUILTIN.pkg and is required in all builtin.mk files.
The code in this section must make the determination whether the built-in
-software is adequate to satisfy the dependencies listed in BUILDLINK_DEPENDS.
-pkg. This is typically done by comparing BUILTIN_PKG.pkg against each of the
-dependencies in BUILDLINK_DEPENDS.pkg. USE_BUILTIN.pkg must be set to the
-correct value by the end of the builtin.mk file. Note that USE_BUILTIN.pkg may
-be "yes" even if IS_BUILTIN.pkg is "no" because we may make the determination
-that the built-in version of the software is similar enough to be used as a
-replacement.
+software is adequate to satisfy the dependencies listed in
+BUILDLINK_DEPENDS.pkg. This is typically done by comparing BUILTIN_PKG.pkg
+against each of the dependencies in BUILDLINK_DEPENDS.pkg. USE_BUILTIN.pkg must
+be set to the correct value by the end of the builtin.mk file. Note that
+USE_BUILTIN.pkg may be "yes" even if IS_BUILTIN.pkg is "no" because we may make
+the determination that the built-in version of the software is similar enough
+to be used as a replacement.
The last section is guarded by CHECK_BUILTIN.pkg, and includes code that uses
the value of USE_BUILTIN.pkg set in the previous section. This typically
@@ -2580,7 +2648,7 @@ all but the most basic bits on a NetBSD system, you can set:
PREFER_PKGSRC= yes
PREFER_NATIVE= getopt skey tcp_wrappers
-
+
A package must have a builtin.mk file to be listed in PREFER_NATIVE, otherwise
it is simply ignored in that list.
@@ -2646,7 +2714,7 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-
+
The first section only exists if you are converting a package that had its own
ad-hoc options handling to use bsd.options.mk. It converts global or legacy
@@ -2660,35 +2728,35 @@ supported by the package, and any default options settings if needed.
the options the user wishes to select. The recommended value is
"PKG_OPTIONS.pkg" but any package-specific value may be used. This variable
should be set in a package Makefile.
-
+
2. PKG_SUPPORTED_OPTIONS is a list of build options supported by the package.
This variable should be set in a package Makefile.
-
+
3. ${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR) are variables
that list the selected build options and override any default options given
in PKG_DEFAULT_OPTIONS. If any of the options begin with a "-", then that
option is always removed from the selected build options, e.g.
-
+
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
-
-
+
+
or
-
+
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
-
-
+
+
This variable should be set in /etc/mk.conf.
-
+
After the inclusion of bsd.options.mk, the following variables are set:
* PKG_OPTIONS contains the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
-
+
The remaining sections contain the logic that is specific to each option. There
should be a check for every option listed in PKG_SUPPORTED_OPTIONS, and there
should be clear documentation on what turning on the option will do in the
@@ -2729,102 +2797,102 @@ When choosing which of these variables to use, follow the following rules:
* PREFIX always points to the location where the current pkg will be
installed. When referring to a pkg's own installation path, use "${PREFIX}
".
-
+
* LOCALBASE is where all non-X11 pkgs are installed. If you need to construct
a -I or -L argument to the compiler to find includes and libraries
installed by another non-X11 pkg, use "${LOCALBASE}".
-
+
* X11BASE is where the actual X11 distribution (from xsrc, etc.) is
installed. When looking for standard X11 includes (not those installed by a
pkg), use "${X11BASE}".
-
+
* X11 based are special in that they may be installed in either X11BASE or
LOCALBASE.
-
+
Usually, X11 packages should be installed under LOCALBASE whenever
possible. Note that you will need to set USE_X11 in them to request the
presence of X11 and to get the right compilation flags.
-
+
Even though, there are some packages that cannot be installed under
LOCALBASE: those that come with app-defaults files. These packages are
special and they must be placed under X11BASE. To accomplish this, set
either USE_X11BASE or USE_IMAKE in your package.
-
+
Some notes: USE_X11 and USE_X11BASE are mutually exclusive. If you need to
find includes or libraries installed by a pkg that has USE_IMAKE or
USE_X11BASE in its pkg Makefile, you need to use both ${X11BASE} and $
- {LOCALBASE}. To force installation of all X11 packages in LOCALBASE, the
+ {LOCALBASE}. To force installation of all X11 packages in LOCALBASE, the
pkgtools/xpkgwedge is enabled by default.
-
+
* X11PREFIX should be used to refer to the installed location of an X11
package. X11PREFIX will be set to X11BASE if xpkgwedge is not installed,
and to LOCALBASE if xpkgwedge is installed.
-
+
* If xpkgwedge is installed, it is possible to have some packages installed
in X11BASE and some in LOCALBASE. To determine the prefix of an installed
package, the EVAL_PREFIX definition can be used. It takes pairs in the
format "DIRNAME=<package>", and the make(1) variable DIRNAME will be set to
the prefix of the installed package <package>, or "${X11PREFIX}" if the
package is not installed.
-
+
This is best illustrated by example.
-
+
The following lines are taken from pkgsrc/wm/scwm/Makefile:
-
- EVAL_PREFIX+= GTKDIR=gtk+
+
+ EVAL_PREFIX+= GTKDIR=gtk+
CONFIGURE_ARGS+= --with-guile-prefix=${LOCALBASE} \
--with-gtk-prefix="${GTKDIR}" \
--enable-multibyte
-
+
Specific defaults can be defined for the packages evaluated using
EVAL_PREFIX, by using a definition of the form:
-
+
GTKDIR_DEFAULT= ${LOCALBASE}
-
+
where GTKDIR corresponds to the first definition in the EVAL_PREFIX pair.
-
+
* Within ${PREFIX}, packages should install files according to hier(7), with
the exception that manual pages go into ${PREFIX}/man, not ${PREFIX}/share/
man.
-
+
11.2. Main targets
The main targets used during the build process defined in bsd.pkg.mk are:
fetch
-
+
This will check if the file(s) given in the variables DISTFILES and
PATCHFILES (as defined in the package's Makefile) are present on the local
system in /usr/pkgsrc/distfiles. If they are not present, an attempt will
be made to fetch them using commands of the form:
-
+
${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
-
+
where ${site} varies through several possibilities in turn: first,
MASTER_SITE_OVERRIDE is tried, then the sites specified in either
SITES_file if defined, else MASTER_SITES or PATCH_SITES, as applies, then
finally the value of MASTER_SITE_BACKUP. The order of all except the first
can be optionally sorted by the user, via setting either MASTER_SORT_AWK or
MASTER_SORT_REGEX.
-
+
checksum
-
+
After the distfile(s) are fetched, their checksum is generated and compared
with the checksums stored in the distinfo file. If the checksums don't
match, the build is aborted. This is to ensure the same distfile is used
for building, and that the distfile wasn't changed, e.g. by some malign
force, deliberately changed distfiles on the master distribution site or
network lossage.
-
+
extract
-
+
When the distfiles are present on the local system, they need to be
extracted, as they are usually in the form of some compressed archive
format, most commonly .tar.gz.
-
+
If only some of the distfiles need to be uncompressed, the files to be
uncompressed should be put into EXTRACT_ONLY.
-
+
If the distfiles are not in .tar.gz format, they can be extracted by
setting either EXTRACT_SUFX, or EXTRACT_CMD, EXTRACT_BEFORE_ARGS and
EXTRACT_AFTER_ARGS. In the former case, pkgsrc knows how to extract a
@@ -2833,68 +2901,68 @@ extract
various DECOMPRESS_CMD variables bsd.pkg.mk for a complete list). Here's an
example on how to use the other variables for a program that comes with a
compressed shell archive whose name ends in .msg.gz:
-
+
EXTRACT_SUFX= .msg.gz
EXTRACT_CMD= zcat
EXTRACT_BEFORE_ARGS=
EXTRACT_AFTER_ARGS= |sh
-
+
patch
-
+
After extraction, all the patches named by the PATCHFILES, those present in
the patches subdirectory of the package as well as in $LOCALPATCHES/
$PKGPATH (e.g. /usr/local/patches/graphics/png) are applied. Patchfiles
ending in .Z or .gz are uncompressed before they are applied, files ending
in .orig or .rej are ignored. Any special options to patch(1) can be handed
in PATCH_DIST_ARGS. See Section 7.3, "patches/*" for more details.
-
+
By default patch(1) is given special args to make it fail if the patches
apply with some lines of fuzz. Please fix (regen) the patches so that they
apply cleanly. The rationale behind this is that patches that don't apply
cleanly may end up being applied in the wrong place, and cause severe harm
there.
-
+
configure
-
+
Most pieces of software need information on the header files, system calls,
and library routines which are available in NetBSD. This is the process
known as configuration, and is usually automated. In most cases, a script
is supplied with the source, and its invocation results in generation of
header files, Makefiles, etc.
-
+
If the program's distfile contains its own configure script, this can be
invoked by setting HAS_CONFIGURE. If the configure script is a GNU autoconf
script, GNU_CONFIGURE should be specified instead. In either case, any
arguments to the configure script can be specified in the CONFIGURE_ARGS
variable, and the configure script's name can be set in CONFIGURE_SCRIPT if
- it differs from the default "configure". Here's an example from the
+ it differs from the default "configure". Here's an example from the
sysutils/top package:
-
+
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= Configure
CONFIGURE_ARGS+= netbsd13
-
+
If the program uses an Imakefile for configuration, the appropriate steps
can be invoked by setting USE_IMAKE to "YES". (If you only want the package
installed in $X11PREFIX but xmkmf not being run, set USE_X11BASE instead!)
-
+
build
-
+
Once configuration has taken place, the software will be built by invoking
$MAKE_PROGRAM on $MAKEFILE with $BUILD_TARGET as the target to build. The
default MAKE_PROGRAM is "gmake" if USE_GNU_TOOLS contains "make", "make"
otherwise. MAKEFILE is set to "Makefile" by default, and BUILD_TARGET
defaults to "all". Any of these variables can be set in the package's
Makefile to change the default build process.
-
+
install
-
+
Once the build stage has completed, the final step is to install the
software in public directories, so users can access the programs and files.
As in the build-target, $MAKE_PROGRAM is invoked on $MAKEFILE here, but
with the $INSTALL_TARGET instead, the latter defaulting to "install" (plus
"install.man", if USE_IMAKE is set).
-
+
If no target is specified, the default is "build". If a subsequent stage is
requested, all prior stages are made: e.g. make build will also perform the
equivalent of:
@@ -2909,136 +2977,136 @@ make build
11.3. Other helpful targets
pre/post-*
-
+
For any of the main targets described in the previous section, two
auxiliary targets exist with "pre-" and "post-" used as a prefix for the
main target's name. These targets are invoked before and after the main
target is called, allowing extra configuration or installation steps be
performed from a package's Makefile, for example, which a program's
configure script or install target omitted.
-
+
do-*
-
+
Should one of the main targets do the wrong thing, and should there be no
variable to fix this, you can redefine it with the do-* target. (Note that
redefining the target itself instead of the do-* target is a bad idea, as
the pre-* and post-* targets won't be called anymore, etc.) You will not
usually need to do this.
-
+
reinstall
-
+
If you did a make install and you noticed some file was not installed
properly, you can repeat the installation with this target, which will
ignore the "already installed" flag.
-
+
deinstall
-
+
This target does a pkg_delete(1) in the current directory, effectively
de-installing the package. The following variables can be used to tune the
behaviour:
-
+
PKG_VERBOSE
-
+
Add a "-v" to the pkg_delete(1) command.
-
+
DEINSTALLDEPENDS
-
+
Remove all packages that require (depend on) the given package. This
can be used to remove any packages that may have been pulled in by a
given package, e.g. if make deinstall DEINSTALLDEPENDS=1 is done in
pkgsrc/x11/kde, this is likely to remove whole KDE. Works by adding
"-R" to the pkg_delete(1) command line.
-
+
update
-
+
This target causes the current package to be updated to the latest version.
The package and all depending packages first get de-installed, then current
versions of the corresponding packages get compiled and installed. This is
similar to manually noting which packages are currently installed, then
performing a series of make deinstall and make install (or whatever
UPDATE_TARGET is set to) for these packages.
-
+
You can use the "update" target to resume package updating in case a
previous make update was interrupted for some reason. However, in this
case, make sure you don't call make clean or otherwise remove the list of
dependent packages in WRKDIR. Otherwise you lose the ability to
automatically update the current package along with the dependent packages
you have installed.
-
+
Resuming an interrupted make update will only work as long as the package
tree remains unchanged. If the source code for one of the packages to be
updated has been changed, resuming make update will most certainly fail!
-
+
The following variables can be used either on the command line or in /etc/
mk.conf to alter the behaviour of make update:
-
+
UPDATE_TARGET
-
+
Install target to recursively use for the updated package and the
dependent packages. Defaults to DEPENDS_TARGET if set, "install"
otherwise for make update. e.g. make update UPDATE_TARGET=package
-
+
NOCLEAN
-
+
Don't clean up after updating. Useful if you want to leave the work
sources of the updated packages around for inspection or other
purposes. Be sure you eventually clean up the source tree (see the
"clean-update" target below) or you may run into troubles with old
source code still lying around on your next make or make update.
-
+
REINSTALL
-
+
Deinstall each package before installing (making DEPENDS_TARGET). This
may be necessary if the "clean-update" target (see below) was called
after interrupting a running make update.
-
+
DEPENDS_TARGET
-
+
Allows you to disable recursion and hardcode the target for packages.
The default is "update" for the update target, facilitating a recursive
update of prerequisite packages. Only set DEPENDS_TARGET if you want to
disable recursive updates. Use UPDATE_TARGET instead to just set a
specific target for each package to be installed during make update
(see above).
-
+
clean-update
-
+
Clean the source tree for all packages that would get updated if make
update was called from the current directory. This target should not be
used if the current package (or any of its depending packages) have already
been de-installed (e.g., after calling make update) or you may lose some
- packages you intended to update. As a rule of thumb: only use this target
+ packages you intended to update. As a rule of thumb: only use this target
before the first time you run make update and only if you have a dirty
package tree (e.g., if you used NOCLEAN).
-
- If you unsure about whether your tree is clean you can either perform a
+
+ If you unsure about whether your tree is clean you can either perform a
make clean at the top of the tree, or use the following sequence of
commands from the directory of the package you want to update (before
running make update for the first time, otherwise you lose all the packages
you wanted to update!):
-
+
# make clean-update
# make clean CLEANDEPENDS=YES
# make update
-
+
The following variables can be used either on the command line or in /etc/
mk.conf to alter the behaviour of make clean-update:
-
+
CLEAR_DIRLIST
-
+
After make clean, do not reconstruct the list of directories to update
for this package. Only use this if make update successfully installed
all packages you wanted to update. Normally, this is done automatically
on make update, but may have been suppressed by the NOCLEAN variable
(see above).
-
+
info
-
+
This target invokes pkg_info(1) for the current package. You can use this
to check which version of a package is installed.
-
+
readme
-
+
This target generates a README.html file, which can be viewed using a
browser such as www/mozilla or www/links. The generated files contain
references to any packages which are in the PACKAGES directory on the local
@@ -3048,106 +3116,106 @@ readme
the directory /usr/packages, set FTP_PKG_URL_HOST=file://localhost and
FTP_PKG_URL_DIR=/usr/packages. The ${PACKAGES} directory and its
subdirectories will be searched for all the binary packages.
-
+
readme-all
-
+
Use this target to create a file README-all.html which contains a list of
all packages currently available in the NetBSD Packages Collection,
together with the category they belong to and a short description. This
file is compiled from the pkgsrc/*/README.html files, so be sure to run
this after a make readme.
-
+
cdrom-readme
-
+
This is very much the same as the "readme" target (see above), but is to be
used when generating a pkgsrc tree to be written to a CD-ROM. This target
also produces README.html files, and can be made to refer to URLs based on
CDROM_PKG_URL_HOST and CDROM_PKG_URL_DIR.
-
+
show-distfiles
-
+
This target shows which distfiles and patchfiles are needed to build the
package. (DISTFILES and PATCHFILES, but not patches/*)
-
+
show-downlevel
-
+
This target shows nothing if the package is not installed. If a version of
this package is installed, but is not the version provided in this version
of pkgsrc, then a warning message is displayed. This target can be used to
show which of your installed packages are downlevel, and so the old
versions can be deleted, and the current ones added.
-
+
show-pkgsrc-dir
-
+
This target shows the directory in the pkgsrc hierarchy from which the
package can be built and installed. This may not be the same directory as
the one from which the package was installed. This target is intended to be
used by people who may wish to upgrade many packages on a single host, and
can be invoked from the top-level pkgsrc Makefile by using the
"show-host-specific-pkgs" target.
-
+
show-installed-depends
-
+
This target shows which installed packages match the current package's
DEPENDS. Useful if out of date dependencies are causing build problems.
-
+
check-shlibs
-
+
After a package is installed, check all its binaries and (on ELF platforms)
shared libraries to see if they find the shared libs they need. Run by
default if PKG_DEVELOPER is set in /etc/mk.conf.
-
+
print-PLIST
-
+
After a "make install" from a new or upgraded pkg, this prints out an
attempt to generate a new PLIST from a find -newer work/.extract_done. An
attempt is made to care for shared libs etc., but it is strongly
recommended to review the result before putting it into PLIST. On upgrades,
it's useful to diff the output of this command against an already existing
PLIST file.
-
+
If the package installs files via tar(1) or other methods that don't update
file access times, be sure to add these files manually to your PLIST, as
the "find -newer" command used by this target won't catch them!
-
+
See Section 8.3, "Tweaking output of make print-PLIST" for more information
on this target.
-
+
bulk-package
-
+
Used to do bulk builds. If an appropriate binary package already exists, no
action is taken. If not, this target will compile, install and package it
(and it's depends, if PKG_DEPENDS is set properly. See Section 5.3.1,
"Configuration". After creating the binary package, the sources, the
just-installed package and it's required packages are removed, preserving
free disk space.
-
+
Beware that this target may deinstall all packages installed on a system!
-
+
bulk-install
-
+
Used during bulk-installs to install required packages. If an upto-date
- binary package is available, it will be installed via pkg_add(1). If not,
+ binary package is available, it will be installed via pkg_add(1). If not,
make bulk-package will be executed, but the installed binary not be
removed.
-
+
A binary package is considered "upto-date" to be installed via pkg_add(1)
if:
-
+
* None of the package's files (Makefile, ...) were modified since it was
built.
-
+
* None of the package's required (binary) packages were modified since it
was built.
-
+
Beware that this target may deinstall all packages installed on a system!
-
+
Chapter 12. Notes on fixes for packages
Table of Contents
12.1. General operation
-
+
12.1.1. How to pull in variables from /etc/mk.conf
12.1.2. Restricted packages
12.1.3. Handling dependencies
@@ -3158,24 +3226,24 @@ Table of Contents
12.1.8. How to handle compiler bugs
12.1.9. How to handle incrementing versions when fixing an existing package
12.1.10. Portability of packages
-
+
12.2. Possible downloading issues
-
+
12.2.1. Packages whose distfiles aren't available for plain downloading
12.2.2. How to handle modified distfiles with the 'old' name
-
+
12.3. Configuration gotchas
-
+
12.3.1. Shared libraries - libtool
12.3.2. Using libtool on GNU packages that already support libtool
12.3.3. GNU Autoconf/Automake
-
+
12.4. Building considerations
-
+
12.4.1. CPP defines
-
+
12.5. Package specific actions
-
+
12.5.1. Package configuration files
12.5.2. User interaction
12.5.3. Handling licenses
@@ -3193,7 +3261,7 @@ Table of Contents
12.5.15. Packages installing SGML or XML data
12.5.16. Packages installing extensions to the MIME database
12.5.17. Packages using intltool
-
+
12.6. Feedback to the author
12.1. General operation
@@ -3212,7 +3280,7 @@ the package Makefile before any preprocessor-like .if, .ifdef, or .ifndef
statements:
.include "../../mk/bsd.prefs.mk"
-
+
.if defined(USE_MENUS)
...
.endif
@@ -3232,34 +3300,34 @@ these restrictions, the package system defines five make variables that can be
set to note these restrictions:
* RESTRICTED
-
+
This variable should be set whenever a restriction exists (regardless of
its kind). Set this variable to a string containing the reason for the
restriction.
-
+
* NO_BIN_ON_CDROM
-
+
Binaries may not be placed on CD-ROM. Set this variable to ${RESTRICTED}
whenever a binary package may not be included on a CD-ROM.
-
+
* NO_BIN_ON_FTP
-
+
Binaries may not be placed on an FTP server. Set this variable to $
{RESTRICTED} whenever a binary package may not not be made available on the
Internet.
-
+
* NO_SRC_ON_CDROM
-
+
Distfiles may not be placed on CD-ROM. Set this variable to ${RESTRICTED}
if re-distribution of the source code or other distfile(s) is not allowed
on CD-ROMs.
-
+
* NO_SRC_ON_FTP
-
+
Distfiles may not be placed on FTP. Set this variable to ${RESTRICTED} if
re-distribution of the source code or other distfile(s) via the Internet is
not allowed.
-
+
Please note that the use of NO_PACKAGE, IGNORE, NO_CDROM, or other generic make
variables to denote restrictions is deprecated, because they unconditionally
prevent users from generating binary packages!
@@ -3290,51 +3358,51 @@ version numbers recognised by pkg_info(1).
1. If your package needs another package's binaries or libraries to build or
run, and if that package has a buildlink3.mk file available, use it:
-
+
.include "../../graphics/jpeg/buildlink3.mk"
-
-
+
+
2. If your package needs to use another package to build itself and there is
no buildlink3.mk file available, use the BUILD_DEPENDS definition:
-
+
BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf
-
+
3. If your package needs a library with which to link and again there is no
buildlink3.mk file available, this is specified using the DEPENDS
definition. An example of this is the print/lyx package, which uses the xpm
library, version 3.4j to build:
-
+
DEPENDS+= xpm-3.4j:../../graphics/xpm
-
+
You can also use wildcards in package dependences:
-
+
DEPENDS+= xpm-[0-9]*:../../graphics/xpm
-
+
Note that such wildcard dependencies are retained when creating binary
packages. The dependency is checked when installing the binary package and
any package which matches the pattern will be used. Wildcard dependencies
should be used with care.
-
+
The "-[0-9]*" should be used instead of "-*" to avoid potentially ambiguous
matches such as "tk-postgresql" matching a "tk-*" DEPENDS.
-
+
Wildcards can also be used to specify that a package will only build
against a certain minimum version of a pre-requisite:
-
+
DEPENDS+= tiff>=3.5.4:../../graphics/tiff
-
+
This means that the package will build against version 3.5.4 of the tiff
library or newer. Such a dependency may be warranted if, for example, the
API of the library has changed with version 3.5.4 and a package would not
compile against an earlier version of tiff.
-
+
Please note that such dependencies should only be updated if a package
requires a newer pre-requisite, but not to denote recommendations such as
security updates or ABI changes that do not prevent a package from building
correctly. Such recommendations can be expressed using RECOMMENDED:
-
+
RECOMMENDED+= tiff>=3.6.1:../../graphics/tiff
-
+
In addition to the above DEPENDS line, this denotes that while a package
will build against tiff>=3.5.4, at least version 3.6.1 is recommended.
RECOMMENDED entries will be turned into dependencies unless explicitly
@@ -3342,21 +3410,21 @@ version numbers recognised by pkg_info(1).
with recommendations ignored may not be uploaded to ftp.NetBSD.org by
developers and should not be used across different systems that may have
different versions of binary packages installed.
-
+
For security fixes, please update the package vulnerabilities file as well
as setting RECOMMENDED, see Section 12.1.7, "Handling packages with
security problems" for more information.
-
+
4. If your package needs some executable to be able to run correctly and if
there's agail no buildlink3.mk file, this is specified using the DEPENDS
variable. The print/lyx package needs to be able to execute the latex
binary from the teTeX package when it runs, and that is specified:
-
+
DEPENDS+= teTeX-[0-9]*:../../print/teTeX
-
+
The comment about wildcard dependencies from previous paragraph applies
here, too.
-
+
If your package needs files from another package to build, see the first part
of the "do-configure" target print/ghostscript5 package (it relies on the jpeg
sources being present in source form during the build):
@@ -3522,7 +3590,7 @@ pkgsrc supports many different machines, with different object formats like
a.out and ELF, and varying abilities to do shared library and dynamic loading
at all. To accompany this, varying commands and options have to be passed to
the compiler, linker, etc. to get the Right Thing, which can be pretty annoying
-especially if you don't have all the machines at your hand to test things. The
+especially if you don't have all the machines at your hand to test things. The
devel/libtool pkg can help here, as it just "knows" how to build both static
and dynamic libraries from a set of source files, thus being platform
independent.
@@ -3530,86 +3598,86 @@ independent.
Here's how to use libtool in a pkg in seven simple steps:
1. Add USE_LIBTOOL=yes to the package Makefile.
-
+
2. For library objects, use "${LIBTOOL} --mode=compile ${CC}" in place of "$
{CC}". You could even add it to the definition of CC, if only libraries are
being built in a given Makefile. This one command will build both PIC and
non-PIC library objects, so you need not have separate shared and
non-shared library rules.
-
+
3. For the linking of the library, remove any "ar", "ranlib", and "ld
-Bshareable" commands, and instead use:
-
+
${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info major:minor
-
+
Note that the library is changed to have a .la extension, and the objects
are changed to have a .lo extension. Change OBJS as necessary. This
automatically creates all of the .a, .so.major.minor, and ELF symlinks (if
necessary) in the build directory. Be sure to include "-version-info",
especially when major and minor are zero, as libtool will otherwise strip
off the shared library version.
-
+
From the libtool manual:
-
+
So, libtool library versions are described by three integers:
-
+
CURRENT
The most recent interface number that this library implements.
-
+
REVISION
The implementation number of the CURRENT interface.
-
+
AGE
The difference between the newest and oldest interfaces that this
library implements. In other words, the library implements all the
interface numbers in the range from number `CURRENT - AGE' to
`CURRENT'.
-
+
If two libraries have identical CURRENT and AGE numbers, then the
- dynamic linker chooses the library with the greater REVISION number.
-
+ dynamic linker chooses the library with the greater REVISION number.
+
The "-release" option will produce different results for a.out and ELF
(excluding symlinks) in only one case. An ELF library of the form
"libfoo-release.so.x.y" will have a symlink of "libfoo.so.x.y" on an a.out
platform. This is handled automatically.
-
+
The "-rpath argument" is the install directory of the library being built.
-
- In the PLIST, include all of the .a, .la, and .so, .so.major and .so.major.
- minor files.
-
+
+ In the PLIST, include all of the .a, .la, and .so, .so.major and
+ .so.major.minor files.
+
4. When linking shared object (.so) files, i.e. files that are loaded via
dlopen(3), NOT shared libraries, use "-module -avoid-version" to prevent
them getting version tacked on.
-
+
The PLIST file gets the foo.so entry.
-
+
5. When linking programs that depend on these libraries before they are
installed, preface the cc(1) or ld(1) line with "${LIBTOOL} --mode=link",
and it will find the correct libraries (static or shared), but please be
aware that libtool will not allow you to specify a relative path in -L
(such as "-L../somelib"), because it expects you to change that argument to
be the .la file. e.g.
-
+
${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib
-
+
should be changed to:
-
+
${LIBTOOL} --mode=link ${CC} -o someprog ../somelib/somelib.la
-
+
and it will do the right thing with the libraries.
-
+
6. When installing libraries, preface the install(1) or cp(1) command with "$
{LIBTOOL} --mode=install", and change the library name to .la. e.g.
-
+
${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib
-
+
This will install the static .a, shared library, any needed symlinks, and
run ldconfig(8).
-
+
7. In your PLIST, include all of the .a, .la, and .so, .so.CURRENT and
.so.CURRENT.REVISION files (this is a change from the previous behaviour).
-
+
12.3.2. Using libtool on GNU packages that already support libtool
Add USE_LIBTOOL=yes to the package Makefile. This will override the package's
@@ -3635,15 +3703,15 @@ in some circumstances. Some of the more common errors are:
* The inclusion of a shared object (-module) as a dependent library in an
executable or library. This in itself isn't a problem if one of two things
has been done:
-
+
1. The shared object is named correctly, i.e. libfoo.la, not foo.la
-
+
2. The -dlopen option is used when linking an executable.
-
+
* The use of libltdl without the correct calls to initialisation routines.
The function lt_dlinit() should be called and the macro
LTDL_SET_PRELOADED_SYMBOLS included in executables.
-
+
12.3.3. GNU Autoconf/Automake
If a package needs GNU autoconf or automake to be executed to regenerate the
@@ -3722,19 +3790,19 @@ variables:
* PKG_SYSCONFBASE is the main config directory under which all package
configuration files are to be found. This defaults to ${PREFIX}/etc, but
may be overridden in /etc/mk.conf.
-
+
* PKG_SYSCONFSUBDIR is the subdirectory of PKG_SYSCONFBASE under which the
configuration files for a particular package may be found, e.g. the Apache
configuration files may all be found under the httpd/ subdirectory of $
{PKG_SYSCONFBASE}. This should be set in the package Makefile.
-
+
* By default, PKG_SYSCONFDIR is set to ${PKG_SYSCONFBASE}/$
{PKG_SYSCONFSUBDIR}, but this may be overridden by setting PKG_SYSCONFDIR.$
{PKG_SYSCONFVAR} for a particular package, where PKG_SYSCONFVAR defaults to
${PKGBASE}. This is not meant to be set by a package Makefile, but is
reserved for users who wish to override the PKG_SYSCONFDIR setting for a
particular package with a special location.
-
+
The only variables that users should customize are PKG_SYSCONFBASE and
PKG_SYSCONFDIR.${PKG_SYSCONFVAR}. Users will typically want to set
PKG_SYSCONFBASE to /etc, or to accept the default location of ${PREFIX}/etc.
@@ -3745,13 +3813,13 @@ Occasionally, packages require interaction from the user, and this can be in a
number of ways:
* help in fetching the distfiles
-
+
* help to configure the package before it is built
-
+
* help during the build process
-
+
* help during the installation of a package
-
+
The INTERACTIVE_STAGE definition is provided to notify the pkgsrc mechanism of
an interactive stage which will be needed, and this should be set in the
package's Makefile. e.g.
@@ -3909,12 +3977,12 @@ Some packages install info files or use the "makeinfo" or "install-info"
commands. Each of the info files:
* is considered to be installed in the directory ${PREFIX}/${INFO_DIR},
-
+
* is registered in the Info directory file ${PREFIX}/${INFO_DIR}/dir,
-
+
* and must be listed as a filename in the INFO_FILES variable in the package
Makefile.
-
+
INFO_DIR defaults to "info" and can be overridden in the package Makefile.
INSTALL and DEINSTALL scripts will be generated to handle registration of the
info files in the Info directory file. The "install-info" command used for the
@@ -3931,7 +3999,7 @@ automatically.
The build and installation process of the software provided by the package
should not use the install-info command as the registration of info files is
-the task of the package INSTALL script, and it must use the appropriate
+the task of the package INSTALL script, and it must use the appropriate
makeinfo command.
To achieve this goal the pkgsrc infrastructure creates overriding scripts for
@@ -3952,23 +4020,23 @@ take some extra steps to make sure they get registered in the database:
deinstallation time, and tells the package where to install GConf2 data
files using some standard configure arguments. It also disallows any access
to the database directly from the package.
-
+
2. Ensure that the package installs its .schemas files under ${PREFIX}/share/
gconf/schemas. If they get installed under ${PREFIX}/etc, you will need to
manually patch the package.
-
+
3. Check the PLIST and remove any entries under the etc/gconf directory, as
they will be handled automatically. See Section 6.13, "Configuration files
handling and placement" for more information.
-
+
4. Define the GCONF2_SCHEMAS variable in your Makefile with a list of all
.schemas files installed by the package, if any. Names must not contain any
directories in them.
-
+
5. Define the GCONF2_ENTRIES variable in your Makefile with a list of all
.entries files installed by the package, if any. Names must not contain any
directories in them.
-
+
12.5.12. Packages installing scrollkeeper data files
If a package installs .omf files, used by scrollkeeper, you need to take some
@@ -3978,13 +4046,13 @@ extra steps to make sure they get registered in the database:
file. This takes care of rebuilding the scrollkeeper database at
installation and deinstallation time, and disallows any access to it
directly from the package.
-
+
2. Check the PLIST and remove any entries under the libdata/scrollkeeper
directory, as they will be handled automatically.
-
+
3. Remove the share/omf directory from the PLIST. It will be handled by
scrollkeeper.
-
+
12.5.13. Packages installing X11 fonts
If a package installs font files, you will need to rebuild the fonts database
@@ -4009,21 +4077,21 @@ steps to get them registered in the GTK2 database properly:
1. Include ../../x11/gtk2/modules.mk instead of its buildlink3.mk file. This
takes care of rebuilding the database at installation and deinstallation
time.
-
+
2. Set GTK2_IMMODULES=YES if your package installs GTK2 immodules.
-
+
3. Set GTK2_LOADERS=YES if your package installs GTK2 loaders.
-
+
4. Patch the package to not touch any of the gtk2 databases directly. These
are:
-
+
* libdata/gtk-2.0/gdk-pixbuf.loaders
-
+
* libdata/gtk-2.0/gtk.immodules
-
+
5. Check the PLIST and remove any entries under the libdata/gtk-2.0 directory,
as they will be handled automatically.
-
+
12.5.15. Packages installing SGML or XML data
If a package installs SGML or XML data files that need to be registered in
@@ -4033,23 +4101,23 @@ extra steps:
1. Include ../../textproc/xmlcatmgr/catalogs.mk in your Makefile, which takes
care of registering those files in system-wide catalogs at installation and
deinstallation time.
-
+
2. Set SGML_CATALOGS to the full path of any SGML catalogs installed by the
package.
-
+
3. Set XML_CATALOGS to the full path of any XML catalogs installed by the
package.
-
+
4. Set SGML_ENTRIES to individual entries to be added to the SGML catalog.
These come in groups of three strings; see xmlcatmgr(1) for more
information (specifically, arguments recognized by the 'add' action). Note
that you will normally not use this variable.
-
+
5. Set XML_ENTRIES to individual entries to be added to the XML catalog. These
come in groups of three strings; see xmlcatmgr(1) for more information
(specifically, arguments recognized by the 'add' action). Note that you
will normally not use this variable.
-
+
12.5.16. Packages installing extensions to the MIME database
If a package provides extensions to the MIME database by installing .xml files
@@ -4061,16 +4129,16 @@ ensure that the database is kept consistent with respect to these new files:
inclusion from other buildlink3.mk files). It takes care of rebuilding the
MIME database at installation and deinstallation time, and disallows any
access to it directly from the package.
-
- 2. Check the PLIST and remove any entries under the share/mime directory,
+
+ 2. Check the PLIST and remove any entries under the share/mime directory,
except for files saved under share/mime/packages. The former are handled
automatically by the update-mime-database program, but the later are
package-dependent and must be removed by the package that installed them in
the first place.
-
+
3. Remove any share/mime/* directories from the PLIST. They will be handled by
the shared-mime-info package.
-
+
12.5.17. Packages using intltool
If a package uses intltool during its build, include the ../../textproc/
@@ -4099,25 +4167,25 @@ do in order to get a package working. Please note this is basically the same as
what was explained in the previous sections, only with some debugging aids.
* Be sure to set PKG_DEVELOPER=1 in /etc/mk.conf
-
+
* Install pkgtools/url2pkg, create a directory for a new package, change into
it, then run url2pkg:
-
+
% mkdir /usr/pkgsrc/category/examplepkg
% cd /usr/pkgsrc/category/examplepkg
% url2pkg http://www.example.com/path/to/distfile.tar.gz
-
+
* Edit the Makefile as requested.
-
+
* Fill in the DESCR file
-
+
* Run make configure
-
+
* Add any dependencies glimpsed from documentation and the configure step to
the package's Makefile.
-
+
* Make the package compile, doing multiple rounds of
-
+
% make
% pkgvi ${WRKSRC}/some/file/that/does/not/compile
% mkpatches
@@ -4125,55 +4193,55 @@ what was explained in the previous sections, only with some debugging aids.
% mv ${WRKDIR}/.newpatches/* patches
% make mps
% make clean
-
+
Doing as non-root user will ensure that no files are modified that
- shouldn't be, especially during the build phase. mkpatches, patchdiff and
+ shouldn't be, especially during the build phase. mkpatches, patchdiff and
pkgvi are from the pkgtools/pkgdiff package.
-
+
* Look at the Makefile, fix if necessary; see Section 7.1, "Makefile".
-
+
* Generate a PLIST:
-
+
# make install
# make print-PLIST >PLIST
# make deinstall
# make install
# make deinstall
-
+
You usually need to be root to do this. Look if there are any files left:
-
+
# make print-PLIST
-
+
If this reveals any files that are missing in PLIST, add them.
-
+
* Now that the PLIST is OK, install the package again and make a binary
package:
-
+
# make reinstall
# make package
-
+
* Delete the installed package:
-
+
# pkg_delete blub
-
+
* Repeat the above make print-PLIST command, which shouldn't find anything
now:
-
+
# make print-PLIST
-
+
* Reinstall the binary package:
-
+
# pkgadd .../blub.tgz
-
+
* Play with it. Make sure everything works.
-
+
* Run pkglint from pkgtools/pkglint, and fix the problems it reports:
-
+
# pkglint
-
+
* Submit (or commit, if you have cvs access); see Chapter 14, Submitting and
Committing.
-
+
Chapter 14. Submitting and Committing
Table of Contents
@@ -4188,30 +4256,31 @@ Table of Contents
You have to separate between binary and "normal" (source) packages here:
* precompiled binary packages
-
+
Our policy is that we accept binaries only from pkgsrc developers to
guarantee that the packages don't contain any trojan horses etc. This is
- not to piss anyone off but rather to protect our users! You're still free
- to put up your home-made binary packages and tell the world where to get
- them.
-
+ not to annoy anyone but rather to protect our users! You're still free to
+ put up your home-made binary packages and tell the world where to get them.
+ NetBSD developers doing bulk builds and wanting to upload them please see
+ Section 5.3.8, "Uploading results of a bulk build".
+
* packages
-
- First, check that your package is complete, compiles and runs well; see
+
+ First, check that your package is complete, compiles and runs well; see
Chapter 13, Debugging and the rest of this document. Next, generate an
uuencoded gzipped tar(1) archive, preferably with all files in a single
directory. Finally, send-pr with category "pkg", a synopsis which includes
the package name and version number, a short description of your package
(contents of the COMMENT variable or DESCR file are OK) and attach the
archive to your PR.
-
+
If you want to submit several packages, please send a separate PR for each
one, it's easier for us to track things that way.
-
+
Alternatively, you can also import new packages into pkgsrc-wip ("pkgsrc
work-in-progress"); see the homepage at http://pkgsrc-wip.sourceforge.net/
for details.
-
+
14.2. Committing: Importing a package into CVS
This section is only of interest for pkgsrc developers with write access to the
@@ -4233,7 +4302,7 @@ so people reading the mailing lists know what the package is/does.
Please note all package updates/additions in pkgsrc/doc/CHANGES. It's very
important to keep this file up to date and conforming to the existing format,
-because it will be used by scripts to automatically update pages on
+because it will be used by scripts to automatically update pages on
www.NetBSD.org and other sites. Additionally, check the pkgsrc/doc/TODO file
and remove the entry for the package you updated, in case it was mentioned
there.
@@ -4249,15 +4318,15 @@ are various reasons for this:
* A URL is volatile, and can change over time. It may go away completely or
its information may be overwritten by newer information.
-
+
* Having the change information between old and new versions in our CVS
repository is very useful for people who use either cvs or anoncvs.
-
+
* Having the change information between old and new versions in our CVS
repository is very useful for people who read the pkgsrc-changes mailing
list, so that they can make tactical decisions about when to upgrade the
package.
-
+
Please also recognise that, just because a new version of a package has been
released, it should not automatically be upgraded in the CVS repository. We
prefer to be conservative in the packages that are included in pkgsrc -
@@ -4269,54 +4338,54 @@ possibly untested features.
14.4. Moving a package in pkgsrc
1. Make a copy of the directory somewhere else.
-
+
2. Remove all CVS dirs.
-
+
Alternatively to the first two steps you can also do:
-
+
% cvs -d user@cvs.NetBSD.org:/cvsroot export -D today pkgsrc/category/package
-
+
and use that for further work.
-
+
3. Fix CATEGORIES and any DEPENDS paths that just did "../package" instead of
"../../category/package".
-
+
4. cvs import the modified package in the new place.
-
+
5. Check if any package depends on it:
-
+
% cd /usr/pkgsrc
% grep /package */*/Makefile* */*/buildlink*
-
+
6. Fix paths in packages from step 5 to point to new location.
-
+
7. cvs rm (-f) the package at the old location.
-
+
8. Remove from oldcategory/Makefile.
-
+
9. Add to newcategory/Makefile.
-
+
10. Commit the changed and removed files:
-
+
% cvs commit oldcategory/package oldcategory/Makefile newcategory/Makefile
-
+
(and any packages from step 5, of course).
-
+
Appendix A. A simple example package: bison
Table of Contents
A.1. files
-
+
A.1.1. Makefile
A.1.2. DESCR
A.1.3. PLIST
A.1.4. Checking a package with pkglint
-
+
A.2. Steps for building, installing, packaging
We checked to find a piece of software that wasn't in the packages collection,
-and picked GNU bison. Quite why someone would want to have bison when Berkeley
+and picked GNU bison. Quite why someone would want to have bison when Berkeley
yacc is already present in the tree is beyond us, but it's useful for the
purposes of this exercise.
@@ -4433,7 +4502,7 @@ cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DH
cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g closure.c
cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g conflicts.c
cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g derives.c
-cc -c -DXPFILE=\"/usr/pkg/share/bison.simple\" -DXPFILE1=\"/usr/pkg/share/bison.hairy\" -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -g ./files.c
+cc -c -DXPFILE=\"/usr/pkg/share/bison.simple\" -DXPFILE1=\"/usr/pkg/share/bison.hairy\" -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -g ./files.c
cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getargs.c
cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g gram.c
cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lalr.c
@@ -4504,8 +4573,8 @@ Connected to ftp.plig.net.
331 Guest login ok, send your complete e-mail address as password.
230-You are user #5 of 500 simultaneous users allowed.
230-
-230- ___ _ _ _
-230- | _| |_ ___ ___| |_|___ ___ ___ ___
+230- ___ _ _ _
+230- | _| |_ ___ ___| |_|___ ___ ___ ___
230- | _| _| . |_| . | | | . |_| . | _| . |
230- |_| |_| | _|_| _|_|_|_ |_|___|_| |_ |
230- |_| |_| |___| |___|
@@ -4522,7 +4591,7 @@ Connected to ftp.plig.net.
230-RSYNC: rsync://ftp.plig.org/ (max 30 connections)
230-
230-Please email comments, bug reports and requests for packages to be
-230-mirrored to ftp-admin@plig.org.
+230-mirrored to ftp-admin@plig.org.
230-
230-
230 Logged in anonymously.
@@ -4533,7 +4602,7 @@ Using binary mode to transfer files.
250-"/pub/figlet" is new cwd.
250-
250-Welcome to the figlet archive at ftp.figlet.org
-250-
+250-
250- ftp://ftp.figlet.org/pub/figlet/
250-
250-The official FIGlet web page is:
@@ -4541,7 +4610,7 @@ Using binary mode to transfer files.
250-
250-If you have questions, please mailto:info@figlet.org. If you want to
250-contribute a font or something else, you can email us.
-250
+250
250 "/pub/figlet/program" is new cwd.
250 "/pub/figlet/program/unix" is new cwd.
local: figlet221.tar.gz remote: figlet221.tar.gz
@@ -4591,7 +4660,7 @@ B.2. Packaging figlet
===> Building binary package for figlet-2.2.1nb2
Creating package /home/cvs/pkgsrc/packages/i386/All/figlet-2.2.1nb2.tgz
Using SrcDir value of /usr/pkg
-Registering depends:.
+Registering depends:.
#
Appendix C. Layout of the FTP server's package archive
@@ -4655,23 +4724,23 @@ Layout for precompiled binary packages on ftp.NetBSD.org:
SunOS-5.9/
sparc -> ../pkgsrc-2004Q1/SunOS-5.9/sparc
x86 -> ../pkgsrc-2004Q1/SunOS-5.9/x86
-
+
To create:
1. Run bulk build, see Section 5.3, "Doing a bulk build of all packages"
-
+
2. Upload /usr/pkgsrc/packages to
-
+
ftp://ftp.NetBSD.org/pub/NetBSD/packages/\
- pkgsrc-2004Q3/\ # pkgsrc-branch
+ pkgsrc-2004Q4/\ # pkgsrc-branch
`uname -s`-`uname -r`/ # OS & version
`uname -p` # architecture
-
-
+
+
3. If necessary, create a symlink ln -s `uname -m` `uname -p` (amiga -> m68k,
...)
-
+
Appendix D. Editing guidelines for the pkgsrc guide
Table of Contents
@@ -4687,20 +4756,20 @@ The pkgsrc guide's source code is stored in pkgsrc/doc/guide/files, and several
files are created from it:
* pkgsrc/doc/pkgsrc.txt, which replaces pkgsrc/Packages.txt
-
+
* pkgsrc/doc/pkgsrc.html
-
+
* http://www.NetBSD.org/Documentation/pkgsrc/: the documentation on the
NetBSD website will be built from pkgsrc and kept up to date on the web
server itself. This means you must make sure that your changes haven't
broken the build!
-
+
* http://www.NetBSD.org/Documentation/pkgsrc/pkgsrc.pdf: PDF version of the
pkgsrc guide.
-
+
* http://www.NetBSD.org/Documentation/pkgsrc/pkgsrc.ps: PostScript version of
the pkgsrc guide.
-
+
D.2. Procedure
The procedure to edit the pkgsrc guide is:
@@ -4711,24 +4780,24 @@ The procedure to edit the pkgsrc guide is:
PostScript- and PDF version. You will need both packages installed, to make
sure documentation is consistent across all formats. The packages can be
found in pkgsrc/meta-pkgs/netbsd-doc and pkgsrc/meta-pkgs/netbsd-doc-print.
-
+
* Edit the XML file(s) in pkgsrc/doc/guide/files.
-
+
* Run make extract && make do-lint in pkgsrc/doc/guide to check the XML
syntax, and fix it if needed.
-
+
* Run make in pkgsrc/doc/guide to build the HTML and ASCII version.
-
+
* If all is well, run make install-doc to put the generated files into pkgsrc
/doc.
-
+
* cvs commit pkgsrc/doc/guide/files
-
+
* cvs commit -m re-generate pkgsrc/doc/pkgsrc.{html,txt}
-
+
* Until the webserver on www.NetBSD.org is really updated automatically to
pick up changes to the pkgsrc guide automatically, also run make
install-htdoc HTDOCSDIR=../../../htdocs (or similar, adjust HTDOCSDIR!).
-
+
* cvs commit htdocs/Documentation/pkgsrc
-
+