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