source: general/genlib/libpaper.xml@ bb8004d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules 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 bb8004d was de2898d, checked in by Ken Moffat <ken@…>, 9 years ago

libpaper_1.1.24+nmu4

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

  • Property mode set to 100644
File size: 7.4 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 "ftp://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_&libpaper-version;.tar.gz">
9 <!ENTITY libpaper-md5sum "155d2e589e2f4ef163de8fbbc5d3dd1e">
10 <!ENTITY libpaper-size "362 KB">
11 <!ENTITY libpaper-buildsize "2.6 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 &lfs76_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>./configure --prefix=/usr \
87 --sysconfdir=/etc \
88 --disable-static &amp;&amp;
89make</userinput></screen>
90
91 <para>This package does not come with a test suite.</para>
92
93 <para>
94 Now, as the <systemitem class="username">root</systemitem> user:
95 </para>
96
97<screen role="root"><userinput>make install &amp;&amp;
98mkdir -vp /etc/libpaper.d &amp;&amp;
99
100cat &gt; /usr/bin/run-parts &lt;&lt; "EOF"
101#!/bin/sh
102# run-parts: Runs all the scripts found in a directory.
103# from Slackware, by Patrick J. Volkerding with ideas borrowed
104# from the Red Hat and Debian versions of this utility.
105
106# keep going when something fails
107set +e
108
109if [ $# -lt 1 ]; then
110 echo "Usage: run-parts &lt;directory&gt;"
111 exit 1
112fi
113
114if [ ! -d $1 ]; then
115 echo "Not a directory: $1"
116 echo "Usage: run-parts &lt;directory&gt;"
117 exit 1
118fi
119
120# There are several types of files that we would like to
121# ignore automatically, as they are likely to be backups
122# of other scripts:
123IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
124
125# Main loop:
126for SCRIPT in $1/* ; do
127 # If this is not a regular file, skip it:
128 if [ ! -f $SCRIPT ]; then
129 continue
130 fi
131 # Determine if this file should be skipped by suffix:
132 SKIP=false
133 for SUFFIX in $IGNORE_SUFFIXES ; do
134 if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
135 SKIP=true
136 break
137 fi
138 done
139 if [ "$SKIP" = "true" ]; then
140 continue
141 fi
142 # If we've made it this far, then run the script if it's executable:
143 if [ -x $SCRIPT ]; then
144 $SCRIPT || echo "$SCRIPT failed."
145 fi
146done
147
148exit 0
149EOF
150
151chmod -v 755 /usr/bin/run-parts</userinput></screen>
152
153 </sect2>
154
155 <sect2 role="commands">
156 <title>Command Explanations</title>
157
158 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
159 href="../../xincludes/static-libraries.xml"/>
160
161 <para><command>mkdir -pv /etc/libpaper.d</command>:
162 <application>libpaper</application> expects that packages will install files
163 into this directory.</para>
164
165 <para><command>cat &gt; /usr/bin/run-parts &lt;&lt; "EOF"</command> :
166 <filename>paperconfig</filename> is a script which will invoke
167 <command>run-parts</command> if
168 <filename class="directory">/etc/libpaper.d</filename> exists. No other BLFS
169 package installs this, so we create it here.</para>
170
171 </sect2>
172
173 <sect2 role="configuration">
174 <title>Configuring libpaper</title>
175
176 <sect3>
177 <title>Configuration Information</title>
178
179 <para>Create <filename>/etc/papersize</filename> to set the default
180 system paper size. Issue the following command as the
181 <systemitem class="username">root</systemitem> user to set this to
182 &apos;A4&apos; (libpaper prefers the lowercase form). You may wish
183 to use a different size, such as letter.</para>
184
185<screen role="root"><userinput>cat &gt; /etc/papersize &lt;&lt; "EOF"
186a4
187EOF</userinput></screen>
188
189 </sect3>
190
191 </sect2>
192
193 <sect2 role="content">
194 <title>Contents</title>
195
196 <segmentedlist>
197 <segtitle>Installed Programs</segtitle>
198 <segtitle>Installed Library</segtitle>
199 <segtitle>Installed Directories</segtitle>
200
201 <seglistitem>
202 <seg>
203 paperconf, paperconfig, run-parts
204 </seg>
205 <seg>
206 libpaper.so
207 </seg>
208 <seg>
209 /etc/libpaper.d
210 </seg>
211 </seglistitem>
212 </segmentedlist>
213
214 <variablelist>
215 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
216 <?dbfo list-presentation="list"?>
217 <?dbhtml list-presentation="table"?>
218
219 <varlistentry id="paperconf">
220 <term><command>paperconf</command></term>
221 <listitem>
222 <para>print paper configuration information.</para>
223 <indexterm zone="libpaper paperconf">
224 <primary sortas="b-paperconf">paperconf</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 <varlistentry id="paperconfig">
230 <term><command>paperconfig</command></term>
231 <listitem>
232 <para>configure the system default paper size.</para>
233 <indexterm zone="libpaper paperconfig">
234 <primary sortas="b-paperconfig">paperconfig</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="run-parts">
240 <term><command>run-parts</command></term>
241 <listitem>
242 <para>run all the scripts found in a directory.</para>
243 <indexterm zone="libpaper run-parts">
244 <primary sortas="b-run-parts">run-parts</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="libpaper-lib">
250 <term><filename class="libraryfile">libpaper.so</filename></term>
251 <listitem>
252 <para>
253 contains functions for interrogating the paper library.
254 </para>
255 <indexterm zone="libpaper libpaper-lib">
256 <primary sortas="c-libpaper">libpaper.so</primary>
257 </indexterm>
258 </listitem>
259 </varlistentry>
260
261 </variablelist>
262
263 </sect2>
264
265</sect1>
Note: See TracBrowser for help on using the repository browser.