From ca82f41a0c11b5d9f04495011c1f3aa325f20a90 Mon Sep 17 00:00:00 2001 From: wiz Date: Wed, 3 Aug 2005 16:35:14 +0000 Subject: regen (more variables documented) --- doc/pkgsrc.html | 3075 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 2039 insertions(+), 1036 deletions(-) (limited to 'doc/pkgsrc.html') diff --git a/doc/pkgsrc.html b/doc/pkgsrc.html index 11213d08a7e..ef1ee87169e 100644 --- a/doc/pkgsrc.html +++ b/doc/pkgsrc.html @@ -108,7 +108,7 @@ alink="#0000FF"> -
I. The pkgsrc +
1. The pkgsrc user's guide
@@ -227,7 +227,19 @@ alink="#0000FF">
5.1. Selecting Build + "#general-configuration">5.1. General + configuration
+ +
5.2. Variables + affecting the build process
+ +
5.3. + Developer/advanced settings
+ +
5.4. Selecting Build Options
@@ -372,7 +384,7 @@ alink="#0000FF"> -
II. The +
2. The pkgsrc developer's guide
@@ -384,11 +396,13 @@ alink="#0000FF">
8.1. 8.1. Makefile
8.2. 8.2. distinfo
files
8.6. - work*
+ work*
8.7. - files/*
9. - Programming in Makefiles
9.1. 9.1. Makefile variables
@@ -471,8 +490,9 @@ alink="#0000FF">
10.2. Semi-automatic - PLIST - generation
+ PLIST generation
10.3. Tweaking output of @@ -512,7 +532,8 @@ alink="#0000FF">
11.2. Writing - buildlink3.mk + buildlink3.mk files
@@ -526,20 +547,25 @@ alink="#0000FF"> BUILDLINK_DEPENDS.pkg in - buildlink3.mk + buildlink3.mk files
11.3. Writing 11.3. Writing builtin.mk files
11.3.1. Anatomy of a - builtin.mk + builtin.mk file
13.2. Converting packages - to use bsd.options.mk
@@ -882,63 +909,63 @@ alink="#0000FF"> -
A. A simple +
1. A simple example package: bison
-
A.1. +
1.1. files
A.1.1. Makefile
+ "#example-Makefile">1.1.1. Makefile
A.1.2. DESCR
+ "#example-descr">1.1.2. DESCR
A.1.3. PLIST
+ "#example-plist">1.1.3. PLIST
A.1.4. Checking a + "#checking-package-with-pkglint">1.1.4. Checking a package with pkglint
-
A.2. +
1.2. Steps for building, installing, packaging
-
B. Build +
2. Build logs
-
B.1. +
2.1. Building figlet
-
B.2. +
2.2. Packaging figlet
-
C. Layout +
3. Layout of the FTP server's package archive
-
D. Editing +
4. Editing guidelines for the pkgsrc guide
-
D.1. +
4.1. Targets
-
D.2. +
4.2. Procedure
@@ -1009,7 +1036,8 @@ alink="#0000FF">

www/apache - The Apache web + target="_top">www/apache - The Apache web server

@@ -1017,7 +1045,8 @@ alink="#0000FF">

www/mozilla - The Mozilla web + target="_top">www/mozilla - The Mozilla web browser

@@ -1025,7 +1054,8 @@ alink="#0000FF">

meta-pkgs/gnome - The GNOME + target="_top">meta-pkgs/gnome - The GNOME Desktop Environment

@@ -1033,7 +1063,8 @@ alink="#0000FF">

meta-pkgs/kde3 - The K Desktop + target="_top">meta-pkgs/kde3 - The K Desktop Environment

@@ -1119,16 +1150,16 @@ alink="#0000FF">

This document is divided into two parts. The first, The pkgsrc + "Part 1. The pkgsrc user's guide">The pkgsrc user's guide, describes how one can use one of the packages in the Package Collection, either by installing a precompiled binary package, or by building one's own copy using the NetBSD package system. The second part, The - pkgsrc developer's guide, explains how to prepare a - package so it can be easily built by other NetBSD users - without knowing about the package's building details.

+ "Part 2. The pkgsrc developer's guide">The pkgsrc + developer's guide, explains how to prepare a package so + it can be easily built by other NetBSD users without + knowing about the package's building details.

This document is available in various formats:

@@ -1178,7 +1209,8 @@ alink="#0000FF">

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.

@@ -1203,7 +1235,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 /usr/pkgsrc/distfiles.

@@ -1223,10 +1256,12 @@ alink="#0000FF">

A set of binaries built with pkgsrc from a distfile and stuffed together in a single - .tgz file so it can be + .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

The pkgsrc user's guide

+ "users-guide">Part 1. The pkgsrc user's + guide
@@ -1397,7 +1433,19 @@ alink="#0000FF">
5.1. Selecting Build + "#general-configuration">5.1. General + configuration
+ +
5.2. Variables affecting + the build process
+ +
5.3. + Developer/advanced settings
+ +
5.4. Selecting Build Options
@@ -1586,7 +1634,8 @@ alink="#0000FF"> file from ftp.NetBSD.org and unpack it into - /usr/pkgsrc.

+ /usr/pkgsrc.

@@ -1606,12 +1655,14 @@ alink="#0000FF"> release=pkgsrc -

in it, see the examples in in it, see the examples in /usr/share/examples/supfiles, and that - the /usr/pkgsrc directory - exists. Then, simply run sup -v /path/to/your/supfile.

+ the /usr/pkgsrc directory exists. Then, + simply run sup -v + /path/to/your/supfile.

@@ -1639,10 +1690,13 @@ release=pkgsrc "userinput">cvs checkout -P pkgsrc -

This will create the pkgsrc directory in your This will create the pkgsrc directory in your /usr, and all the package source will - be stored under /usr/pkgsrc. To update pkgsrc after the initial checkout, make sure you have CVS_RSH set as above, then do:

@@ -1785,10 +1839,12 @@ release=pkgsrc Where to get pkgsrc for other ways to get pkgsrc before bootstrapping. The given bootstrap - command will use the defaults of /usr/pkg for the prefix where programs will be - installed in, and /var/db/pkg for the package database directory where pkgsrc will do its internal bookkeeping. However, these can also be set using command-line @@ -1898,11 +1954,15 @@ release=pkgsrc
-

By default, /usr - will be on your root file system, normally HFS+. It - is possible to use the default prefix of /usr/pkg by symlinking By default, /usr will be on your root file + system, normally HFS+. It is possible to use the + default prefix + of /usr/pkg by symlinking /usr/pkg to a directory on a UFS file system. Obviously, another symlink is required if you want to place the package database directory @@ -1916,12 +1976,14 @@ release=pkgsrc

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 - /Volumes/<volume - name> when the machine boots. If you are - (re)formatting a partition as UFS, you need to ensure - that the partition map correctly reflects - “Apple_UFS” - and not “/Volumes/<volume name> when + the machine boots. If you are (re)formatting a + partition as UFS, you need to ensure that the + partition map correctly reflects “Apple_UFS” and not + “Apple_HFS”.

The problem is that none of the disk tools will @@ -1969,9 +2031,12 @@ release=pkgsrc

  1. FreeBSD stores its ports pkg database in - /var/db/pkg. It is - therefore recommended that you choose a different - location (e.g. /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. @@ -1995,9 +2060,11 @@ release=pkgsrc
  3. -

    An example An example /etc/mk.conf file will be - placed in /etc/mk.conf.example file when you use the bootstrap script.

  4. @@ -2226,10 +2293,12 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi:

    Therefore, please make sure that you have no conflicting CFLAGS in your - environment or the /etc/mk.conf. Particularly, make sure that you do not try to link n32 object files with lib64 - or vice versa. Check your /etc/compiler.defaults!

    If you have the actual pkgsrc tree mounted via NFS @@ -2242,7 +2311,8 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi:

    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 pkgsrc/mk/defaults/mk.conf and, of course, your compiler's man pages for details.

    @@ -2252,10 +2322,13 @@ interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: PKGSRC_COMPILER=mipspro -

    in /etc/mk.conf. - Otherwise, pkgsrc will assume you are using gcc and may - end up passing invalid flags to the compiler. Note that - bootstrap should create an appropriate in /etc/mk.conf. Otherwise, pkgsrc will + assume you are using gcc and may end up passing invalid + flags to the compiler. Note that bootstrap should + create an appropriate mk.conf.example by default.

    If you have both the MIPSPro compiler chain @@ -2263,7 +2336,8 @@ PKGSRC_COMPILER=mipspro MIPRPro is used, please set your PATH to not include the location of - gcc (often /usr/freeware/bin), and (important) pass the '--preserve-path' flag.

    @@ -2312,17 +2386,20 @@ env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \ __attribute__ is assumed supported by the compiler.

    After bootstrapping, you should set PKGSRC_COMPILER in PKGSRC_COMPILER in /etc/mk.conf:

     PKGSRC_COMPILER=icc
     

    The default installation directory for icc is - /opt/intel_cc_80, which - is also the pkgsrc default. If you have installed it - into a different directory, set ICCBASE in /opt/intel_cc_80, which is also + the pkgsrc default. If you have installed it into a + different directory, set ICCBASE in /etc/mk.conf:

     ICCBASE=/opt/icc
    @@ -2366,9 +2443,12 @@ ICCBASE=/opt/icc
                   
    1. OpenBSD stores its ports pkg database in - /var/db/pkg. It is - therefore recommended that you choose a different - location (e.g. /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. @@ -2392,12 +2472,15 @@ ICCBASE=/opt/icc
    3. -

      An example 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:

      @@ -2477,8 +2560,9 @@ ICCBASE=/opt/icc lang/gcc or install a binary gcc - package, then remove gcc used during + target="_top">lang/gcc or install a binary + gcc package, then remove gcc used during bootstrapping.

      Binary packages of gcc can be found through @@ -2527,7 +2611,8 @@ ICCBASE=/opt/icc

      You should set CC, CXX and optionally, - CPP in CPP in /etc/mk.conf, eg.

       CC=     cc
      @@ -2544,8 +2629,11 @@ CFLAGS= -xtarget=ultra -xarch=v9
                     

      Whichever compiler you use, please ensure the compiler tools and your $prefix are in your PATH. This includes - /usr/ccs/{bin,lib} and - eg. /usr/ccs/{bin,lib} and eg. + /usr/pkg/{bin,sbin}.

      @@ -2639,7 +2727,8 @@ CFLAGS= -xtarget=ultra -xarch=v9

      Precompiled packages are stored on ftp.NetBSD.org - and its mirrors in the directory /pub/NetBSD/packages/<OSVERSION>/<ARCH>/ for anonymous FTP access. OSVERSION is the NetBSD version @@ -2648,16 +2737,21 @@ CFLAGS= -xtarget=ultra -xarch=v9 is the architecture (uname -p). In that directory, there is a subdirectory for each category plus a - subdirectory All which - includes the actual binaries in All which includes the actual + binaries in .tgz files. The category subdirectories use symbolic links to those files (this - is the same directory layout as in /usr/pkgsrc/packages).

      This same directory layout applies for CDROM distributions, only that the directory may be rooted - somewhere else, probably somewhere below /cdrom. Please consult your CDROMs documentation for the exact location.

      @@ -2702,32 +2796,40 @@ CFLAGS= -xtarget=ultra -xarch=v9 semicolon separated list of paths (including remote URLs); trailing slashes are not allowed.

      -

      Additionally to the Additionally to the All directory there exists a - vulnerable directory to - which binary packages with known vulnerabilities are - moved, since removing them could cause missing - dependencies. To use these packages, add the - vulnerable directory to - your PKG_PATH. However, - you should run vulnerable directory to which + binary packages with known vulnerabilities are moved, + since removing them could cause missing dependencies. + To use these packages, add the vulnerable directory to your + PKG_PATH. However, you + should run security/audit-packages regularly, - and especially after installing new packages, and - verify that the vulnerabilities are acceptable for your - configuration. An example PKG_PATH would be: security/audit-packages + regularly, and especially after installing new + packages, and verify that the vulnerabilities are + acceptable for your configuration. An example + PKG_PATH would be: + ftp://ftp.NetBSD.org/pub/NetBSD/packages/<OSVERSION>/<ARCH>/All;ftp://ftp.NetBSD.org/pub/NetBSD/packages/<OSVERSION>/<ARCH>/vulnerable Please note that semicolon (';') is a shell meta-character, so you'll probably have to quote it.

      After you've installed packages, be sure to have - /usr/pkg/bin and - /usr/pkg/sbin in your - PATH so you can actually - start the just installed program.

      + /usr/pkg/bin and /usr/pkg/sbin in your PATH so you can actually start the + just installed program.

      @@ -2767,7 +2869,7 @@ CFLAGS= -xtarget=ultra -xarch=v9

      This assumes that the package is already in pkgsrc. If it is not, see Part II, + "Part 2. The pkgsrc developer's guide">Part 2, “The pkgsrc developer's guide” for instructions how to create your own packages.

      @@ -2809,7 +2911,8 @@ CFLAGS= -xtarget=ultra -xarch=v9

      You can overwrite some of the major distribution sites to fit to sites that are close to your own. Have - a look at pkgsrc/mk/defaults/mk.conf to find some examples — in particular, look for the MASTER_SORT, You can change these settings either in your shell's environment, or, if you want to keep the settings, by - editing the /etc/mk.conf - file, and adding the definitions there.

      + editing the /etc/mk.conf file, and adding the + definitions there.

      If you don't have a permanent Internet connection and you want to know which files to download, make fetch-list will tell you what you'll - need. Put these distfiles into /usr/pkgsrc/distfiles.

      @@ -2870,16 +2976,18 @@ CFLAGS= -xtarget=ultra -xarch=v9

      Taking the figlet utility as an example, we can install it on our system by building as shown in Appendix B, Build + "Appendix 2. Build logs">Appendix 2, Build logs.

      The program is installed under the default root of - the packages tree - /usr/pkg. Should this not conform to your tastes, set the LOCALBASE variable in your environment, and it will use that value as the root of - your packages tree. So, to use /usr/local, set LOCALBASE=/usr/local in your environment. Please note that you should use a @@ -2887,23 +2995,28 @@ CFLAGS= -xtarget=ultra -xarch=v9 with other programs (ie, do not try and use LOCALBASE=/usr). Also, you should not try to add any of your own files or - directories (such as src/, obj/, or src/, obj/, or pkgsrc/) below the LOCALBASE 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.

      -

      Some packages look in Some packages look in /etc/mk.conf to alter some configuration options at build time. Have a look at - pkgsrc/mk/defaults/mk.conf to get an - overview of what will be set there by default. + pkgsrc/mk/defaults/mk.conf to + get an overview of what will be set there by default. Environment variables such as LOCALBASE can be set in LOCALBASE can be set in /etc/mk.conf to save having to remember to set them each time you want to use pkgsrc.

      @@ -2981,7 +3094,8 @@ CFLAGS= -xtarget=ultra -xarch=v9 pkg_add(1) can be put into BIN_INSTALL_FLAGS. - See pkgsrc/mk/defaults/mk.conf for more details.

      @@ -2994,9 +3108,10 @@ CFLAGS= -xtarget=ultra -xarch=v9 installed packages, and fail miserably. Note also that precompiled binary packages are usually built with the default LOCALBASE of - /usr/pkg, and that you - should not - install any if you use a non-standard /usr/pkg, and that you should + not install any + if you use a non-standard LOCALBASE.

      @@ -3107,7 +3222,19 @@ CFLAGS= -xtarget=ultra -xarch=v9
      5.1. Selecting Build + "#general-configuration">5.1. General + configuration
      + +
      5.2. Variables affecting + the build process
      + +
      5.3. Developer/advanced + settings
      + +
      5.4. Selecting Build Options
      @@ -3117,9 +3244,225 @@ CFLAGS= -xtarget=ultra -xarch=v9

      5.1. Selecting Build - Options

      + "general-configuration" id= + "general-configuration">5.1. General + configuration +
      +
      + + +

      In this section you can find some variables that apply + all pkgsrc packages. The preferred method of setting them + is by setting them in /etc/mk.conf.

      + +
      +
        +
      • +

        LOCALBASE: Where + packages will be installed. The default is + /usr/pkg. Do not mix binary + packages with different LOCALBASEs!

        +
      • + +
      • +

        CROSSBASE: Where + “cross” + category packages will be installed. The default is + ${LOCALBASE}/cross.

        +
      • + +
      • +

        X11BASE: Where X11 + is installed on the system. The default is + /usr/X11R6.

        +
      • + +
      • +

        DISTDIR: Where to + store the downloaded copies of the original source + distributions used for building pkgsrc packages. + The default is ${PKGSRCDIR}/distfiles.

        +
      • + +
      • +

        MASTER_SITE_OVERRIDE: If set, + override the packages' MASTER_SITES with this value.

        +
      • + +
      • +

        MASTER_SITE_BACKUP: + Backup location(s) for distribution files and patch + files if not found locally or in ${MASTER_SITES} or ${PATCH_SITES} respectively. The + defaults are ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/${DIST_SUBDIR}/ + and ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/.

        +
      • + +
      • +

        BINPKG_SITES: List + of sites carrying binary pkgs.

        +
      • +
      +
      + + +
      +
      +
      +
      +

      5.2. Variables + affecting the build process

      +
      +
      +
      + +

      XXX

      + +
      +
        +
      • +

        PACKAGES: The top + level directory for the binary packages. The + default is ${PKGSRCDIR}/packages.

        +
      • + +
      • +

        WRKOBJDIR: The top + level directory where, if defined, the separate + working directories will get created, and + symbolically linked to from ${WRKDIR} (see below). This is + useful for building packages on several + architectures, then ${PKGSRCDIR} can be NFS-mounted + while ${WRKOBJDIR} is local to every + architecture. (It should be noted that PKGSRCDIR should not be set by the + user — it is an internal definition which + refers to the root of the pkgsrc tree. It is + possible to have many pkgsrc tree instances.)

        +
      • + +
      • +

        LOCALPATCHES: + Directory for local patches that aren't part of + pkgsrc. See Section 8.3, + “patches/*” for more information. + rel and + arch are + replaced with OS release (“2.0”, etc.) and architecture + (“mipsel”, + etc.).

        +
      • + +
      • +

        PKGMAKECONF: + Location of the mk.conf file used by a package's + BSD-style Makefile. If this is not set, + MAKECONF is set to + /dev/null to avoid picking up + settings used by builds in /usr/src.

        +
      • +
      +
      +
      + +
      +
      +
      +
      +

      5.3. Developer/advanced + settings

      +
      +
      +
      + +

      XXX

      + +
      +
        +
      • +

        PKG_DEVELOPER: Run + some sanity checks that package developers + want:

        + +
        +
          +
        • +

          make sure patches apply with zero fuzz

          +
        • + +
        • +

          run check-shlibs to see that all binaries + will find their shared libs.

          +
        • +
        +
        +
      • + +
      • +

        PKG_DEBUG_LEVEL: + The level of debugging output which is displayed + whilst making and installing the package. The + default value for this is 0, which will not display + the commands as they are executed (normal, default, + quiet operation); the value 1 will display all + shell commands before their invocation, and the + value 2 will display both the shell commands before + their invocation, and their actual execution + progress with set + -x will be displayed.

        +
      • +
      +
      +
      + +
      +
      +
      +
      +

      5.4. Selecting + Build Options

      @@ -3148,7 +3491,8 @@ CFLAGS= -xtarget=ultra -xarch=v9
      -

      The following variables can be defined in The following variables can be defined in /etc/mk.conf to select which options to enable for a package: PKG_DEFAULT_OPTIONS, which can be used @@ -3201,11 +3545,13 @@ CFLAGS= -xtarget=ultra -xarch=v9

      Before the options framework was introduced, build options were selected by setting a variable in - /etc/mk.conf for each - option. To ease transition to the options framework for - the user, these legacy variables are converted to the - appropriate options setting automatically. A warning is - issued to prompt the user to update /etc/mk.conf for each option. To + ease transition to the options framework for the user, + these legacy variables are converted to the appropriate + options setting automatically. A warning is issued to + prompt the user to update /etc/mk.conf to use the options framework directly. Support for these legacy variables will be removed eventually.

      @@ -3326,15 +3672,17 @@ CFLAGS= -xtarget=ultra -xarch=v9 already done), and then build a binary package from what was installed. You can then use the pkg_* tools to manipulate it. - Binary packages are created by default in /usr/pkgsrc/packages, in the form of a gzipped tar file. See Section B.2, + "2.2. Packaging figlet">Section 2.2, “Packaging figlet” for a continuation of the above misc/figlet example.

      + target="_top">misc/figlet example.

      See Chapter @@ -3405,8 +3753,10 @@ CFLAGS= -xtarget=ultra -xarch=v9 -

      You may want to set variables in /etc/mk.conf. Look at You may want to set variables in /etc/mk.conf. Look at pkgsrc/mk/defaults/mk.conf for details of the default settings. You will want to ensure that

      6.3.1.2. build.conf

      + "build.conf">6.3.1.2. build.conf
      -

      In pkgsrc/mk/bulk, - copy build.conf-example - to build.conf 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 the - user to which user to In pkgsrc/mk/bulk, copy build.conf-example to build.conf 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 the user to which + user to su(8) to do a @@ -3457,24 +3812,29 @@ _ACCEPTABLE= yes

      6.3.1.3.  - pre-build.local

      + "pre-build.local">6.3.1.3. pre-build.local

      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 pre-build.local exists in - /usr/pkgsrc/mk/bulk, it - will be executed (as a /usr/pkgsrc/mk/bulk, it will be + executed (as a sh(1) script) at the end of the usual pre-build stage. An example use - of pre-build.local is - to have the line:

      + of pre-build.local is to have the + line:

       # echo "I do not have enough disk space to build this pig." \
      @@ -3499,24 +3859,28 @@ _ACCEPTABLE=    yes
                     
                   
       
      -            

      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 +

      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 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 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 - rc.local:

      + /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 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 + rc.local:

       ( cd /usr/pkgsrc/security/ssh ; make bulk-install )
       if [ -f /usr/pkg/etc/rc.d/sshd ]; then
      @@ -3554,8 +3918,9 @@ fi
       
                   

      Be sure to remove all other things that might interfere with builds, like some libs installed in - /usr/local, etc. then - become root and type:

      + /usr/local, etc. then become + root and type:

       # cd /usr/pkgsrc
      @@ -3574,7 +3939,8 @@ fi
                   

      At the end of the bulk build, you will get a summary via mail, and find build logs in the directory specified by FTP in the - build.conf file.

      + build.conf file.

      @@ -3615,18 +3981,23 @@ fi

      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.

      + 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 /usr/pkgsrc/.broken (or .../.broken.${MACHINE} if OBJMACHINE is set), individual build logs of broken builds can be found in @@ -3697,13 +4068,16 @@ fi package bulk build inside a chroot environment.

      The first step is to set up a chroot sandbox, e.g. - /usr/sandbox. This can be - done by using null mounts, or manually.

      + /usr/sandbox. This can be done + by using null mounts, or manually.

      -

      There is a shell script called There is a shell script called pkgsrc/mk/bulk/mksandbox which will set up the sandbox environment using null mounts. It - will also create a script called sandbox in the root of the sandbox environment, which will allow the null mounts to be activated using the To set up a sandbox environment by hand, after extracting all the sets from a NetBSD installation or doing a make distribution - DESTDIR=/usr/sandbox in in /usr/src/etc, be sure the following items are present and properly configured:

      @@ -3729,7 +4104,9 @@ fi
    4. -

      /dev/*

      +

      /dev/*

       # cd /usr/sandbox/dev ; sh MAKEDEV all
      @@ -3737,11 +4114,14 @@ fi
                       
    5. -

      /etc/resolv.conf - (for /etc/resolv.conf (for security/smtpd and mail):

      + target="_top">security/smtpd and + mail):

       # cp /etc/resolv.conf /usr/sandbox/etc
      @@ -3758,11 +4138,13 @@ fi
                       
    6. -

      /etc/localtime - (for /etc/localtime (for security/smtpd):

      + target="_top">security/smtpd):

       # ln -sf /usr/share/zoneinfo/UTC /usr/sandbox/etc/localtime
      @@ -3770,14 +4152,19 @@ fi
                       
    7. -

      /usr/src (system - sources, for /usr/src (system sources, for + sysutils/aperture, sysutils/aperture, + net/ppp-mppe):

      + target="_top">net/ppp-mppe):

       # ln -s ../disk1/cvs .
      @@ -3787,7 +4174,8 @@ fi
                       
    8. -

      Create Create /var/db/pkg (not part of default install):

      @@ -3797,8 +4185,10 @@ fi
                       
    9. -

      Create /usr/pkg - (not part of default install):

      +

      Create /usr/pkg (not part of default + install):

       # mkdir /usr/sandbox/usr/pkg
      @@ -3806,7 +4196,8 @@ fi
                       
    10. -

      Checkout pkgsrc via cvs into Checkout pkgsrc via cvs into /usr/sandbox/usr/pkgsrc:

       # 
       
                       
    11. -

      Make Make /usr/sandbox/usr/pkgsrc/packages - and .../distfiles - point somewhere appropriate. NFS- and/or - nullfs-mounts may come in handy!

      + and .../distfiles point somewhere + appropriate. NFS- and/or nullfs-mounts may come + in handy!

    12. -

      Edit Edit /etc/mk.conf, see Section 6.3.1.1, @@ -3837,14 +4232,16 @@ fi

    13. -

      Adjust Adjust mk/bulk/build.conf to suit your needs.

    14. If you have set CVS_USER in CVS_USER in build.conf, make sure that account exists and can do a cvs ${CVS_FLAGS} update @@ -3865,7 +4262,8 @@ fi

      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 /usr/sandbox/usr/pkgsrc/packages (wherever that points/mounts to/from).

      @@ -3883,11 +4281,13 @@ fi

      In addition to building a complete set of all - packages in pkgsrc, the pkgsrc/mk/bulk/build script may be used to build a subset of the packages contained in pkgsrc. By setting defining SPECIFIC_PKGS in SPECIFIC_PKGS in /etc/mk.conf, the variables

      @@ -3941,21 +4341,23 @@ fi

      If you would like to automatically create checksum files for the binary packages you intend to upload, remember to set MKSUMS=yes - in your mk/bulk/build.conf.

      If you would like to PGP sign the checksum files (highly recommended!), remember to set SIGN_AS=username@NetBSD.org in your - mk/bulk/build.conf. This - will prompt you for your GPG password to sign the files + mk/bulk/build.conf. This will + prompt you for your GPG password to sign the files before uploading everything.

      Then, 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:

      + 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 
       
      @@ -3970,20 +4372,23 @@ RSYNC_DST=$CVS_USER@ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b RSYNC_DST=hubertf@ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload
    15. -

      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:

      +

      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 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 @@ -4002,11 +4407,13 @@ chroot-# cat $HOME/.ssh/id-dsa.pub

    -

    Now take the output of 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!

    + ~/.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:

    @@ -4038,8 +4445,8 @@ chroot-# vulnerable
    -            subdirectory.

    + vulnerable subdirectory.

    After the upload has ended, first thing is to revoke ssh access:

    @@ -4051,8 +4458,10 @@ 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:

    + the upload directory to have them + accessible to everyone:

     nbftp% cd /pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch
    @@ -4082,7 +4491,8 @@ nbftp% chmod 755 .
               machines. The pkgtools/cdpack package provides a
    +          target="_top">pkgtools/cdpack package provides a
               simple tool for creating the ISO 9660 images.
               cdpack
               arranges the packages on the CD-ROMs in a way that keeps
    @@ -4102,9 +4512,11 @@ nbftp% chmod 755 .
     
                 

    Complete documentation for cdpack is found in the cdpack(1) manpage. The following short example assumes - that the binary packages are left in /usr/pkgsrc/packages/All and that - sufficient disk space exists in /u2 to hold the ISO 9660 images.

     # chmod 755 .
     

    If you wish to include a common set of files - (COPYRIGHT, COPYRIGHT, README, etc.) on each CD in the collection, then you need to create a directory which contains these files. e.g.

    @@ -4143,9 +4557,12 @@ nbftp% chmod 755 . "userinput">cdpack -x /tmp/common /usr/pkgsrc/packages/All /u2/images
    -

    Each image will contain README, COPYING, and Each image will contain README, COPYING, and bin/myscript in their root directories.

    @@ -4308,7 +4725,8 @@ nbftp% chmod 755 .

    Pkgviews is tightly integrated with buildlink. You can - find a pkgviews User's guide in pkgsrc/mk/buildlink3/PKGVIEWS_UG.

    @@ -4324,12 +4742,14 @@ nbftp% chmod 755 . -

    The pkgsrc/pkgtools - 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 - and when they might be useful, and not to duplicate the - documentation that comes with each package.

    +

    The pkgsrc/pkgtools 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 and when they might be + useful, and not to duplicate the documentation that comes + with each package.

    Utilities used by pkgsrc (automatically installed when needed):

    @@ -4340,7 +4760,8 @@ nbftp% chmod 755 .

    pkgtools/x11-links: Symlinks + target="_top">pkgtools/x11-links: Symlinks for use by buildlink.

    @@ -4355,7 +4776,8 @@ nbftp% chmod 755 .

    pkgtools/digest: Calculates + target="_top">pkgtools/digest: Calculates various kinds of checksums (including SHA1).

    @@ -4363,7 +4785,8 @@ nbftp% chmod 755 .

    pkgtools/libnbcompat: + target="_top">pkgtools/libnbcompat: Compatibility library for pkgsrc tools.

    @@ -4371,7 +4794,8 @@ nbftp% chmod 755 .

    pkgtools/mtree: Installed on + target="_top">pkgtools/mtree: Installed on non-BSD systems due to lack of native mtree.

    @@ -4379,8 +4803,10 @@ nbftp% chmod 755 .

    pkgtools/pkg_install: - Up-to-date replacement for pkgtools/pkg_install: + Up-to-date replacement for /usr/sbin/pkg_install, or for use on operating systems where pkg_install is not present.

    @@ -4397,7 +4823,8 @@ nbftp% chmod 755 .

    pkgtools/pkg_tarup: Create a + target="_top">pkgtools/pkg_tarup: Create a binary package from an already-installed package. Used by make replace to save the old @@ -4408,7 +4835,8 @@ nbftp% chmod 755 .

    pkgtools/dfdisk: Adds extra + target="_top">pkgtools/dfdisk: Adds extra functionality to pkgsrc, allowing it to fetch distfiles from multiple locations. It currently supports the following methods: multiple CD-ROMs @@ -4419,7 +4847,8 @@ nbftp% chmod 755 .

    pkgtools/xpkgwedge: Put X11 + target="_top">pkgtools/xpkgwedge: Put X11 packages someplace else (enabled by default).

    @@ -4427,7 +4856,8 @@ nbftp% chmod 755 .

    devel/cpuflags: Determine the + target="_top">devel/cpuflags: Determine the best compiler flags to optimise code for your current CPU and compiler.

    @@ -4443,7 +4873,8 @@ nbftp% chmod 755 .

    pkgtools/pkg_chk: Reports on + target="_top">pkgtools/pkg_chk: Reports on packages whose installed versions do not match the latest pkgsrc entries.

    @@ -4452,7 +4883,8 @@ nbftp% chmod 755 .

    pkgtools/pkgdep: Makes + target="_top">pkgtools/pkgdep: Makes dependency graphs of packages, to aid in choosing a strategy for updating.

    @@ -4461,11 +4893,13 @@ nbftp% chmod 755 .

    pkgtools/pkgdepgraph: Makes + target="_top">pkgtools/pkgdepgraph: Makes graphs from the output of pkgtools/pkgdep (uses + target="_top">pkgtools/pkgdep (uses graphviz).

    @@ -4473,7 +4907,8 @@ nbftp% chmod 755 .

    pkgtools/pkglint: The + target="_top">pkgtools/pkglint: The pkglint(1) program checks a pkgsrc entry for errors, lintpkgsrc(1) does various checks on the complete pkgsrc system.

    @@ -4483,8 +4918,9 @@ nbftp% chmod 755 .

    pkgtools/pkgsurvey: Report what - packages you have installed.

    + target="_top">pkgtools/pkgsurvey: Report + what packages you have installed.

    @@ -4498,7 +4934,8 @@ nbftp% chmod 755 .

    pkgtools/pkgdiff: Automate + target="_top">pkgtools/pkgdiff: Automate making and maintaining patches for a package (includes pkgdiff, pkgvi, mkpatches, etc.).

    @@ -4507,10 +4944,12 @@ nbftp% chmod 755 .

    pkgtools/rpm2pkg, pkgtools/rpm2pkg, pkgtools/url2pkg: Aids in + target="_top">pkgtools/url2pkg: Aids in converting to pkgsrc.

    @@ -4518,7 +4957,8 @@ nbftp% chmod 755 .

    pkgtools/gensolpkg: Convert + target="_top">pkgtools/gensolpkg: Convert pkgsrc to a Solaris package.

    @@ -4533,7 +4973,8 @@ nbftp% chmod 755 .

    pkgtools/pkgconflict: Find + target="_top">pkgtools/pkgconflict: Find packages that conflict but aren't marked as such.

    @@ -4542,7 +4983,8 @@ nbftp% chmod 755 .

    pkgtools/pkg_comp: Build + target="_top">pkgtools/pkg_comp: Build packages in a chrooted area.

    @@ -4550,8 +4992,9 @@ nbftp% chmod 755 .

    pkgtools/libkver: Spoof kernel - version for chrooted cross builds.

    + target="_top">pkgtools/libkver: Spoof + kernel version for chrooted cross builds.

    @@ -4592,7 +5035,8 @@ nbftp% chmod 755 .--ignore-user-check” flag, as it will choose and use multiple default directories under - ~/pkg as the installation + ~/pkg as the installation targets. These directories can be overriden by the “--prefix” flag provided by the script, as well as some others that allow @@ -4614,9 +5058,11 @@ nbftp% chmod 755 .

    By default resuming transfers in pkgsrc is disabled, but you can enable this feature by adding the option PKG_RESUME_TRANSFERS=YES - into /etc/mk.conf. If, - during a fetch step, an incomplete distfile is found, - pkgsrc will try to resume it.

    + into /etc/mk.conf. If, during a fetch step, + an incomplete distfile is found, pkgsrc will try to + resume it.

    You can also use a different program than the default chmod 755 . "varname">FETCH_OUTPUT_ARGS if you are not using default values.

    -

    For example, if you want to use For example, if you want to use wget to resume downloads, you'll have to use something like:

    @@ -4653,10 +5100,13 @@ FETCH_OUTPUT_ARGS=-O
               
     
               

    If you want to use XFree86 from pkgsrc instead of your - system's own X11 (/usr/X11R6, /usr/X11R6, /usr/openwin, ...), you will have to - add the following line into /etc/mk.conf:

     X11_TYPE=XFree86
    @@ -4676,10 +5126,13 @@ X11_TYPE=XFree86
               
     
               

    If you want to use X.org from pkgsrc instead of your - system's own X11 (/usr/X11R6, /usr/X11R6, /usr/openwin, ...) you will have to add - the following line into /etc/mk.conf:

     X11_TYPE=xorg
    @@ -4725,32 +5178,40 @@ http_proxy=http://orpheus.amdahl.com:80/
               
     
               

    This depends on which utility is used to retrieve - distfiles. From bsd.pkg.mk, - FETCH_CMD is assigned the - first available command from the following list:

    + distfiles. From bsd.pkg.mk, FETCH_CMD is assigned the first + available command from the following list:

    • -

      ${LOCALBASE}/bin/ftp

    • -

      /usr/bin/ftp

      +

      /usr/bin/ftp

    On a default NetBSD installation, this will be - /usr/bin/ftp, 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 - /etc/mk.conf file: - PASSIVE_FETCH=1.

    - -

    Having that option present will prevent /usr/bin/ftp, 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 /etc/mk.conf file: PASSIVE_FETCH=1.

    + +

    Having that option present will prevent /usr/bin/ftp from falling back to active transfers.

    @@ -4777,7 +5238,8 @@ http_proxy=http://orpheus.amdahl.com:80/ entire directory may not be appropriate.

    The answer here is to do a make fetch-list in make fetch-list in /usr/pkgsrc 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 @@ -4805,7 +5267,8 @@ http_proxy=http://orpheus.amdahl.com:80/ "userinput">sh /tmp/fetch.sh

    -

    then tar up then tar up /tmp/distfiles and take it home.

    If you have a machine running NetBSD, and you want to @@ -4845,10 +5308,12 @@ http_proxy=http://orpheus.amdahl.com:80/

    When compiling the pkgtools/pkg_install package, you get - the error from make that it doesn't know how to make - /usr/share/tmac/tmac.andoc? - This indicates that you don't have installed the + target="_top">pkgtools/pkg_install package, you + get the error from make that it doesn't know how to make + /usr/share/tmac/tmac.andoc? This + indicates that you don't have installed the “text” set (nroff, ...) from the NetBSD base distribution on your machine. It is recommended to do that to format manpages.

    @@ -4856,10 +5321,12 @@ http_proxy=http://orpheus.amdahl.com:80/

    In the case of the pkgtools/pkg_install package, you can - get away with setting pkgtools/pkg_install package, you + can get away with setting NOMAN=YES either in the environment or - in /etc/mk.conf.

    + in /etc/mk.conf.

    @@ -4875,10 +5342,13 @@ http_proxy=http://orpheus.amdahl.com:80/
    -

    You didn't install the compiler set, You didn't install the compiler set, comp.tgz, when you installed your NetBSD machine. Please get it and install it, by - extracting it in /:

    + extracting it in /:

     # cd /
    @@ -4886,10 +5356,11 @@ http_proxy=http://orpheus.amdahl.com:80/
     "userinput">tar --unlink -zxvpf .../comp.tgz
     
    -

    comp.tgz is part of - every NetBSD release. Get the one that corresponds to - your release (determine via uname -r).

    +

    comp.tgz is part of every NetBSD + release. Get the one that corresponds to your release + (determine via uname + -r).

    @@ -4916,8 +5387,10 @@ http_proxy=http://orpheus.amdahl.com:80/ (either as binary package or from security/sudo) and then put the - following into your security/sudo) and then put the + following into your /etc/mk.conf:

     .if exists(${LOCALBASE}/bin/sudo)
    @@ -4939,7 +5412,8 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c
     
               

    As the system administrator, you can choose where configuration files are installed. The default settings - make all these files go into ${PREFIX}/etc or some of its subdirectories; this may be suboptimal depending on your expectations (e.g., a read-only, NFS-exported @@ -4948,10 +5422,14 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c

    In order to change the defaults, you can modify the PKG_SYSCONFBASE variable (in - /etc/mk.conf) to point to - your preferred configuration directory; some common - examples include /etc or - /etc/pkg.

    + /etc/mk.conf) to point to your + preferred configuration directory; some common examples + include /etc or /etc/pkg.

    Furthermore, you can change this value on a per-package basis by setting the security/audit-packages package. It + target="_top">security/audit-packages package. It has two components:

    @@ -5024,7 +5503,8 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c

    Use of the security/audit-packages package is + target="_top">security/audit-packages package is strongly recommended! After “audit-packages” is installed, please read the package's message, which you can get by running @@ -5039,8 +5519,8 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c

    The pkgsrc developer's - guide

    + "developers-guide">Part 2. The pkgsrc + developer's guide
    @@ -5056,11 +5536,13 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c
    8.1. 8.1. Makefile
    8.2. 8.2. distinfo
    8.6. - work*
    + work*
    8.7. - files/*
    + files/*
    9. - Programming in Makefiles
    9.1. 9.1. Makefile variables
    @@ -5140,8 +5628,9 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c
    10.2. Semi-automatic - PLIST - generation
    + PLIST generation
    10.3. Tweaking output of make @@ -5179,7 +5668,8 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c to use buildlink3
    11.2. Writing 11.2. Writing buildlink3.mk files
    @@ -5192,22 +5682,25 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c "#updating-buildlink-depends">11.2.2. Updating BUILDLINK_DEPENDS. - pkg in pkg in buildlink3.mk files
    11.3. Writing 11.3. Writing builtin.mk files
    11.3.1. Anatomy of a - builtin.mk - file
    + builtin.mk file
    11.3.2. Global @@ -5304,7 +5797,8 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c
    13.2. Converting packages to - use bsd.options.mk
    @@ -5562,11 +6056,13 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c
    8.1. 8.1. Makefile
    8.2. 8.2. distinfo
    8.6. - work*
    + work*
    8.7. - files/*
    + files/*
    @@ -5598,21 +6096,26 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c

    8.1. 8.1. Makefile

    Building, installation and creation of a binary - package are all controlled by the package's Makefile. The Makefile. The Makefile describes various things about a package, for example from where to get it, how to configure, build, and install it.

    -

    A package Makefile - contains several sections that describe the package.

    +

    A package Makefile contains several sections that + describe the package.

    In the first section there are the following variables, which should appear exactly in the order given @@ -5644,26 +6147,159 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c list of categories which the package fits in. You can choose any of the top-level directories of pkgsrc for it.

    + +

    Currently the following values are available for + CATEGORIES. If more + than one is used, they need to be separated by + spaces:

    +
    +archivers     cross         geography     meta-pkgs     security
    +audio         databases     graphics      misc          shells
    +benchmarks    devel         ham           multimedia    sysutils
    +biology       editors       inputmethod   net           textproc
    +cad           emulators     lang          news          time
    +chat          finance       mail          parallel      wm
    +comms         fonts         math          pkgtools      www
    +converters    games         mbone         print         x11
    +
  5. MASTER_SITES is a list of URLs where the distribution files can be downloaded. Each URL must end with a slash.

    + +

    The MASTER_SITES + may make use of the following predefined sites:

    +
    +            ${MASTER_SITE_APACHE}
    +            ${MASTER_SITE_BACKUP}
    +            ${MASTER_SITE_CYGWIN}
    +            ${MASTER_SITE_DEBIAN}
    +            ${MASTER_SITE_FREEBSD}
    +            ${MASTER_SITE_FREEBSD_LOCAL}
    +            ${MASTER_SITE_GNOME}
    +            ${MASTER_SITE_GNU}
    +            ${MASTER_SITE_GNUSTEP}
    +            ${MASTER_SITE_IFARCHIVE}
    +            ${MASTER_SITE_MOZILLA}
    +            ${MASTER_SITE_OPENOFFICE}
    +            ${MASTER_SITE_PERL_CPAN}
    +            ${MASTER_SITE_R_CRAN}
    +            ${MASTER_SITE_SOURCEFORGE}
    +            ${MASTER_SITE_SUNSITE}
    +            ${MASTER_SITE_SUSE}
    +            ${MASTER_SITE_TEX_CTAN}
    +            ${MASTER_SITE_XCONTRIB}
    +            ${MASTER_SITE_XEMACS}
    +          
    +
    + +

    If one of these predefined sites is chosen, you + may want to specify a subdirectory of that site. + Since these macros may expand to more than one + actual site, you must use the following + construct to specify a subdirectory:

    +
    +            ${MASTER_SITE_GNU:=subdirectory/name/}
    +            ${MASTER_SITE_SOURCEFORGE:=project_name/}
    +
    + +

    Note the trailing slash after the subdirectory + name.

    + +

    If the package has multiple DISTFILES or multiple PATCHFILES from different sites, + set SITES_foo to a + list of URI's where file “foo” may be found. + “foo” + includes the suffix, e.g.

    +
    +DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}
    +DISTFILES+=     foo-file.tar.gz
    +SITES_foo-file.tar.gz=http://www.somewhere.com/somehow/ \
    +        http://www.somewhereelse.com/mirror/somehow/
    +
    +
  6. + +
  7. +

    DISTFILES: Name(s) + of archive file(s) containing distribution. The + default is ${DISTNAME}${EXTRACT_SUFX}. + Should only be set if you have more than one + distfile.

    + +

    Note that the normal default setting of + DISTFILES must be made + explicit if you want to add to it (rather than + replace it), as you usually would.

    +
  8. + +
  9. +

    EXTRACT_SUFX: + Suffix of the distribution file, will be appended + to DISTNAME. Defaults + to .tar.gz.

    +
  10. + + + +

    The second section contains information about + separately downloaded patches, if any.

    + +
    +
      +
    • +

      PATCHFILES Name(s) + of additional files that contain distribution + patches. There is no default. pkgsrc will look for + them at PATCH_SITES. + They will automatically be uncompressed before + patching if the names end with .gz or .Z.

      +
    • + +
    • +

      PATCH_SITES: + Primary location(s) for distribution patch files + (see PATCHFILES below) + if not found locally.

    -

    The second section contains the following +

    The third section contains the following variables.

    • MAINTAINER is the - mail address of the package's maintainer, which is - the person you can contact when the package does - not work.

      + email address of the contact person for this + package. The person who feels responsible for this + package, and who is most likely to look at problems + or questions regarding this package which have been + reported with + send-pr(1). The + right person to contact before making major changes + to the package. When packaging a new program, set + MAINTAINER to + yourself. If you really can't maintain the package + for future updates, set it to <tech-pkg@NetBSD.org>.

    • @@ -5674,94 +6310,33 @@ SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c
    • COMMENT is a - one-line comment about the purpose of the - package.

      + one-line description of the package (should not + include the package name).

    -

    The MASTER_SITES may be - set to one of the predefined sites:

    -
    -        ${MASTER_SITE_APACHE}
    -        ${MASTER_SITE_BACKUP}
    -        ${MASTER_SITE_CYGWIN}
    -        ${MASTER_SITE_DEBIAN}
    -        ${MASTER_SITE_FREEBSD}
    -        ${MASTER_SITE_FREEBSD_LOCAL}
    -        ${MASTER_SITE_GNOME}
    -        ${MASTER_SITE_GNU}
    -        ${MASTER_SITE_GNUSTEP}
    -        ${MASTER_SITE_IFARCHIVE}
    -        ${MASTER_SITE_MOZILLA}
    -        ${MASTER_SITE_OPENOFFICE}
    -        ${MASTER_SITE_PERL_CPAN}
    -        ${MASTER_SITE_R_CRAN}
    -        ${MASTER_SITE_SOURCEFORGE}
    -        ${MASTER_SITE_SUNSITE}
    -        ${MASTER_SITE_SUSE}
    -        ${MASTER_SITE_TEX_CTAN}
    -        ${MASTER_SITE_XCONTRIB}
    -        ${MASTER_SITE_XEMACS}
    -    
    -
    +

    Other variables that affect the build:

    -

    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 one - actual site, you must use the following - construct to specify a subdirectory:

    -
    -        ${MASTER_SITE_GNU:=subdirectory/name/}
    -        ${MASTER_SITE_SOURCEFORGE:=project_name/} 
    -
    - -

    Note the trailing slash after the subdirectory - name.

    - -
    -

    Note

    - -

    MASTER_SITE_SUBDIR has - been deprecated and should - no longer be used.

    +
    +
      +
    • +

      WRKSRC: The + subdirectory of ${WRKDIR} to which the + distribution actually unpacks. The default is + ${WRKDIR}/${DISTNAME}. The value + of WRKSRC should be + set explicitly if the package does not follow + standard conventions and include the package's name + as a subdirectory.

      +
    • +
    -

    If the package has multiple DISTFILES or multiple PATCHFILES from different sites, set - SITES_foo to a list of URI's - where file “foo” - may be found. “foo” includes the suffix, e.g.

    -
    -DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}
    -DISTFILES+=     foo-file.tar.gz
    -SITES_foo-file.tar.gz=http://www.somewhere.com/somehow/ \
    -        http://www.somewhereelse.com/mirror/somehow/
    -
    - -

    Note that the normal default setting of DISTFILES must be made explicit if you - want to add to it (rather than replace it), as you - usually would.

    - -

    Currently the following values are available for - CATEGORIES. If more than one - is used, they need to be separated by spaces:

    -
    -archivers     cross         geography     meta-pkgs     security
    -audio         databases     graphics      misc          shells
    -benchmarks    devel         ham           multimedia    sysutils
    -biology       editors       inputmethod   net           textproc
    -cad           emulators     lang          news          time
    -chat          finance       mail          parallel      wm
    -comms         fonts         math          pkgtools      www
    -converters    games         mbone         print         x11
    -
    -

    Please pay attention to the following gotchas:

    @@ -5769,47 +6344,26 @@ converters games mbone print x11
  11. Add MANCOMPRESSED if manpages are installed in compressed form by the - package; see comment in bsd.pkg.mk.

  12. -

    Replace /usr/local - with “${PREFIX}” in all files (see - patches, below).

    +

    Replace /usr/local with + “${PREFIX}” + in all files (see patches, below).

  13. If the package installs any info files, see Section - 15.5.7, “Packages installing info + "15.5.7. Packages installing info files">Section 15.5.7, + “Packages installing info files”.

  14. - -
  15. -

    Set MAINTAINER to - be yourself. If you really can't maintain the - package for future updates, set it to <tech-pkg@NetBSD.org>.

    -
  16. - -
  17. -

    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.

    -
  18. - -
  19. -

    Be sure to set the COMMENT variable to a short - description of the package, not containing the - pkg's name.

    -
  20. @@ -5820,7 +6374,8 @@ converters games mbone print x11

    8.2. 8.2. distinfo

    @@ -5841,7 +6396,8 @@ converters games mbone print x11 in new distinfo files. The pkgtools/digest utility calculates + target="_top">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: www/navigator). These are kept in the - same distinfo file and care should be taken when + target="_top">www/navigator). 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.

    The message digest/checksum for all the official - patches found in the patches/ directory (see Section 8.3, “patches/*”) for the package is also - stored in the distinfo - 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 make + stored in the distinfo 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 + make makepatchsum (or make mps if you're in a hurry).

    @@ -5897,14 +6457,17 @@ converters games mbone print x11 NetBSD. The files are applied successively in alphabetic order (as returned by a shell “patches/patch-*” glob expansion), so - patch-aa is applied before - patch-ab, etc.

    - -

    The patch-* files should - be in diff - -bu format, and apply without a fuzz to - avoid problems. (To force patches to apply with fuzz you - can set patch-aa is applied before + patch-ab, etc.

    + +

    The patch-* files should be in + diff -bu + format, and apply without a fuzz to avoid problems. (To + force patches to apply with fuzz you can set PATCH_FUZZ_FACTOR=-F2). Furthermore, do not put changes for more than one file into a single patch-file, as this will make future modifications more @@ -5922,14 +6485,16 @@ converters games mbone print x11 "command">pkgdiff from the pkgtools/pkgdiff package to avoid + target="_top">pkgtools/pkgdiff package to avoid 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 + filename.orig, e.g. with cp -p filename filename.orig or, easier, by using pkgvi again @@ -5944,7 +6509,8 @@ converters games mbone print x11 makepatchsum command, see Section 8.2, - “distinfo.

    + “distinfo”.

    Patch files that are distributed by the author or other maintainers can be listed in 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 $LOCALPATCHES directory. The directory tree there is expected to have the same “category/package” structure as pkgsrc, and patches are expected to be - stored inside these dirs (also known as $LOCALPATCHES/$PKGPATH). For example if - you want to keep a private patch for pkgsrc/graphics/png, keep it in - $LOCALPATCHES/graphics/png/mypatch. All files in the named directory are expected to be patch files, and they are applied @@ -5982,7 +6552,8 @@ converters games mbone print x11

    -
    DESCR
    @@ -5994,7 +6565,8 @@ converters games mbone print x11 everything that you write here.

    -
    PLIST
    @@ -6025,7 +6597,8 @@ converters games mbone print x11
    -
    INSTALL
    @@ -6037,8 +6610,9 @@ 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 PLIST. - See PLIST. See pkg_add(1) and @@ -6049,7 +6623,8 @@ converters games mbone print x11 more information.

    -
    DEINSTALL
    @@ -6069,7 +6644,8 @@ converters games mbone print x11 more information.

    -
    MESSAGE
    @@ -6080,13 +6656,16 @@ converters games mbone print x11 Please note that you can modify variables in it easily by using MESSAGE_SUBST in the package's - Makefile:

    + Makefile:

     MESSAGE_SUBST+=  SOMEVAR="somevalue"
     

    replaces "${SOMEVAR}" with “somevalue” in somevalue” in MESSAGE.

    @@ -6098,7 +6677,8 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"

    8.6. 8.6. work*

    @@ -6106,11 +6686,18 @@ MESSAGE_SUBST+= SOMEVAR="somevalue"

    When you type make the distribution files are - unpacked into this directory. It can be removed by - running make - clean. Besides the sources, this - directory is also used to keep various timestamp - files.

    + unpacked into the directory denoted by WRKDIR. It can be removed by running + make clean. + Besides the sources, this directory is also used to keep + various timestamp files. The directory gets removed completely on clean. + The default is ${.CURDIR}/work or ${.CURDIR}/work.${MACHINE_ARCH} if + OBJMACHINE is set.

    If a package doesn't create a subdirectory for itself (like GNU software does, for instance), but extracts @@ -6118,38 +6705,42 @@ MESSAGE_SUBST+= SOMEVAR="somevalue" WRKSRC accordingly, e.g. editors/sam again, but the quick + target="_top">editors/sam again, but the quick answer is:

     WRKSRC=             ${WRKDIR}
     
    -

    Please note that the old NO_WRKSUBDIR has been deprecated and - should not be used. Also, if your package doesn't create - a subdir with the name of DISTNAME but some different name, set - WRKSRC to point to the - proper name in ${WRKDIR}. - See If a package doesn't create a subdir with the name of + DISTNAME but some different + name, set WRKSRC to point to + the proper name in ${WRKDIR}. See lang/tcl and lang/tcl and x11/tk for examples, and here is + target="_top">x11/tk for examples, and here is another one:

     WRKSRC=         ${WRKDIR}/${DISTNAME}/unix
     

    The name of the working directory created by pkgsrc is - work by default. If the - same pkgsrc tree should be used on several different + work by default. If the same + pkgsrc tree should be used on several different platforms, the variable OBJMACHINE can be set in /etc/mk.conf to attach the platform to the directory name, e.g. - work.i386 or work.i386 or work.sparc.

    @@ -6159,7 +6750,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix

    8.7. 8.7. files/*

    @@ -6171,7 +6763,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix "quote">${CP}” command in the “pre-configure” target to achieve this. Alternatively, you could simply - diff the file against /dev/null and use the patch mechanism to manage the creation of this file.

    @@ -6183,7 +6776,9 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix

    Chapter 9. Programming in - Makefiles

    + Makefiles
    @@ -6193,7 +6788,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
    9.1. 9.1. Makefile variables
    @@ -6234,7 +6830,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix
    -

    Pkgsrc consists of many Pkgsrc consists of many Makefile fragments, each of which forms a well-defined part of the pkgsrc system. Using the @@ -6244,7 +6841,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix some discipline to keep the code correct and understandable.

    -

    The basic ingredients for The basic ingredients for Makefile programming are variables (which are actually macros) and shell commands. Among these shell commands may even be more complex ones like

    This chapter describes some patterns, that appear quite - often in Makefiles, including - the pitfalls that come along with them.

    + often in Makefiles, including the pitfalls that + come along with them.

    -

    Makefile variables - contain strings that can be processed using the five - operators ``='', ``+='', ``?='', ``:='', and ``!='', - which are described in the Makefile variables contain + strings that can be processed using the five operators + ``='', ``+='', ``?='', ``:='', and ``!='', which are + described in the make(1) man page.

    -

    When a variable's value is parsed from a When a variable's value is parsed from a Makefile, the hash character ``#'' and the backslash character ``\'' are handled specially. If a backslash is followed by a newline, any whitespace @@ -6383,7 +6986,9 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/unix

    All variable names starting with an underscore are reserved for use by the pkgsrc infrastructure. They shall not be used by package - Makefiles.

    + Makefiles.

  21. @@ -6695,7 +7300,8 @@ for_test: see the package regress/make-quoting, testcase + target="_top">regress/make-quoting, testcase bug1.

    @@ -6720,7 +7326,8 @@ for_test:
    10.2. Semi-automatic - PLIST + PLIST generation
    10.3. @@ -6748,17 +7355,21 @@ for_test: -

    The PLIST file contains a - package's “packing - list”, i.e. a list of files that belong to the - package (relative to the ${PREFIX} directory it's been installed - in) plus some additional statements - see the The PLIST file contains a package's + “packing list”, i.e. + a list of files that belong to the package (relative to the + ${PREFIX} directory it's been + installed in) plus some additional statements - see the + pkg_create(1) manpage for a full list. This chapter addresses some issues that need - attention when dealing with the PLIST file (or files, see below!).

    @@ -6772,7 +7383,8 @@ for_test:

    Be sure to add a RCS ID line as the first thing in any - PLIST file you write:

    + PLIST file you write:

     @comment $NetBSD$
     
    @@ -6785,7 +7397,9 @@ for_test:

    10.2. Semi-automatic - PLIST generation

    + PLIST generation @@ -6832,7 +7446,8 @@ for_test: of AWK scripting you like to it, but be careful with quoting.

    -

    For example, to get all files inside the For example, to get all files inside the libdata/foo directory removed from the resulting PLIST:

    @@ -6907,7 +7522,8 @@ for_test:
                   

    Some packages want to embed the OS name and version into some paths. To do this, use these - variables in the PLIST:

    @@ -6947,14 +7563,18 @@ for_test: "quote">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.

    + 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).

    @@ -6986,17 +7606,21 @@ PLIST_SUBST+= SOMEVAR="somevalue"

    Manpages should be installed in compressed form if - MANZ is set (in MANZ is set (in bsd.own.mk), and uncompressed - otherwise. To handle this in the PLIST file, the suffix “.gz” is appended/removed automatically for manpages according to MANZ and MANCOMPRESSED being set or not, see - above for details. This modification of the PLIST file is done on a copy of it, not - PLIST itself.

    + PLIST itself.

    @@ -7013,8 +7637,9 @@ PLIST_SUBST+= SOMEVAR="somevalue"

    To use one or more files as source for the - PLIST used in generating - the binary package, set the variable PLIST used in generating the + binary package, set the variable PLIST_SRC to the names of that file(s). The files are later concatenated using @@ -7043,25 +7668,32 @@ PLIST_SUBST+= SOMEVAR="somevalue"

  22. @@ -7139,8 +7773,9 @@ PLIST_SUBST+= SOMEVAR="somevalue" writing new packages).

    For example, if a package installs files under - share/applications, it - should have the following line in it:

    + share/applications, it should + have the following line in it:

           USE_DIRS+= xdg-1.1
         
    @@ -7151,10 +7786,12 @@ PLIST_SUBST+=    SOMEVAR="somevalue"
               print-PLIST, you should get the right
               (commented out) lines.

    -

    Note that, even if your package is using Note that, even if your package is using $X11BASE, it must not depend on the *-x11-dirs packages. Just specify the name without that - part and pkgsrc (in particular, mk/dirs.mk) will take care of it.

    @@ -7179,7 +7816,8 @@ PLIST_SUBST+= SOMEVAR="somevalue" to use buildlink3
    11.2. Writing 11.2. Writing buildlink3.mk files
    @@ -7192,21 +7830,25 @@ PLIST_SUBST+= SOMEVAR="somevalue" "#updating-buildlink-depends">11.2.2. Updating BUILDLINK_DEPENDS.pkg in - buildlink3.mk + buildlink3.mk files
    11.3. Writing 11.3. Writing builtin.mk files
    11.3.1. Anatomy of a - builtin.mk - file
    + builtin.mk file
    11.3.2. Global @@ -7249,8 +7891,10 @@ PLIST_SUBST+= SOMEVAR="somevalue"

    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/include, /usr/lib, etc., are always searched -- buildlink3 is designed to insulate the package build from non-system-supplied software.

    @@ -7278,7 +7922,8 @@ PLIST_SUBST+= SOMEVAR="somevalue"

    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.

    @@ -7287,7 +7932,8 @@ PLIST_SUBST+= SOMEVAR="somevalue"

    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

    Remember that only the only the buildlink3.mk files that you list in a package's Makefile are added as dependencies for that package.

    @@ -7315,88 +7962,104 @@ DEPENDS+= foo>=1.1.0:../../category/foo .include "../../category/foo/buildlink3.mk"
    -

    There are several buildlink3.mk files in There are several buildlink3.mk files in pkgsrc/mk that handle special package issues:

    -

    The comments in those The comments in those buildlink3.mk files provide a more complete description of how to use them properly.

    @@ -7408,32 +8071,39 @@ DEPENDS+= foo>=1.1.0:../../category/foo

    11.2. Writing - buildlink3.mk - files

    + buildlink3.mk files -

    A package's A package's buildlink3.mk file is included by Makefiles to indicate the need to compile and link against header files and libraries provided by the - package. A 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 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 pkgtools/createbuildlink package is + target="_top">pkgtools/createbuildlink package is highly recommended. For most packages, the following command will generate a good starting point for - buildlink3.mk files:

    + buildlink3.mk files:

     % cd pkgsrc/
                 
     
    -            

    The following real-life example The following real-life example buildlink3.mk is taken from - pkgsrc/graphics/tiff:

    + pkgsrc/graphics/tiff:

     # $NetBSD: buildlink3.mk,v 1.7 2004/03/18 09:12:12 jlam Exp $
     
    @@ -7483,10 +8155,12 @@ 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 buildlink3.mk - files.

    + across all buildlink3.mk files and is used to + track at what depth we are including buildlink3.mk files.

    The first section controls if the dependency on pkg is added. @@ -7495,15 +8169,19 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} added by buildlink3.

    The second section advises pkgsrc that the - buildlink3.mk file for + buildlink3.mk file for pkg has been included at some point. BUILDLINK_PACKAGES is the global list - of packages for which buildlink3.mk files have been included. It must always be appended to within - a buildlink3.mk file.

    + a buildlink3.mk file.

    The third section is protected from multiple inclusion and controls how the dependency on BUILDLINK_LIBDIRS. pkg (not shown above) - are lists of subdirectories of ${BUILDLINK_PREFIX.pkg} to add to the header and library search paths. These @@ -7589,7 +8268,8 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

    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 symlinking:

    @@ -7600,12 +8280,16 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} "varname">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.

    + include/*.h.

  23. @@ -7613,12 +8297,16 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} "varname">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 ${BUILDLINK_DIR}. By default, + this takes the +CONTENTS of a pkg and filters it through BUILDLINK_CONTENTS_FILTER.pkg (not shown above) is a filter command that filters - +CONTENTS input - into a list of files relative to +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 include and lib directories in the package - +CONTENTS, and for - pkgviews packages, it outputs any libtool - archives in lib - directories.

    + +CONTENTS, and for pkgviews + packages, it outputs any libtool archives in + lib directories.

  24. @@ -7661,16 +8357,20 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} -

    The last section includes any 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} whenever the pkg - buildlink3.mk file is + buildlink3.mk file is included.

    @@ -7683,7 +8383,8 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} "updating-buildlink-depends">11.2.2. Updating BUILDLINK_DEPENDS. - pkg in pkg
    in buildlink3.mk files @@ -7717,14 +8418,15 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} 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.

    + 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.

    Please take careful consideration before adjusting BUILDLINK_DEPENDS.11.3. Writing - builtin.mk files + builtin.mk files

    Some packages in pkgsrc install headers and libraries that coincide with headers and libraries present in the - base system. Aside from a buildlink3.mk file, these packages - should also include a builtin.mk file that includes the necessary checks to decide whether using the built-in software or the pkgsrc software is appropriate.

    @@ -7781,7 +8487,8 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} "emphasis">not override any USE_BUILTIN.pkg which is - already set before the builtin.mk file is included.

  25. @@ -7789,7 +8496,8 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

    It should be written to allow multiple inclusion. This is very important and takes - careful attention to Makefile coding.

@@ -7802,8 +8510,9 @@ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

11.3.1. Anatomy - of a builtin.mk - file

+ of a builtin.mk file @@ -7862,7 +8571,8 @@ CHECK_BUILTIN.foo?= no should only be “yes” if the actual package is included as part of the base system. This variable is - only used internally within the builtin.mk file.

The second section sets pkg is “yes”). This variable is only used internally within the - builtin.mk file.

+ 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 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 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 @@ -7916,7 +8629,8 @@ CHECK_BUILTIN.foo?= no "replaceable">pkg set in the previous section. This typically includes, e.g., adding additional dependency restrictions and listing - additional files to symlink into ${BUILDLINK_DIR} (via BUILDLINK_FILES.pkg).

@@ -7963,7 +8677,8 @@ CHECK_BUILTIN.foo?= no

A package must have a must have a builtin.mk file to be listed in PREFER_NATIVE, otherwise it is simply ignored in that list.

@@ -8092,7 +8807,9 @@ CHECK_BUILTIN.foo?= no

The following sections inspect each of the above points in detail. Note that, in order to use any of the described functionalities, you must add the following to your - package's Makefile:

+ package's Makefile:

 USE_PKGINSTALL=YES
 
@@ -8121,16 +8838,21 @@ USE_PKGINSTALL=YES -

As you already know, the As you already know, the PLIST file holds a list of files and directories that belong to a package. The names used in - it are relative to the installation prefix (${PREFIX}), which means that it cannot register files outside this directory (absolute path names are not allowed). Despite this restriction, some packages need to install files outside this location; - e.g., under ${VARBASE} or - ${PKG_SYSCONFDIR}.

+ e.g., under ${VARBASE} or ${PKG_SYSCONFDIR}.

The only way to achieve this is to create such files during installation time by using the installation @@ -8139,7 +8861,8 @@ USE_PKGINSTALL=YES anywhere in the filesystem. Here is where pkginstall comes into play: it provides generic scripts to abstract the manipulation of such files and directories based on - variables set in the package's Makefile. The rest of this section describes which these variables are.

@@ -8204,7 +8927,8 @@ MAKE_DIRS_PERMS+= ${VARBASE}/foo/private ${ROOT_USER} ${ROOT_GROUP} 0700

Creating non-empty files outside the installation - prefix is tricky because the PLIST forces all files to be inside it. To overcome this problem, the only solution is to extract the file in the known place (i.e., inside the @@ -8306,10 +9030,14 @@ SUPPORT_FILES_PERMS+= ${PREFIX}/share/somefile ${VARBASE}/somefile ${ROOT_USER}

  • PKG_SYSCONFBASE: The configuration's root directory. Defaults to - ${PREFIX}/etc - although it may be overridden by the user to - point to his preferred location (e.g., - /etc, ${PREFIX}/etc although it may + be overridden by the user to point to his + preferred location (e.g., /etc, /etc/pkg, etc.). Packages must not use it directly.

  • @@ -8322,15 +9050,19 @@ SUPPORT_FILES_PERMS+= ${PREFIX}/share/somefile ${VARBASE}/somefile ${ROOT_USER} configuration files for the package being built shall be installed. The definition of this variable only makes sense in the package's - Makefile (i.e., it - is not user customizable).

    + Makefile (i.e., it is not user + customizable).

    As an example, consider the Apache package, www/apache2, which places its - configuration files under the www/apache2, which places + its configuration files under the httpd/ subdirectory of PKG_SYSCONFBASE. This should be set in the package Makefile.

    @@ -8377,23 +9109,29 @@ SUPPORT_FILES_PERMS+= ${PREFIX}/share/somefile ${VARBASE}/somefile ${ROOT_USER}
  • If the previous variable is not defined but PKG_SYSCONFSUBDIR is - set in the package's Makefile, the resulting value - is ${PKG_SYSCONFBASE}/${PKG_SYSCONFSUBDIR}.

  • -

    Otherwise, it is set to Otherwise, it is set to ${PKG_SYSCONFBASE}.

  • -

    It is worth mentioning that It is worth mentioning that ${PKG_SYSCONFDIR} is automatically - added to OWN_DIRS. See - OWN_DIRS. See Section 12.1.1, “Directory manipulation” what this means.

    @@ -8442,7 +9180,8 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}

    As said before, pkginstall automatically handles configuration files. This means that the packages themselves must not touch - the contents of ${PKG_SYSCONFDIR} directly. Bad news is that many software installation scripts will, out of the box, @@ -8451,16 +9190,20 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}

    You must teach the package (usually by manually patching it) to install any configuration files under - the examples hierarchy, share/examples/${PKGBASE}/. This way, - the PLIST registers them - and the administrator always has the original copies + the PLIST registers them and the + administrator always has the original copies available.

    Once the required configuration files are in place (i.e., under the examples hierarchy), the pkginstall framework can use them as master copies during the - package installation to update what is in ${PKG_SYSCONFDIR}. To achieve this, the variables CONF_FILES and CONF_FILES_PERMS are @@ -8471,7 +9214,8 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} example, taken from the mail/mutt package:

    + target="_top">mail/mutt package:

     EGDIR=        ${PREFIX}/share/doc/mutt/samples
     CONF_FILES=   ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
    @@ -8528,14 +9272,17 @@ CONF_FILES=   ${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
               
    1. -

      Store the script inside Store the script inside ${FILESDIR}, with the .sh suffix appended. Considering the print/cups package as an - example, it has a print/cups package as an + example, it has a cupsd.sh in its files directory.

    2. @@ -8560,16 +9307,19 @@ RCD_SCRIPTS+= cupsd
    3. Process the file found in the files directory applying all the substitutions described in the - FILES_SUBST - variable.

      + FILES_SUBST variable.

    4. Copy the script from the files directory to the - examples hierarchy, ${PREFIX}/share/examples/rc.d/. Note that this master file must be explicitly - registered in the PLIST.

    5. @@ -8596,7 +9346,8 @@ RCD_SCRIPTS+= cupsd by setting the environment variable PKG_RCD_SCRIPTS prior to package installation. Note that the scripts will be always - copied inside the examples hierarchy, ${PREFIX}/share/examples/rc.d/, no matter what the value of this variable is.

    @@ -8619,7 +9370,8 @@ RCD_SCRIPTS+= cupsd

    Users can be created by adding entries to the PKG_USERS variable. Each - entry has the following syntax, which mimics /etc/passwd:

     user:group[:[userid][:[descr][:[home][:shell]]]]
    @@ -8628,12 +9380,14 @@ user:group[:[userid][:[descr][:[home][:shell]]]]
               

    Only the user and group are required; everything else is optional, but the colons must be in the right places when specifying optional bits. By default, a new user - will have home directory /nonexistent, and login shell - /sbin/nologin unless they - are specified as part of the user element. Note that if - the description contains spaces, then spaces should be - double backslash-escaped, as in:

    + /sbin/nologin unless they are + specified as part of the user element. Note that if the + description contains spaces, then spaces should be double + backslash-escaped, as in:

     foo:foogrp::The\\ Foomister
     
    @@ -8660,7 +9414,8 @@ group[:groupid]

    Packages that install system shells should register - them in the shell database, /etc/shells, to make things easier to the administrator. This must be done from the installation scripts to keep binary packages working on @@ -8674,7 +9429,8 @@ group[:groupid] following example, taken from shells/zsh:

    + target="_top">shells/zsh:

     USE_PKGINSTALL= YES
     PKG_SHELL=      ${PREFIX}/bin/zsh
    @@ -8693,9 +9449,9 @@ PKG_SHELL=      ${PREFIX}/bin/zsh
     
                 

    The automatic registration of shell interpreters can be disabled by the administrator by setting the - PKG_REGISTER_SHELLS - environment variable to NO.

    + PKG_REGISTER_SHELLS environment + variable to NO.

    @@ -8721,13 +9477,15 @@ PKG_SHELL= ${PREFIX}/bin/zsh
    13.2. Converting packages to - use bsd.options.mk

    Many packages have the ability to be built to support - different sets of features. bsd.options.mk is a framework in pkgsrc that provides generic handling of those options that determine different ways in which the packages can be @@ -8751,7 +9509,8 @@ PKG_SHELL= ${PREFIX}/bin/zsh "varname">PKG_DEFAULT_OPTIONS, 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 - /etc/mk.conf.

    + /etc/mk.conf.

    @@ -8761,18 +9520,23 @@ PKG_SHELL= ${PREFIX}/bin/zsh

    13.2. Converting - packages to use bsd.options.mk

    -

    The following example shows how The following example shows how bsd.options.mk should be used by the hypothetical ``wibble'' package, either in the package - Makefile, or in a file, - e.g. options.mk, that is - included by the main package Makefile, or in a file, e.g. + options.mk, that is included by + the main package Makefile.

     PKG_OPTIONS_VAR=                PKG_OPTIONS.wibble
    @@ -8895,7 +9659,8 @@ CONFIGURE_ARGS+=        --enable-ldap=${BUILDLINK_PREFIX.openldap}
                     of “USE_VARIABLE:
                     option” pairs that
    -                map legacy /etc/mk.conf variables to their
                     option counterparts. Pairs should be added with
                     “+=” to keep
    @@ -8947,7 +9712,8 @@ CONFIGURE_ARGS+=        --enable-ldap=${BUILDLINK_PREFIX.openldap}
               "varname">PKG_SUGGESTED_OPTIONS.

    PKG_OPTIONS_VAR must be - defined before including bsd.options.mk. If none of PKG_SUPPORTED_OPTIONS, PKG_OPTIONS_OPTIONAL_GROUPS, and @@ -8958,7 +9724,8 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap} empty list and the package is otherwise treated as not using the options framework.

    -

    After the inclusion of After the inclusion of bsd.options.mk, the variable PKG_OPTIONS contains the list of selected build options, properly filtered to @@ -8980,7 +9747,8 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap} For options specific to this package, prefix the name with pkgname-. Document - the option and its meaning in mk/defaults/options.description.

    @@ -9021,7 +9789,8 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap} 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, pkgsrc/mk/bsd.pkg.mk.

    @@ -9043,7 +9812,8 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}

    The automatic variable PREFIX indicates where all files of the final program shall be installed. It is usually set to - LOCALBASE (LOCALBASE (/usr/pkg), or CROSSBASE for pkgs in the “cross” category. @@ -9099,7 +9869,8 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}

    Usually, X11 packages should be installed under LOCALBASE whenever possible. Note that you will need to include - ../../mk/x11.buildlink3.mk in them to request the presence of X11 and to get the right compilation flags.

    @@ -9118,16 +9889,20 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap} libraries installed by a pkg that has USE_IMAKE or USE_X11BASE in its pkg - Makefile, you need to - look in both - ${X11BASE} and - ${LOCALBASE}. To - force installation of all X11 packages in - LOCALBASE, the - Makefile
    , you need to look + in both + ${X11BASE} and ${LOCALBASE}. To force + installation of all X11 packages in LOCALBASE, the pkgtools/xpkgwedge package is + target="_top">pkgtools/xpkgwedge package is enabled by default.

    @@ -9163,7 +9938,8 @@ CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}

    This is best illustrated by example.

    -

    The following lines are taken from The following lines are taken from pkgsrc/wm/scwm/Makefile:

     EVAL_PREFIX+=           GTKDIR=gtk+
    @@ -9186,13 +9962,17 @@ GTKDIR_DEFAULT= ${LOCALBASE}
                   
     
                   
  • -

    Within ${PREFIX}, - packages should install files according to Within ${PREFIX}, packages should + install files according to hier(7), with the - exception that manual pages go into ${PREFIX}/man, not ${PREFIX}/man, not ${PREFIX}/share/man.

  • @@ -9211,7 +9991,8 @@ GTKDIR_DEFAULT= ${LOCALBASE}

    The main targets used during the build process defined - in bsd.pkg.mk are:

    + in bsd.pkg.mk are:

    @@ -9222,7 +10003,8 @@ GTKDIR_DEFAULT= ${LOCALBASE} 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:

    @@ -9265,7 +10047,8 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}

    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 @@ -9273,7 +10056,8 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} be put into EXTRACT_ONLY.

    -

    If the distfiles are not in If the distfiles are not in .tar.gz format, they can be extracted by setting either EXTRACT_SUFX, or EXTRACT_BEFORE_ARGS and EXTRACT_AFTER_ARGS. In the former case, pkgsrc knows how to extract a - number of suffixes (.tar.gz, .tgz, .tar.gz2, .tbz, .tar.Z, .tar, .shar.gz, .shar.bz2, .shar.Z, .shar, .Z, .bz2 and .tar.gz, .tgz, .tar.gz2, .tbz, .tar.Z, .tar, .shar.gz, .shar.bz2, .shar.Z, .shar, .Z, .bz2 and .gz; see the definition of the 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:

    + 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
    @@ -9316,13 +10116,18 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
                     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 .Z or .gz are uncompressed before they
    -                are applied, files ending in .orig or .orig or .rej are ignored. Any special
                     options to 
    @@ -9373,7 +10178,8 @@ ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
                     from the sysutils/top package:

    + target="_top">sysutils/top package:

     HAS_CONFIGURE=          yes
     CONFIGURE_SCRIPT=       Configure
    @@ -9535,8 +10341,10 @@ make build
                           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
    +                      pkgsrc/x11/kde, this
    +                      is likely to remove whole KDE. Works by
                           adding “-R” to the 
    @@ -9588,7 +10396,8 @@ make build
                     fail!

    The following variables can be used either on - the command line or in /etc/mk.conf to alter the behaviour of make update:

    @@ -9706,7 +10515,8 @@ make build

    The following variables can be used either on - the command line or in /etc/mk.conf to alter the behaviour of make clean-update:

    @@ -9749,25 +10559,30 @@ make build
    readme
    -

    This target generates a This target generates a README.html file, which can be viewed using a browser such as www/mozilla or www/mozilla or www/links. The generated files - contain references to any packages which are in the - PACKAGES directory on - the local host. The generated files can be made to - refer to URLs based on www/links. The generated + files contain references to any packages which are + in the PACKAGES + directory on the local host. The generated files + can be made to refer to URLs based on FTP_PKG_URL_HOST and FTP_PKG_URL_DIR. For example, if I - wanted to generate README.html files which pointed to binary packages on the local machine, in the - directory /usr/packages, set FTP_PKG_URL_HOST=file://localhost and readme-all

    -

    Use this target to create a file 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 @@ -9800,7 +10617,8 @@ make build “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 @@ -9813,7 +10631,8 @@ make build

    This target shows which distfiles and patchfiles are needed to build the package. (DISTFILES and PATCHFILES, but not PATCHFILES, but not patches/*)

    @@ -9863,7 +10682,9 @@ make build see if they find the shared libs they need. Run by default if PKG_DEVELOPER is set in - /etc/mk.conf.

    + /etc/mk.conf.

    print-PLIST
    @@ -9872,15 +10693,20 @@ make build

    After a “make install” from a new or upgraded pkg, this prints out an attempt to generate a new - PLIST from a - find -newer + 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. 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!

    + PLIST, as the “find -newer” command used by + this target won't catch them!

    See Section 10.3, @@ -9946,8 +10773,9 @@ make build

    @@ -10247,11 +11082,13 @@ CFLAGS+= -your -flags
    -

    Documentation should be installed into Documentation should be installed into ${PREFIX}/share/doc/${PKGBASE} or - ${PREFIX}/share/doc/${PKGNAME} (the - latter includes the version number of the package).

    + ${PREFIX}/share/doc/${PKGNAME} + (the latter includes the version number of the + package).

    @@ -10350,7 +11187,8 @@ CFLAGS+= -your -flags dependency. pkgsrc supports the BUILD_DEPENDS and DEPENDS definitions, as well as - dependencies via buildlink3.mk, which is the preferred way to handle dependencies, and which uses the variables named above. See

    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:

    @@ -10402,7 +11241,8 @@ CFLAGS+=  -your -flags
     
                     
  • If your package needs to use another package - to build itself and there is no buildlink3.mk file available, use the BUILD_DEPENDS definition:

    @@ -10413,15 +11253,17 @@ BUILD_DEPENDS+= autoconf-2.13:../../devel/autoconf
  • 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:

    + target="_top">print/lyx package, which + uses the xpm library, version 3.4j to build:

     DEPENDS+=       xpm-3.4j:../../graphics/xpm
     
    @@ -10515,14 +11357,18 @@ RECOMMENDED+= tiff>=3.6.1:../../graphics/tiff
  • If your package needs some executable to be able to run correctly and if there's no - buildlink3.mk file, - this is specified using the 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:

    + target="_top">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
     
    @@ -10538,7 +11384,8 @@ DEPENDS+= teTeX-[0-9]*:../../print/teTeX "quote">do-configure” target print/ghostscript5 package (it + target="_top">print/ghostscript5 package (it relies on the jpeg sources being present in source form during the build):

    @@ -10568,13 +11415,15 @@ pre-clean:
                 devel/gettext package. The latter
    +            target="_top">devel/gettext package. The latter
                 adds a build dependency on either an installed version
                 of an older gettext package, or if it isn't, installs
                 the devel/gettext-m4 package.

    + target="_top">devel/gettext-m4 package.

  • @@ -10601,17 +11450,21 @@ pre-clean:

    For example x11/Xaw3d and x11/Xaw3d and x11/Xaw-Xpm install provide the - same shared library, thus you set in x11/Xaw-Xpm install provide the + same shared library, thus you set in pkgsrc/x11/Xaw3d/Makefile:

     CONFLICTS=      Xaw-Xpm-[0-9]*
     
    -

    and in and in pkgsrc/x11/Xaw-Xpm/Makefile:

     CONFLICTS=      Xaw3d-[0-9]*
    @@ -10644,18 +11497,19 @@ CONFLICTS=      Xaw3d-[0-9]*
                 "varname">NOT_FOR_PLATFORM. If the package
                 builds and runs on a small handful of platforms, set
                 ONLY_FOR_PLATFORM instead.
    -            If the package should be skipped (for example, because
    -            it provides functionality already provided by the
    -            system), set ONLY_FOR_PLATFORM and
    +            NOT_FOR_PLATFORM are OS
    +            triples (OS-version-platform) that can use glob-style
    +            wildcards.

    + +

    If the package should be skipped (for example, + because it provides functionality already provided by + the system), set PKG_SKIP_REASON to a descriptive message. If the package should fail because some preconditions are not met, set PKG_FAIL_REASON to a descriptive message.

    - -

    IGNORE is deprecated - because it didn't provide enough information to - determine whether the build should fail.

    @@ -10696,7 +11550,8 @@ CONFLICTS= Xaw3d-[0-9]*

    When a vulnerability is found, this should be noted - in localsrc/security/advisories/pkg-vulnerabilities, and after committing that file, use make @@ -10707,7 +11562,8 @@ CONFLICTS= Xaw3d-[0-9]* PKGREVISION should be increased (this is of course not necessary if the problem is fixed by using a newer release of the - software). In addition, if a buildlink3.mk file exists for an affected package, a corresponding BUILDLINK_RECOMMENDED.MACHINE_ARCH and compiler version, disabling optimisation for that file/MACHINE_ARCH/compiler - combination, and documenting it in pkgsrc/doc/HACKS. See that file for a number of examples!

    @@ -10858,15 +11715,17 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2

    If you need to download from a dynamic URL you can set DYNAMIC_MASTER_SITES and a make - fetch will call will call files/getsite.sh 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. graphics/ns-cult3d is an example of - this usage.

    + target="_top">graphics/ns-cult3d is an example + of this usage.

    If the download can't be automated, because the user must submit personal information to apply for a @@ -10880,28 +11739,38 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2 following packages use this: cad/simian, cad/simian, devel/ipv6socket, devel/ipv6socket, emulators/vmware-module, emulators/vmware-module, + fonts/acroread-jpnfont, fonts/acroread-jpnfont, multimedia/realplayer, multimedia/realplayer, sysutils/storage-manager, sysutils/storage-manager, + www/ap-aolserver, www/ap-aolserver, www/openacs. Try to be consistent + target="_top">www/openacs. Try to be consistent with them.

    @@ -10932,11 +11801,13 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2 name, usually based on PKGNAME_NOREV. In case this happens more often, PKGNAME can be - used (thus including the nbX suffix) or a date stamp can be appended, like ${PKGNAME_NOREV}-YYYYMMDD. Do not - forget regenerating the distinfo file after that, since it contains the DIST_SUBDIR path in the filenames. Furthermore, a mail to the @@ -10979,11 +11850,12 @@ ${INSTALL_DATA_DIR} ${PREFIX}/dir2 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.

    + target="_top">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.

    Here's how to use libtool in a pkg in seven simple steps:

    @@ -11021,12 +11893,17 @@ ${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX

    Note that the library is changed to have a - .la extension, and - the objects are 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, .a, .so.major.minor, and ELF symlinks (if necessary) in the build directory. Be sure to include “” is the install directory of the library being built.

    -

    In the PLIST, - include only the In the PLIST, include only the + .la file, the other files will be added automatically.

  • -

    When linking shared object (When linking shared object (.so) files, i.e. files that are loaded via @@ -11091,9 +11972,11 @@ dynamic linker chooses the library with the greater REVISION number. "quote">-module -avoid-version” to prevent them getting version tacked on.

    -

    The PLIST file - gets the foo.so - entry.

    +

    The PLIST file gets the + foo.so entry.

  • @@ -11116,7 +11999,9 @@ dynamic linker chooses the library with the greater REVISION number. “-L../somelib”), because it expects you to change that argument to be the - .la file. e.g.

    + .la file. e.g.

     ${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib
     
    @@ -11143,13 +12028,15 @@ ${LIBTOOL} --mode=link ${CC} -o 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 This will install the static .a, shared library, any needed symlinks, and run @@ -11158,8 +12045,11 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib

  • -

    In your PLIST, - include only the In your PLIST, include only the + .la file (this is a change from previous behaviour).

  • @@ -11195,10 +12085,11 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib this does not match the location of the package's libtool script(s), set it as appropriate.

    -

    If you do not need *.a - static libraries built and installed, then use - SHLIBTOOL_OVERRIDE - instead.

    +

    If you do not need *.a static libraries built and + installed, then use SHLIBTOOL_OVERRIDE instead.

    If your package makes use of the platform independent library for loading dynamic shared objects, @@ -11221,9 +12112,12 @@ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${SOMELIB:.a=.la} ${PREFIX}/lib

    1. The shared object is named correctly, - i.e. libfoo.la, not - foo.la

      + i.e. libfoo.la, not + foo.la

    2. @@ -11332,7 +12226,8 @@ pre-configure:

      To test whether you are working on a 4.4 BSD-derived system, you should use the BSD definition, which is - defined in <sys/param.h> on said systems.

      @@ -11404,7 +12299,8 @@ pre-configure:
                   

      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.

       INTERACTIVE_STAGE= build
      @@ -11454,13 +12350,15 @@ INTERACTIVE_STAGE= configure install
                   restrictions should have tags.

      Denoting that a package is covered by a particular - license is done by placing the license in pkgsrc/licenses and setting the LICENSE variable to a string identifying the license, e.g. in graphics/xv:

      + target="_top">graphics/xv:

       LICENSE=        xv-license
       
      @@ -11481,19 +12379,23 @@ LICENSE= xv-license

      The license can be viewed with make show-license, and if it is considered appropriate, the line printed above can - be added to /etc/mk.conf - to indicate acceptance of the particular license:

      + be added to /etc/mk.conf to indicate acceptance + of the particular license:

       ACCEPTABLE_LICENSES+=xv-license
       

      When adding a package with a new license, the - license text should be added to pkgsrc/licenses for displaying. A list of known licenses can be seen in this directory as well as by looking at the list of (commented out) ACCEPTABLE_LICENSES - variable settings in pkgsrc/mk/defaults/mk.conf.

      The use of mk/defaults/mk.conf, - control this behaviour: mk/defaults/mk.conf, control + this behaviour: SETGIDGAME, GAMEDATAMODE, GAMEGRP, Makefile (we - shall use tclsh in this example):

      + in your Makefile (we shall use + tclsh in + this example):

         REPLACE_INTERPRETER+=     tcl
           _REPLACE.tcl.old=     .*/bin/tclsh
      @@ -11606,7 +12511,8 @@ ACCEPTABLE_LICENSES+=xv-license
                   
       
                   

      Makefiles of packages providing perl5 modules should - include the Makefile fragment ../../lang/perl5/module.mk. It provides a do-configure target for the @@ -11617,8 +12523,11 @@ ACCEPTABLE_LICENSES+=xv-license

      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 PLIST corresponding - to the files listed in the installed PLIST corresponding to the files + listed in the installed .packlist file generated by most perl5 modules. This is invoked by defining PERL5_PACKLIST to a space-separated @@ -11634,7 +12543,9 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist 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 PLIST.

      + for in the PLIST.

      @@ -11657,13 +12568,15 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
      • is considered to be installed in the directory - ${PREFIX}/${INFO_DIR},

      • is registered in the Info directory file - ${PREFIX}/${INFO_DIR}/dir,

      • @@ -11677,8 +12590,10 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        INFO_DIR defaults to “info” and can - be overridden in the package Makefile. INSTALL and INSTALL and DEINSTALL scripts will be generated to handle registration of the info files in the Info directory file. The “makeinfo” command is needed it should be noted with the TEXINFO_REQD variable in the package - Makefile. By default, a - minimum version of 3.12 is required. If the system does - not provide a Makefile. By default, a minimum + version of 3.12 is required. If the system does not + provide a makeinfo command or if it does not match the required minimum, a build dependency on the devel/gtexinfo package will be + target="_top">devel/gtexinfo package will be added automatically.

        The build and installation process of the software @@ -11711,8 +12628,9 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist install-info command as the registration of info files is the task of the package - INSTALL script, and it - must use the appropriate INSTALL script, and it must use + the appropriate makeinfo command.

        To achieve this goal the pkgsrc infrastructure @@ -11745,8 +12663,10 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

      -

      If a package installs .schemas or If a package installs .schemas or .entries files, used by GConf2, you need to take some extra steps to make sure they get registered in the database:

      @@ -11754,9 +12674,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
      1. -

        Include Include ../../devel/GConf2/schemas.mk - instead of its buildlink3.mk file. This takes care of rebuilding the GConf2 database at installation and deinstallation time, and tells @@ -11768,10 +12690,14 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

      2. Ensure that the package installs its - .schemas files - under .schemas files under + ${PREFIX}/share/gconf/schemas. - If they get installed under ${PREFIX}/etc, you will need to manually patch the package.

      3. @@ -11789,8 +12715,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
      4. Define the GCONF2_SCHEMAS variable in your - Makefile with a - list of all Makefile with a list of all + .schemas files installed by the package, if any. Names must not contain any directories in them.

        @@ -11799,8 +12728,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
      5. Define the GCONF2_ENTRIES variable in your - Makefile with a - list of all Makefile with a list of all + .entries files installed by the package, if any. Names must not contain any directories in them.

        @@ -11821,7 +12753,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
      -

      If a package installs If a package installs .omf files, used by scrollkeeper, you need to take some extra steps to make sure they get registered in the database:

      @@ -11829,9 +12762,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
      1. -

        Include Include ../../textproc/scrollkeeper/omf.mk - instead of its buildlink3.mk file. This takes care of rebuilding the scrollkeeper database at installation and deinstallation time, and @@ -11841,13 +12776,15 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

      2. Check the PLIST and remove any entries under - the libdata/scrollkeeper directory, as they will be handled automatically.

      3. -

        Remove the Remove the share/omf directory from the PLIST. It will be handled by scrollkeeper.

      4. @@ -11869,9 +12806,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        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 mk/fonts.mk, which you need to - include in your Makefile.

        When the file is included, you can list the @@ -11883,7 +12822,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist “TTF”, “TYPE1” or “X11”. Also make - sure that the database file fonts.dir is not listed in the PLIST.

        @@ -11911,9 +12851,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
        1. -

          Include Include ../../x11/gtk2/modules.mk - instead of its buildlink3.mk file. This takes care of rebuilding the database at installation and deinstallation time.

          @@ -11938,12 +12880,16 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
          • -

            libdata/gtk-2.0/gdk-pixbuf.loaders

          • -

            libdata/gtk-2.0/gtk.immodules

          @@ -11952,9 +12898,10 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
        2. Check the PLIST and remove any entries under - the libdata/gtk-2.0 - directory, as they will be handled - automatically.

          + the libdata/gtk-2.0 directory, as + they will be handled automatically.

        @@ -11979,12 +12926,14 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
        1. -

          Include Include ../../textproc/xmlcatmgr/catalogs.mk - in your Makefile, - which takes care of registering those files in - system-wide catalogs at installation and - deinstallation time.

          + in your Makefile, which takes care of + registering those files in system-wide catalogs + at installation and deinstallation time.

        2. @@ -12034,8 +12983,10 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        If a package provides extensions to the MIME - database by installing .xml files inside .xml files inside ${PREFIX}/share/mime/packages, you need to take some extra steps to ensure that the database is kept consistent with respect to these new @@ -12044,12 +12995,15 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        1. -

          Include Include ../../databases/shared-mime-info/mimedb.mk - (avoid using the buildlink3.mk file from this same directory, which is reserved for inclusion - from other buildlink3.mk files). It takes care of rebuilding the MIME database at installation and deinstallation time, and @@ -12059,10 +13013,12 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        2. Check the PLIST and remove any entries under - the share/mime - directory, except for files saved - under 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 @@ -12072,7 +13028,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        3. -

          Remove any Remove any share/mime/* directories from the PLIST. They will be handled by the shared-mime-info package.

          @@ -12093,7 +13050,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        If a package uses intltool during its build, include - the ../../textproc/intltool/buildlink3.mk file, which forces it to use the intltool package provided by pkgsrc, instead of the one bundled with the @@ -12119,9 +13077,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

        If a package contains a rc.d script, it won't be copied into the startup directory by default, but you can enable it, by adding the option PKG_RCD_SCRIPTS=YES in PKG_RCD_SCRIPTS=YES in /etc/mk.conf. This option will copy - the scripts into /etc/rc.d when a package is installed, and it will automatically remove the scripts when the package is deinstalled.

        @@ -12173,7 +13133,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
        • Be sure to set PKG_DEVELOPER=1 in PKG_DEVELOPER=1 in /etc/mk.conf

        • @@ -12181,7 +13142,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

          Install pkgtools/url2pkg, create a + target="_top">pkgtools/url2pkg, create a directory for a new package, change into it, then run url2pkg:

          @@ -12200,13 +13162,15 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
        • -

          Edit the Makefile as - requested.

          +

          Edit the Makefile as requested.

        • -

          Fill in the DESCR - file

          +

          Fill in the DESCR file

        • @@ -12216,7 +13180,8 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist
        • Add any dependencies glimpsed from documentation - and the configure step to the package's Makefile.

        • @@ -12250,20 +13215,24 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist are from the pkgtools/pkgdiff package.

          + target="_top">pkgtools/pkgdiff package.

        • -

          Look at the Look at the Makefile, fix if necessary; see Section 8.1, - “Makefile.

        • -

          Generate a Generate a PLIST:

           # make deinstall
           
          -

          You usually need to be You usually need to be root to do this. Look if there are any files left:

          @@ -12287,13 +13257,16 @@ PERL5_PACKLIST=   ${PERL5_SITEARCH}/auto/Pg/.packlist
           

          If this reveals any files that are missing in - PLIST, add them.

          + PLIST, add them.

        • -

          Now that the PLIST - is OK, install the package again and make a binary - package:

          +

          Now that the PLIST is OK, install the package + again and make a binary package:

           # make reinstall
          @@ -12337,7 +13310,8 @@ PERL5_PACKLIST=   ${PERL5_SITEARCH}/auto/Pg/.packlist
                         "command">pkglint from pkgtools/pkglint, and fix the
          +              target="_top">pkgtools/pkglint, and fix the
                         problems it reports:

           # 
           
                     

          Please note all package additions, updates, moves, and - removals 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 www.NetBSD.org - and other sites. Additionally, check the pkgsrc/doc/TODO file and remove the entry for the package you updated or removed, in case it was mentioned there.

          There is a make target that helps in creating proper - CHANGES entries: + CHANGES entries: make changes-entry. It uses the optional CTYPE and NETBSD_LOGIN_NAME variables. The general - usage is to first make sure that your CHANGES file is up-to-date (to avoid having to resolve conflicts later-on) and then to cd to the @@ -12503,9 +13481,11 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist CTYPE variable on the command line to "Added", "Moved", or "Removed". You can set NETBSD_LOGIN_NAME in - /etc/mk.conf if your local - login name is not the same as your NetBSD login name. - Don't forget to commit the changes to /etc/mk.conf if your local login + name is not the same as your NetBSD login name. Don't + forget to commit the changes to pkgsrc/doc/CHANGES!

      @@ -12541,13 +13521,15 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist out of the way, or cvs will complain the next time you “cvs update” your source tree. Also don't forget to add the new package to - the category's Makefile.

      The commit message of the initial import should - include part of the DESCR - file, so people reading the mailing lists know what the - package is/does.

      + include part of the DESCR file, so people reading the + mailing lists know what the package is/does.

      For new packages, “cvs import” is preferred to “

    3. -

      Remove from Remove from oldcategory/Makefile.

    4. -

      Add to Add to newcategory/Makefile.

    5. @@ -12705,7 +13689,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

      Appendix A. A simple example + "examples">Appendix 1. A simple example package: bison

      @@ -12715,28 +13699,28 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

      Table of Contents

      -
      A.1. +
      1.1. files
      A.1.1. Makefile
      + "#example-Makefile">1.1.1. Makefile
      A.1.2. DESCR
      + "#example-descr">1.1.2. DESCR
      A.1.3. PLIST
      + "#example-plist">1.1.3. PLIST
      A.1.4. Checking a + "#checking-package-with-pkglint">1.1.4. Checking a package with pkglint
      -
      A.2. +
      1.2. Steps for building, installing, packaging
      @@ -12755,7 +13739,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

      A.1. files

      + "example-files">1.1. files
      @@ -12765,7 +13749,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Pg/.packlist

      A.1.1. Makefile

      + "example-Makefile">1.1.1. Makefile
      @@ -12793,7 +13777,7 @@ INFO_FILES= bison.info

      A.1.2. DESCR

      + "example-descr">1.1.2. DESCR
      @@ -12810,7 +13794,7 @@ of the NetBSD source tree is beyond me.

      A.1.3. PLIST

      + "example-plist">1.1.3. PLIST
      @@ -12829,7 +13813,7 @@ share/bison.hairy

      A.1.4. Checking + "checking-package-with-pkglint">1.1.4. Checking a package with pkglint

      @@ -12839,9 +13823,10 @@ share/bison.hairy

      The NetBSD package system comes with pkgtools/pkglint which helps to check - the contents of these files. After installation it is - quite easy to use, just change to the directory of the + target="_top">pkgtools/pkglint 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 pkglint:

      @@ -12864,7 +13849,7 @@ looks fine.

      A.2. Steps for building, + "steps-for-b-i-p">1.2. Steps for building, installing, packaging

      @@ -12883,8 +13868,12 @@ looks fine. "userinput">mkdir patches
      -

      Create Makefile, - DESCR and Create Makefile, DESCR and PLIST (see Chapter 8, Package components - files, directories and @@ -12907,7 +13896,8 @@ Requesting ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//bison-1.25.tar.gz (via f Successfully retrieved file.

      -

      Generate the checksum of the distfile into Generate the checksum of the distfile into distinfo:

       # 
                 

      Appendix B. Build logs

      + "logs">Appendix 2. Build logs
      @@ -13026,10 +14016,10 @@ Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'

      Table of Contents

      -
      B.1. +
      2.1. Building figlet
      -
      B.2. +
      2.2. Packaging figlet
      @@ -13040,7 +14030,7 @@ Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'

      B.1. Building figlet

      + "logs.building">2.1. Building figlet
      @@ -13144,7 +14134,7 @@ cp figlet.6 /usr/pkg/man/man6

      B.2. Packaging figlet

      + "logs.package">2.2. Packaging figlet
      @@ -13167,7 +14157,7 @@ Registering depends:.

      Appendix C. Layout of the + "ftp-layout">Appendix 3. Layout of the FTP server's package archive

      @@ -13272,7 +14262,7 @@ Registering depends:.

      Appendix D. Editing guidelines + "editing">Appendix 4. Editing guidelines for the pkgsrc guide

      @@ -13282,10 +14272,10 @@ Registering depends:.

      Table of Contents

      -
      D.1. +
      4.1. Targets
      -
      D.2. +
      4.2. Procedure
      @@ -13298,29 +14288,33 @@ Registering depends:.

      D.1. Targets

      + "targets" id="targets">4.1. Targets
      -

      The pkgsrc guide's source code is stored in The pkgsrc guide's source code is stored in pkgsrc/doc/guide/files, and several files are created from it:

      • -

        pkgsrc/doc/pkgsrc.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 @@ -13330,13 +14324,15 @@ Registering depends:.

      • -

        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.

      • @@ -13350,7 +14346,7 @@ Registering depends:.

        D.2. Procedure

        + "procedure">4.2. Procedure
      @@ -13370,27 +14366,33 @@ 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 pkgsrc/meta-pkgs/netbsd-doc and - pkgsrc/meta-pkgs/netbsd-doc-print.

    6. -

      Edit the XML file(s) in Edit the XML file(s) in pkgsrc/doc/guide/files.

    7. Run make extract && make do-lint in - pkgsrc/doc/guide to - check the XML syntax, and fix it if needed.

      + pkgsrc/doc/guide to check the XML + syntax, and fix it if needed.

    8. Run make in make in pkgsrc/doc/guide to build the HTML and ASCII version.

    9. @@ -13398,7 +14400,8 @@ Registering depends:.
    10. If all is well, run make install-doc to put the - generated files into pkgsrc/doc.

    11. -- cgit v1.2.3