source: general/genlib/libpaper.xml@ fc935fb

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 9.0 9.1 bdubbs/svn kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since fc935fb was 272f28b, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20339 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 7.3 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 <!ENTITY libpaper-download-http "http://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_&libpaper-version;.tar.gz">
8 <!ENTITY libpaper-download-ftp " ">
9 <!ENTITY libpaper-md5sum "38bc55688c0fc5544edaa5a951a45fbd">
10 <!ENTITY libpaper-size "48 KB">
11 <!ENTITY libpaper-buildsize "3.5 MB">
12 <!ENTITY libpaper-time "less than 0.1 SBU">
13]>
14
15<sect1 id="libpaper" xreflabel="libpaper-&libpaper-version;">
16 <?dbhtml filename="libpaper.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>libpaper-&libpaper-version;</title>
24
25 <indexterm zone="libpaper">
26 <primary sortas="a-libpaper">libpaper</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to libpaper</title>
31
32 <para>
33 This package is intended to provide a simple way for applications to take
34 actions based on a system or user-specified paper size.
35 </para>
36
37 &lfs83_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&libpaper-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&libpaper-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &libpaper-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &libpaper-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &libpaper-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &libpaper-time;
69 </para>
70 </listitem>
71 </itemizedlist>
72
73 <para condition="html" role="usernotes">
74 User Notes: <ulink url="&blfs-wiki;/libpaper"/>
75 </para>
76
77 </sect2>
78
79 <sect2 role="installation">
80 <title>Installation of libpaper</title>
81
82 <para>
83 Install <application>libpaper</application> by running the following commands:
84 </para>
85
86<screen><userinput>autoreconf -fi &amp;&amp;
87./configure --prefix=/usr \
88 --sysconfdir=/etc \
89 --disable-static &amp;&amp;
90make</userinput></screen>
91
92 <para>This package does not come with a test suite.</para>
93
94 <para>
95 Now, as the <systemitem class="username">root</systemitem> user:
96 </para>
97
98<screen role="root"><userinput>make install &amp;&amp;
99mkdir -vp /etc/libpaper.d &amp;&amp;
100
101cat &gt; /usr/bin/run-parts &lt;&lt; "EOF"
102#!/bin/sh
103# run-parts: Runs all the scripts found in a directory.
104# from Slackware, by Patrick J. Volkerding with ideas borrowed
105# from the Red Hat and Debian versions of this utility.
106
107# keep going when something fails
108set +e
109
110if [ $# -lt 1 ]; then
111 echo "Usage: run-parts &lt;directory&gt;"
112 exit 1
113fi
114
115if [ ! -d $1 ]; then
116 echo "Not a directory: $1"
117 echo "Usage: run-parts &lt;directory&gt;"
118 exit 1
119fi
120
121# There are several types of files that we would like to
122# ignore automatically, as they are likely to be backups
123# of other scripts:
124IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
125
126# Main loop:
127for SCRIPT in $1/* ; do
128 # If this is not a regular file, skip it:
129 if [ ! -f $SCRIPT ]; then
130 continue
131 fi
132 # Determine if this file should be skipped by suffix:
133 SKIP=false
134 for SUFFIX in $IGNORE_SUFFIXES ; do
135 if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
136 SKIP=true
137 break
138 fi
139 done
140 if [ "$SKIP" = "true" ]; then
141 continue
142 fi
143 # If we've made it this far, then run the script if it's executable:
144 if [ -x $SCRIPT ]; then
145 $SCRIPT || echo "$SCRIPT failed."
146 fi
147done
148
149exit 0
150EOF
151
152chmod -v 755 /usr/bin/run-parts</userinput></screen>
153
154 </sect2>
155
156 <sect2 role="commands">
157 <title>Command Explanations</title>
158
159 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
160 href="../../xincludes/static-libraries.xml"/>
161
162 <para><command>mkdir -pv /etc/libpaper.d</command>:
163 <application>libpaper</application> expects that packages will install files
164 into this directory.</para>
165
166 <para><command>cat &gt; /usr/bin/run-parts &lt;&lt; "EOF"</command> :
167 <filename>paperconfig</filename> is a script which will invoke
168 <command>run-parts</command> if
169 <filename class="directory">/etc/libpaper.d</filename> exists. No other BLFS
170 package installs this, so we create it here.</para>
171
172 </sect2>
173
174 <sect2 role="configuration">
175 <title>Configuring libpaper</title>
176
177 <sect3>
178 <title>Configuration Information</title>
179
180 <para>Create <filename>/etc/papersize</filename> to set the default
181 system paper size. Issue the following command as the
182 <systemitem class="username">root</systemitem> user to set this to
183 &apos;A4&apos; (libpaper prefers the lowercase form). You may wish
184 to use a different size, such as letter.</para>
185
186<screen role="root"><userinput>cat &gt; /etc/papersize &lt;&lt; "EOF"
187a4
188EOF</userinput></screen>
189
190 </sect3>
191
192 </sect2>
193
194 <sect2 role="content">
195 <title>Contents</title>
196
197 <segmentedlist>
198 <segtitle>Installed Programs</segtitle>
199 <segtitle>Installed Library</segtitle>
200 <segtitle>Installed Directories</segtitle>
201
202 <seglistitem>
203 <seg>
204 paperconf, paperconfig, run-parts
205 </seg>
206 <seg>
207 libpaper.so
208 </seg>
209 <seg>
210 /etc/libpaper.d
211 </seg>
212 </seglistitem>
213 </segmentedlist>
214
215 <variablelist>
216 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
217 <?dbfo list-presentation="list"?>
218 <?dbhtml list-presentation="table"?>
219
220 <varlistentry id="paperconf">
221 <term><command>paperconf</command></term>
222 <listitem>
223 <para>prints paper configuration information.</para>
224 <indexterm zone="libpaper paperconf">
225 <primary sortas="b-paperconf">paperconf</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id="paperconfig">
231 <term><command>paperconfig</command></term>
232 <listitem>
233 <para>configures the system default paper size.</para>
234 <indexterm zone="libpaper paperconfig">
235 <primary sortas="b-paperconfig">paperconfig</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry id="run-parts">
241 <term><command>run-parts</command></term>
242 <listitem>
243 <para>runs all the scripts found in a directory.</para>
244 <indexterm zone="libpaper run-parts">
245 <primary sortas="b-run-parts">run-parts</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="libpaper-lib">
251 <term><filename class="libraryfile">libpaper.so</filename></term>
252 <listitem>
253 <para>
254 contains functions for interrogating the paper library.
255 </para>
256 <indexterm zone="libpaper libpaper-lib">
257 <primary sortas="c-libpaper">libpaper.so</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
262 </variablelist>
263
264 </sect2>
265
266</sect1>
Note: See TracBrowser for help on using the repository browser.