source: pkgmngt/packageManager.xml.template@ 22bb166

ablfs-more legacy plabs/lfs-user trunk
Last change on this file since 22bb166 was 2758d94, checked in by Pierre Labastie <pierre@…>, 6 years ago

Use sect1info for getting informations on LFS packages:

  • add sect1info sections to packagemanager.xml.xxx + various fixes
  • add templates in LFS/lfs.xsl for script start and script end:
    • script start: define variables containing package information

print disk usage
unpack and change dir

  • script end: print disk usage

remove build dir

  • remove the corresponding operations from master.sh
  • Property mode set to 100644
File size: 5.9 KB
RevLine 
[4c6f54f]1<!-- $Id$ -->
[7072e1f]2<!-- Mandatory header for xml files change encoding to the one
3you use on your computer -->
4<?xml version="1.0" encoding="UTF-8"?>
5<!-- Mandatory DOCTYPE declaration. Fill free to add entities,
6but no external entities in local files, since they would not
7be accessible from JHALFSDIR. Change the document type `article' to
8book if you prefer. That slightly changes the aspect if you render
9it 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.
17Only the next four lines are mandatory, but you can add anything
18to make the text look more like the LFS book.
19Do 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
33from the dbhtml instruction: it is the name of the file less .html, with
[2758d94]34xxx-x-added before (x, digits). -->
[7072e1f]35<sect1 id="ch-tools-pkgmngt" role="wrap">
36 <?dbhtml filename="dpkg.html"?>
[2758d94]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>
[7072e1f]44<!-- next line mandatory without change, but feel free to add any title,
45other 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>.
49They are executed in that order. "pre" can be used for patching for example.
50In case testing is enabled, the instructions flagged test are logged to a different
51file (test-log). If testing is not enabled, they are not executed at all. Do not
52put line breaks before and after your instructions. <userinput> without
53remap attribute are considered configuration instructions and executed last. You
54can 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 &amp;&amp; make)
63(cd src &amp;&amp; make)
64(cd dpkg-deb &amp;&amp; make)
65(cd dpkg-split &amp;&amp; make)</userinput></screen>
66
67<screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
68cp dpkg-deb/dpkg-deb /tools/bin
69cp dpkg-split/dpkg-split /tools/bin
70mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
71cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
72
73<screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
74# admindir on LFS system
75admindir /var/lib/dpkg
76EOF</userinput></screen>
77
78<screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
79# disable fatal error on path checking
80force-bad-path
81EOF</userinput></screen>
82
83 </sect2>
84
85</sect1>
86
87<!-- Mandatory section for creating dirs. These instructions are added at the
88end of the creating dirs instructions of the book. Do not change the
89following line -->
[575bcf3]90<sect1 id="ch-pkgmngt-creatingdirs">
[7072e1f]91
[575bcf3]92<!-- Put the create dir intructions there. feel free to add
[7072e1f]93any explaining <title>Title</title> and <para>explanations</para> -->
94<screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
95mkdir -pv /var/lib/packages</userinput></screen>
96
97</sect1>
98<!-- Same for files. Do not change the following line -->
[575bcf3]99<sect1 id="ch-pkgmngt-createfiles">
[7072e1f]100
101<screen><userinput>touch /var/lib/dpkg/{available,status}
102touch /var/log/dpkg.log</userinput></screen>
103
104</sect1>
105
106<!-- Last but not least : Final instructions for installing the
107package manager at the end of chapter 6. Again, the scriptlet file name is
[2758d94]108taken from the dbhtml instruction, with digits added before and .html cut.
[7072e1f]109-->
110<sect1 id="ch-system-pkgmngt" role="wrap">
111 <?dbhtml filename="dpkg.html"?>
112
[2758d94]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
[7072e1f]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
133in any way to add $PKG_DEST at some place, and the PKG_DEST directory is not
134populated before, so it is basically empty. You have thus to create any directory
135needed in $PKG_DEST and not otherwise created by the make install command. -->
136<screen><userinput remap="install">mkdir -pv $PKG_DEST
137make DESTDIR=$PKG_DEST install
138mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
139cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
140
141<screen><userinput remap="install">cat &gt;&gt; $PKG_DEST/etc/dpkg/dpkg.cfg &lt;&lt; EOF
142# admindir on LFS system
143admindir /var/lib/dpkg
144EOF</userinput></screen>
145
146<screen><userinput>cat &gt;&gt; $PKG_DEST/etc/dpkg/dpkg.cfg &lt;&lt; EOF
147# disable fatal error on path checking
148force-bad-path
149EOF</userinput></screen>
150
151 </sect2>
152
153</sect1>
154</article>
Note: See TracBrowser for help on using the repository browser.