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