summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/packaging/tutorials/basic.mdwn64
1 files changed, 63 insertions, 1 deletions
diff --git a/dev/packaging/tutorials/basic.mdwn b/dev/packaging/tutorials/basic.mdwn
index c7509ad..80f3406 100644
--- a/dev/packaging/tutorials/basic.mdwn
+++ b/dev/packaging/tutorials/basic.mdwn
@@ -664,8 +664,70 @@ Your resulting `copyright` file might look something like this:
On this system, a copy of the Expat License may be found at
<file:///usr/share/common-licenses/Expat>.
+Building Everything
+-------------------
-TODO: Finish.
+Now we can build all of our source and binary packages and verify that
+everything is correct.
+
+**opkbuild**(1) maintains a cache file in the work area; because we've modified
+the metadata in our packaging since the first time we ran **opkbuild**(1), this
+cache file is out-of-date. Also, we should make sure that the entire build
+process still works. So let's clean up the work area before going any further.
+
+ $ rm -Rf tmp/
+
+Now let's run **opkbuild**(1) again, this time completely building all of our
+source and binary packages and cleaning up automatically when we're done.
+
+ $ opkbuild
+
+After that finishes, you should see the built packages in the parent directory.
+
+ $ ls -1 ../*.opk
+ ../libexpat.1_2.1.0-2_core-linux-eglibc_all.opk
+ ../libexpat.1-dev_2.1.0-2_core-linux-eglibc_all.opk
+ ../src-expat_2.1.0-2_src_all.opk
+ ../xmlwf_2.1.0-2_core-linux-eglibc_all.opk
+ ../xmlwf-doc_2.1.0-2_all_all.opk
+
+`src-expat` is a *source binary package* – a binary package installable with the
+package manager that provides the files in our source package. This binary
+package is a convenient way to distribute our source package to others.
+
+You can use the **tar**(1) command to verify that the control information and
+data files in packages look correct.
+
+ $ tar -xzO control.tar.gz \
+ > <../libexpat.1_2.1.0-2_core-linux-eglibc_all.opk | tar -xzO ./control
+ Package: libexpat.1
+ Source: expat
+ Version: 2.1.0-2
+ Architecture: core-linux-eglibc
+ Platform: all
+ Maintainer: "J. Random Hacker" <jrandom@example.com>
+ Installed-Size: 164
+ Description: XML parser library
+ Expat is an XML parser library written in C. It is a stream-oriented parser in
+ which an application registers handlers for things the parser might find in the
+ XML document (like start tags).
+ Homepage: http://expat.sourceforge.net/
+ $ tar -xzO data.tar.gz \
+ > <../libexpat.1_2.1.0-2_core-linux-eglibc_all.opk | tar -tz
+ ./
+ ./usr/
+ ./usr/share/
+ ./usr/share/doc/
+ ./usr/share/doc/libexpat.1/
+ ./usr/share/doc/libexpat.1/changelog.dist
+ ./usr/share/doc/libexpat.1/copyright
+ ./usr/lib/
+ ./usr/lib/core-linux-eglibc/
+ ./usr/lib/core-linux-eglibc/libexpat.so.1
+ ./usr/lib/core-linux-eglibc/libexpat.so.1.6.0
+
+Congratulations! You've made a source package that successfully builds four
+binary packages!
[opkbuild]: http://git.os.libiquity.com/opkbuild/opkbuild.git/