1 | <!-- $Id$ -->
|
---|
2 | <!-- Mandatory header for xml files change encoding to the one
|
---|
3 | you use on your computer -->
|
---|
4 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
5 | <!-- Mandatory DOCTYPE declaration. Fill free to add entities,
|
---|
6 | but no external entities in local files, since they would not
|
---|
7 | be accessible from JHALFSDIR. Change the document type `article' to
|
---|
8 | book if you prefer. That slightly changes the aspect if you render
|
---|
9 | it in html -->
|
---|
10 | <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
11 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" >
|
---|
12 |
|
---|
13 | <!-- The first markup should be the one defined in the DOCTYPE DECLARATION -->
|
---|
14 | <article>
|
---|
15 |
|
---|
16 | <!-- First section for the tarball download address.
|
---|
17 | Only the next four lines are mandatory, but you can add anything
|
---|
18 | to make the text look more like the LFS book.
|
---|
19 | Do not change anything, except the url and the md5 checksum. -->
|
---|
20 | <sect1 id="package">
|
---|
21 | <para>Download: <ulink url="http://your/package-manager/url"/></para>
|
---|
22 | <para>MD5 sum: <literal>package-md5-checksum</literal></para>
|
---|
23 | </sect1>
|
---|
24 |
|
---|
25 | <!-- If needed, uncomment and edit this:
|
---|
26 | <sect1 id="patches">
|
---|
27 | <para>Download: <ulink url="somepatch-url"/></para>
|
---|
28 | <para>MD5 sum: <literal>somepatch-md5</literal></para>
|
---|
29 | </sect1>
|
---|
30 | -->
|
---|
31 |
|
---|
32 | <!-- Do not change the next line. The name of the scriptlet will be taken
|
---|
33 | from the dbhtml instruction: it is the name of the file less .html, with
|
---|
34 | xxx-x-added before (x, digits). -->
|
---|
35 | <sect1 id="ch-tools-pkgmngt" role="wrap">
|
---|
36 | <?dbhtml filename="dpkg.html"?>
|
---|
37 | <!-- the next lines are now mandatory for unpacking the tarball at the
|
---|
38 | beginning of the scriptlet -->
|
---|
39 | <sect1info condition="script">
|
---|
40 | <productname>dpkg</productname>
|
---|
41 | <productnumber>x.y.z</productnumber><!-- version -->
|
---|
42 | <address>http://where/is/your/package</address><!-- url -->
|
---|
43 | </sect1info>
|
---|
44 | <!-- next line mandatory without change, but feel free to add any title,
|
---|
45 | other sect2 (with different role), sectinfo and so on -->
|
---|
46 | <sect2 role="installation">
|
---|
47 | <!-- You can use any number of remap="pre", "configure", "make", "test", "install"
|
---|
48 | <screen><userinput remap="something">Instructions</userinput></screen>.
|
---|
49 | They are executed in that order. "pre" can be used for patching for example.
|
---|
50 | In case testing is enabled, the instructions flagged test are logged to a different
|
---|
51 | file (test-log). If testing is not enabled, they are not executed at all. Do not
|
---|
52 | put line breaks before and after your instructions. <userinput> without
|
---|
53 | remap attribute are considered configuration instructions and executed last. You
|
---|
54 | can also use remap="adjust" for the same purpose. -->
|
---|
55 | <screen><userinput remap="configure">./configure --prefix=/tools \
|
---|
56 | --disable-nls --without-dselect \
|
---|
57 | --without-start-stop-daemon \
|
---|
58 | --without-update-alternatives \
|
---|
59 | --without-install-info \
|
---|
60 | --without-zlib --with-bz2=static --without-selinux</userinput></screen>
|
---|
61 |
|
---|
62 | <screen><userinput remap="make">(cd lib && make)
|
---|
63 | (cd src && make)
|
---|
64 | (cd dpkg-deb && make)
|
---|
65 | (cd dpkg-split && make)</userinput></screen>
|
---|
66 |
|
---|
67 | <screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
|
---|
68 | cp dpkg-deb/dpkg-deb /tools/bin
|
---|
69 | cp dpkg-split/dpkg-split /tools/bin
|
---|
70 | mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
|
---|
71 | cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
|
---|
72 |
|
---|
73 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
74 | # admindir on LFS system
|
---|
75 | admindir /var/lib/dpkg
|
---|
76 | EOF</userinput></screen>
|
---|
77 |
|
---|
78 | <screen><userinput>cat >> /tools/etc/dpkg/dpkg.cfg << EOF
|
---|
79 | # disable fatal error on path checking
|
---|
80 | force-bad-path
|
---|
81 | EOF</userinput></screen>
|
---|
82 |
|
---|
83 | </sect2>
|
---|
84 |
|
---|
85 | </sect1>
|
---|
86 |
|
---|
87 | <!-- Mandatory section for creating dirs. These instructions are added at the
|
---|
88 | end of the creating dirs instructions of the book. Do not change the
|
---|
89 | following line -->
|
---|
90 | <sect1 id="ch-pkgmngt-creatingdirs">
|
---|
91 |
|
---|
92 | <!-- Put the create dir intructions there. feel free to add
|
---|
93 | any explaining <title>Title</title> and <para>explanations</para> -->
|
---|
94 | <screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
|
---|
95 | mkdir -pv /var/lib/packages</userinput></screen>
|
---|
96 |
|
---|
97 | </sect1>
|
---|
98 | <!-- Same for files. Do not change the following line -->
|
---|
99 | <sect1 id="ch-pkgmngt-createfiles">
|
---|
100 |
|
---|
101 | <screen><userinput>touch /var/lib/dpkg/{available,status}
|
---|
102 | touch /var/log/dpkg.log</userinput></screen>
|
---|
103 |
|
---|
104 | </sect1>
|
---|
105 |
|
---|
106 | <!-- Last but not least : Final instructions for installing the
|
---|
107 | package manager at the end of chapter 6. Again, the scriptlet file name is
|
---|
108 | taken from the dbhtml instruction, with digits added before and .html cut.
|
---|
109 | -->
|
---|
110 | <sect1 id="ch-system-pkgmngt" role="wrap">
|
---|
111 | <?dbhtml filename="dpkg.html"?>
|
---|
112 |
|
---|
113 | <!-- the next lines are now mandatory for unpacking the tarball at the
|
---|
114 | beginning of the scriptlet -->
|
---|
115 | <sect1info condition="script">
|
---|
116 | <productname>dpkg</productname><!-- for example -->
|
---|
117 | <productnumber>x.y.z</productnumber><!-- version -->
|
---|
118 | <address>http://where/is/your/package</address><!-- url -->
|
---|
119 | </sect1info>
|
---|
120 |
|
---|
121 | <sect2 role="installation">
|
---|
122 |
|
---|
123 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
124 | --without-dselect \
|
---|
125 | --without-start-stop-daemon \
|
---|
126 | --without-update-alternatives \
|
---|
127 | --without-install-info \
|
---|
128 | --without-selinux</userinput></screen>
|
---|
129 |
|
---|
130 | <screen><userinput remap="make">make</userinput></screen>
|
---|
131 |
|
---|
132 | <!-- Those instructions are executed with PKG_DEST set. They are not processed
|
---|
133 | in any way to add $PKG_DEST at some place, and the PKG_DEST directory is not
|
---|
134 | populated before, so it is basically empty. You have thus to create any directory
|
---|
135 | needed in $PKG_DEST and not otherwise created by the make install command. -->
|
---|
136 | <screen><userinput remap="install">mkdir -pv $PKG_DEST
|
---|
137 | make DESTDIR=$PKG_DEST install
|
---|
138 | mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
|
---|
139 | cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
|
---|
140 |
|
---|
141 | <screen><userinput remap="install">cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
---|
142 | # admindir on LFS system
|
---|
143 | admindir /var/lib/dpkg
|
---|
144 | EOF</userinput></screen>
|
---|
145 |
|
---|
146 | <screen><userinput>cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
|
---|
147 | # disable fatal error on path checking
|
---|
148 | force-bad-path
|
---|
149 | EOF</userinput></screen>
|
---|
150 |
|
---|
151 | </sect2>
|
---|
152 |
|
---|
153 | </sect1>
|
---|
154 | </article>
|
---|