source: general/genlib/libpaper.xml@ 8200059

systemd-11177
Last change on this file since 8200059 was 8200059, checked in by Christopher Gregory <cjg@…>, 10 years ago

Merged libpaper addition from trunk.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@14220 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 "2d7239e4e7cb295aff54814f0d97992d">
10 <!ENTITY libpaper-size "361 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 &lfs75_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
90</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 -v /etc/libpaper.d &amp;&amp;
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
150chmod -v -m755 /usr/bin/run-parts</userinput></screen>
151
152 </sect2>
153
154 <sect2 role="commands">
155 <title>Command Explanations</title>
156
157 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
158 href="../../xincludes/static-libraries.xml"/>
159
160 <para><command>mkdir -v /etc/libpaper.d</command>:
161 <application>libpaper</application> expects that packages will install files
162 into this directory.</para>
163
164 <para><command>cat &gt; /usr/bin/run-parts &lt;&lt; "EOF"</command> :
165 <filename>paperconfig</filename> is a script which will invoke
166 <command>run-parts</command> if
167 <filename class="directory">/etc/libpaper.d</filename> exists. No other BLFS
168 package installs this, so we create it here.</para>
169
170 </sect2>
171
172 <sect2 role="configuration">
173 <title>Configuring libpaper</title>
174
175 <sect3>
176 <title>Configuration Information</title>
177
178 <para>Create <filename>/etc/papersize</filename> to set the default
179 system paper size. Issue the following command as the
180 <systemitem class="username">root</systemitem> user to set this to
181 &apos;A4&apos; (libpaper prefers the lowercase form). You may wish
182 to use a different size, such as letter.</para>
183
184<screen role="root"><userinput>cat &gt; /etc/papersize &lt;&lt; "EOF"
185a4
186EOF</userinput></screen>
187
188 </sect3>
189
190 </sect2>
191
192 <sect2 role="content">
193 <title>Contents</title>
194
195 <segmentedlist>
196 <segtitle>Installed Programs</segtitle>
197 <segtitle>Installed Library</segtitle>
198 <segtitle>Installed Directories</segtitle>
199
200 <seglistitem>
201 <seg>
202 paperconf, paperconfig, run-parts
203 </seg>
204 <seg>
205 libpaper.so
206 </seg>
207 <seg>
208 /etc/libpaper.d
209 </seg>
210 </seglistitem>
211 </segmentedlist>
212
213 <variablelist>
214 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
215 <?dbfo list-presentation="list"?>
216 <?dbhtml list-presentation="table"?>
217
218 <varlistentry id="paperconf">
219 <term><command>paperconf</command></term>
220 <listitem>
221 <para>print paper configuration information.</para>
222 <indexterm zone="libpaper paperconf">
223 <primary sortas="b-paperconf">paperconf</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="paperconfig">
229 <term><command>paperconfig</command></term>
230 <listitem>
231 <para>configure the system default paper size.</para>
232 <indexterm zone="libpaper paperconfig">
233 <primary sortas="b-paperconfig">paperconfig</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
238 <varlistentry id="run-parts">
239 <term><command>run-parts</command></term>
240 <listitem>
241 <para>run all the scripts found in a directory.</para>
242 <indexterm zone="libpaper run-parts">
243 <primary sortas="b-run-parts">run-parts</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="libpaper-lib">
249 <term><filename class="libraryfile">libpaper.so</filename></term>
250 <listitem>
251 <para>
252 contains functions for interrogating the paper library.
253 </para>
254 <indexterm zone="libpaper libpaper-lib">
255 <primary sortas="c-libpaper">libpaper.so</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 </variablelist>
261
262 </sect2>
263
264</sect1>
Note: See TracBrowser for help on using the repository browser.