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