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