[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">
|
---|
| 8 | <!ENTITY libpaper-download-ftp "ftp://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_&libpaper-version;.tar.gz">
|
---|
[1ecdb18] | 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 |
|
---|
[b9875028] | 37 | &lfs76_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 |
|
---|
| 86 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 87 | --sysconfdir=/etc \
|
---|
| 88 | --disable-static &&
|
---|
[7031a69] | 89 | make</userinput></screen>
|
---|
[1ecdb18] | 90 |
|
---|
| 91 | <para>This package does not come with a test suite.</para>
|
---|
| 92 |
|
---|
| 93 | <para>
|
---|
| 94 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 95 | </para>
|
---|
| 96 |
|
---|
| 97 | <screen role="root"><userinput>make install &&
|
---|
[7031a69] | 98 | mkdir -vp /etc/libpaper.d &&
|
---|
| 99 |
|
---|
[ff7c7bf8] | 100 | cat > /usr/bin/run-parts << "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
|
---|
| 107 | set +e
|
---|
| 108 |
|
---|
| 109 | if [ $# -lt 1 ]; then
|
---|
| 110 | echo "Usage: run-parts <directory>"
|
---|
| 111 | exit 1
|
---|
| 112 | fi
|
---|
| 113 |
|
---|
| 114 | if [ ! -d $1 ]; then
|
---|
| 115 | echo "Not a directory: $1"
|
---|
| 116 | echo "Usage: run-parts <directory>"
|
---|
| 117 | exit 1
|
---|
| 118 | fi
|
---|
| 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:
|
---|
| 123 | IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
|
---|
| 124 |
|
---|
| 125 | # Main loop:
|
---|
| 126 | for 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
|
---|
| 146 | done
|
---|
| 147 |
|
---|
| 148 | exit 0
|
---|
| 149 | EOF
|
---|
[7031a69] | 150 |
|
---|
[bffb1be] | 151 | chmod -v 755 /usr/bin/run-parts</userinput></screen>
|
---|
[1ecdb18] | 152 |
|
---|
| 153 | </sect2>
|
---|
| 154 |
|
---|
| 155 | <sect2 role="commands">
|
---|
| 156 | <title>Command Explanations</title>
|
---|
| 157 |
|
---|
| 158 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 159 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 160 |
|
---|
[7031a69] | 161 | <para><command>mkdir -pv /etc/libpaper.d</command>:
|
---|
[fbf70663] | 162 | <application>libpaper</application> expects that packages will install files
|
---|
| 163 | into this directory.</para>
|
---|
| 164 |
|
---|
[ff7c7bf8] | 165 | <para><command>cat > /usr/bin/run-parts << "EOF"</command> :
|
---|
| 166 | <filename>paperconfig</filename> is a script which will invoke
|
---|
| 167 | <command>run-parts</command> if
|
---|
| 168 | <filename class="directory">/etc/libpaper.d</filename> exists. No other BLFS
|
---|
| 169 | package installs this, so we create it here.</para>
|
---|
| 170 |
|
---|
[fbf70663] | 171 | </sect2>
|
---|
| 172 |
|
---|
| 173 | <sect2 role="configuration">
|
---|
| 174 | <title>Configuring libpaper</title>
|
---|
| 175 |
|
---|
| 176 | <sect3>
|
---|
| 177 | <title>Configuration Information</title>
|
---|
| 178 |
|
---|
| 179 | <para>Create <filename>/etc/papersize</filename> to set the default
|
---|
| 180 | system paper size. Issue the following command as the
|
---|
| 181 | <systemitem class="username">root</systemitem> user to set this to
|
---|
[ff7c7bf8] | 182 | 'A4' (libpaper prefers the lowercase form). You may wish
|
---|
[fbf70663] | 183 | to use a different size, such as letter.</para>
|
---|
| 184 |
|
---|
| 185 | <screen role="root"><userinput>cat > /etc/papersize << "EOF"
|
---|
| 186 | a4
|
---|
| 187 | EOF</userinput></screen>
|
---|
| 188 |
|
---|
| 189 | </sect3>
|
---|
| 190 |
|
---|
[1ecdb18] | 191 | </sect2>
|
---|
| 192 |
|
---|
| 193 | <sect2 role="content">
|
---|
| 194 | <title>Contents</title>
|
---|
| 195 |
|
---|
| 196 | <segmentedlist>
|
---|
| 197 | <segtitle>Installed Programs</segtitle>
|
---|
| 198 | <segtitle>Installed Library</segtitle>
|
---|
| 199 | <segtitle>Installed Directories</segtitle>
|
---|
| 200 |
|
---|
| 201 | <seglistitem>
|
---|
| 202 | <seg>
|
---|
[ff7c7bf8] | 203 | paperconf, paperconfig, run-parts
|
---|
[1ecdb18] | 204 | </seg>
|
---|
| 205 | <seg>
|
---|
| 206 | libpaper.so
|
---|
| 207 | </seg>
|
---|
| 208 | <seg>
|
---|
| 209 | /etc/libpaper.d
|
---|
| 210 | </seg>
|
---|
| 211 | </seglistitem>
|
---|
| 212 | </segmentedlist>
|
---|
| 213 |
|
---|
| 214 | <variablelist>
|
---|
| 215 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 216 | <?dbfo list-presentation="list"?>
|
---|
| 217 | <?dbhtml list-presentation="table"?>
|
---|
| 218 |
|
---|
| 219 | <varlistentry id="paperconf">
|
---|
| 220 | <term><command>paperconf</command></term>
|
---|
| 221 | <listitem>
|
---|
| 222 | <para>print paper configuration information.</para>
|
---|
| 223 | <indexterm zone="libpaper paperconf">
|
---|
| 224 | <primary sortas="b-paperconf">paperconf</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
| 229 | <varlistentry id="paperconfig">
|
---|
| 230 | <term><command>paperconfig</command></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>configure the system default paper size.</para>
|
---|
| 233 | <indexterm zone="libpaper paperconfig">
|
---|
| 234 | <primary sortas="b-paperconfig">paperconfig</primary>
|
---|
| 235 | </indexterm>
|
---|
| 236 | </listitem>
|
---|
| 237 | </varlistentry>
|
---|
| 238 |
|
---|
[ff7c7bf8] | 239 | <varlistentry id="run-parts">
|
---|
| 240 | <term><command>run-parts</command></term>
|
---|
| 241 | <listitem>
|
---|
| 242 | <para>run all the scripts found in a directory.</para>
|
---|
| 243 | <indexterm zone="libpaper run-parts">
|
---|
| 244 | <primary sortas="b-run-parts">run-parts</primary>
|
---|
| 245 | </indexterm>
|
---|
| 246 | </listitem>
|
---|
| 247 | </varlistentry>
|
---|
| 248 |
|
---|
[1ecdb18] | 249 | <varlistentry id="libpaper-lib">
|
---|
| 250 | <term><filename class="libraryfile">libpaper.so</filename></term>
|
---|
| 251 | <listitem>
|
---|
| 252 | <para>
|
---|
| 253 | contains functions for interrogating the paper library.
|
---|
| 254 | </para>
|
---|
| 255 | <indexterm zone="libpaper libpaper-lib">
|
---|
| 256 | <primary sortas="c-libpaper">libpaper.so</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
| 260 |
|
---|
| 261 | </variablelist>
|
---|
| 262 |
|
---|
| 263 | </sect2>
|
---|
| 264 |
|
---|
| 265 | </sect1>
|
---|