summaryrefslogtreecommitdiff
path: root/doc/guide/files/binary.xml
blob: cff651bc4a2b87ffc134d11a109cf5c80c0078b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!-- $NetBSD: binary.xml,v 1.35 2016/07/10 07:43:23 rillig Exp $ -->

<chapter id="binary">
  <title>Creating binary packages</title>

  <sect1 id="building-a-single-binary-package">
    <title>Building a single binary package</title>

    <para>Once you have built and installed a package, you can create
    a <emphasis>binary package</emphasis> which can be installed on
    another system with &man.pkg.add.1;. This saves having to build
    the same package on a group of hosts and wasting CPU time. It also
    provides a simple means for others to install your package, should
    you distribute it.</para>

    <para>To create a binary package, change into the appropriate
    directory in pkgsrc, and run <command>make
    package</command>:</para>

<screen>
&uprompt; <userinput>cd misc/figlet</userinput>
&uprompt; <userinput>make package</userinput>
</screen>

    <para>This will build and install your package (if not already done),
    and then build a binary package from what was installed. You can
    then use the <command>pkg_*</command> tools to manipulate
    it. Binary packages are created by default in
    <filename>/usr/pkgsrc/packages</filename>, in the form of a
    gzipped tar file. See <xref linkend="logs.package"/> for a
    continuation of the above <filename
    role="pkg">misc/figlet</filename> example.</para>

    <para>See <xref linkend="submit"/> for information on how to submit
    such a binary package.</para>
  </sect1>

  <sect1 id="settings-for-creationg-of-binary-packages">
    <title>Settings for creation of binary packages</title>

    <para>See <xref linkend="build.helpful-targets"/>.</para>
  </sect1>
</chapter>