source: chapter08/file.xml@ ceebda5

ml-11.0 multilib
Last change on this file since ceebda5 was ceebda5, checked in by Xℹ Ruoyao <xry111@…>, 3 years ago

Merge changes from trunk to multilib

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@12176 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 5.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-file" role="wrap">
9 <?dbhtml filename="file.html"?>
10
11 <sect1info condition="script">
12 <productname>file</productname>
13 <productnumber>&file-version;</productnumber>
14 <address>&file-url;</address>
15 </sect1info>
16
17 <title>File-&file-version;</title>
18
19 <indexterm zone="ch-system-file">
20 <primary sortas="a-File">File</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The File package contains a utility for determining the type of a given
27 file or files.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&file-fin-sbu;</seg>
35 <seg>&file-fin-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of File</title>
43
44 <para>Prepare File for compilation:</para>
45
46<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
47
48 <para>Compile the package:</para>
49
50<screen><userinput remap="make">make</userinput></screen>
51
52 <para>To test the results, issue:</para>
53
54<screen><userinput remap="test">make check</userinput></screen>
55
56 <para>Install the package:</para>
57
58<screen><userinput remap="install">make install</userinput></screen>
59
60 <para><command>/bin/more</command> from util-linux will link to
61 <filename class="libraryfile">libmagic.so</filename>, so the shared
62 library should be moved to <filename class="directory">/lib</filename>,
63 and as a result the
64 <filename class="extension">.so</filename> file in
65 <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
66
67<screen><userinput remap="install">mv -v /usr/lib/libmagic.so.* /lib
68ln -sfv ../../lib/$(readlink /usr/lib/libmagic.so) /usr/lib/libmagic.so</userinput></screen>
69
70 </sect2>
71
72 <!-- - - - - - - - - - -->
73 <!-- Multilib - 32bit -->
74 <!-- - - - - - - - - - -->
75
76 <sect2 arch="ml_32,ml_all" role="installation">
77 <title>Installation of File - 32bit</title>
78
79 <para>Clean previous build:</para>
80
81<screen><userinput remap="pre">make distclean</userinput></screen>
82
83 <para>Prepare File for compilation:</para>
84
85<screen><userinput remap="configure">CC="gcc -m32" ./configure \
86 --prefix=/usr \
87 --libdir=&usr-lib-m32; \
88 --host=i686-pc-linux-gnu</userinput></screen>
89
90 <para>Compile the package:</para>
91
92<screen><userinput remap="make">make</userinput></screen>
93
94 <para>Install the package:</para>
95
96<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
97cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
98rm -rf DESTDIR</userinput></screen>
99
100 </sect2><!-- m32 -->
101
102 <!-- - - - - - - - - - -->
103 <!-- Multilib - x32bit -->
104 <!-- - - - - - - - - - -->
105
106 <sect2 arch="ml_x32,ml_all" role="installation">
107 <title>Installation of File - x32bit</title>
108
109 <para>Clean previous build:</para>
110
111<screen><userinput remap="pre">make distclean</userinput></screen>
112
113 <para>Prepare File for compilation:</para>
114
115<screen><userinput remap="configure">CC="gcc -mx32" ./configure \
116 --prefix=/usr \
117 --libdir=&usr-lib-mx32; \
118 --host=x86_64-pc-linux-gnux32</userinput></screen>
119
120 <para>Compile the package:</para>
121
122<screen><userinput remap="make">make</userinput></screen>
123
124 <para>Install the package:</para>
125
126<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
127cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
128rm -rf DESTDIR</userinput></screen>
129
130 </sect2><!-- mx32 -->
131
132 <sect2 id="contents-file" role="content">
133 <title>Contents of File</title>
134
135 <segmentedlist>
136 <segtitle>Installed programs</segtitle>
137 <segtitle>Installed library</segtitle>
138
139 <seglistitem>
140 <seg>file</seg>
141 <seg>libmagic.so</seg>
142 </seglistitem>
143 </segmentedlist>
144
145 <variablelist>
146 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
147 <?dbfo list-presentation="list"?>
148 <?dbhtml list-presentation="table"?>
149
150 <varlistentry id="file">
151 <term><command>file</command></term>
152 <listitem>
153 <para>Tries to classify each given file; it does this by performing
154 several tests&mdash;file system tests, magic number tests, and language
155 tests</para>
156 <indexterm zone="ch-system-file file">
157 <primary sortas="b-file">file</primary>
158 </indexterm>
159 </listitem>
160 </varlistentry>
161
162 <varlistentry id="libmagic">
163 <term><filename class="libraryfile">libmagic</filename></term>
164 <listitem>
165 <para>Contains routines for magic number recognition, used by the
166 <command>file</command> program</para>
167 <indexterm zone="ch-system-file libmagic">
168 <primary sortas="c-libmagic">libmagic</primary>
169 </indexterm>
170 </listitem>
171 </varlistentry>
172
173 </variablelist>
174
175 </sect2>
176
177</sect1>
Note: See TracBrowser for help on using the repository browser.