2014-08-28 22:44:20 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2014-08-28 23:36:26 +08:00
|
|
|
<!ENTITY libpaper-download-http "http://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_&libpaper-version;.tar.gz">
|
|
|
|
<!ENTITY libpaper-download-ftp "ftp://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_&libpaper-version;.tar.gz">
|
2014-11-12 10:43:48 +08:00
|
|
|
<!ENTITY libpaper-md5sum "155d2e589e2f4ef163de8fbbc5d3dd1e">
|
|
|
|
<!ENTITY libpaper-size "362 KB">
|
2014-08-28 22:44:20 +08:00
|
|
|
<!ENTITY libpaper-buildsize "2.6 MB">
|
|
|
|
<!ENTITY libpaper-time "less than 0.1 SBU">
|
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="libpaper" xreflabel="libpaper-&libpaper-version;">
|
|
|
|
<?dbhtml filename="libpaper.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>libpaper-&libpaper-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="libpaper">
|
|
|
|
<primary sortas="a-libpaper">libpaper</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to libpaper</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This package is intended to provide a simple way for applications to take
|
|
|
|
actions based on a system or user-specified paper size.
|
|
|
|
</para>
|
|
|
|
|
2015-09-16 20:44:08 +08:00
|
|
|
&lfs78_checked;
|
2014-08-28 22:44:20 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&libpaper-download-http;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&libpaper-download-ftp;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download MD5 sum: &libpaper-md5sum;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download size: &libpaper-size;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated disk space required: &libpaper-buildsize;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated build time: &libpaper-time;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<para condition="html" role="usernotes">
|
|
|
|
User Notes: <ulink url="&blfs-wiki;/libpaper"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of libpaper</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Install <application>libpaper</application> by running the following commands:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--disable-static &&
|
2014-09-18 12:56:07 +08:00
|
|
|
make</userinput></screen>
|
2014-08-28 22:44:20 +08:00
|
|
|
|
|
|
|
<para>This package does not come with a test suite.</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install &&
|
2014-09-18 12:56:07 +08:00
|
|
|
mkdir -vp /etc/libpaper.d &&
|
|
|
|
|
2014-09-04 01:41:32 +08:00
|
|
|
cat > /usr/bin/run-parts << "EOF"
|
|
|
|
#!/bin/sh
|
|
|
|
# run-parts: Runs all the scripts found in a directory.
|
|
|
|
# from Slackware, by Patrick J. Volkerding with ideas borrowed
|
|
|
|
# from the Red Hat and Debian versions of this utility.
|
|
|
|
|
|
|
|
# keep going when something fails
|
|
|
|
set +e
|
|
|
|
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
echo "Usage: run-parts <directory>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d $1 ]; then
|
|
|
|
echo "Not a directory: $1"
|
|
|
|
echo "Usage: run-parts <directory>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# There are several types of files that we would like to
|
|
|
|
# ignore automatically, as they are likely to be backups
|
|
|
|
# of other scripts:
|
|
|
|
IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
|
|
|
|
|
|
|
|
# Main loop:
|
|
|
|
for SCRIPT in $1/* ; do
|
|
|
|
# If this is not a regular file, skip it:
|
|
|
|
if [ ! -f $SCRIPT ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
# Determine if this file should be skipped by suffix:
|
|
|
|
SKIP=false
|
|
|
|
for SUFFIX in $IGNORE_SUFFIXES ; do
|
|
|
|
if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
|
|
|
|
SKIP=true
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ "$SKIP" = "true" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
# If we've made it this far, then run the script if it's executable:
|
|
|
|
if [ -x $SCRIPT ]; then
|
|
|
|
$SCRIPT || echo "$SCRIPT failed."
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
EOF
|
2014-09-18 12:56:07 +08:00
|
|
|
|
2014-09-10 11:55:46 +08:00
|
|
|
chmod -v 755 /usr/bin/run-parts</userinput></screen>
|
2014-08-28 22:44:20 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
|
href="../../xincludes/static-libraries.xml"/>
|
|
|
|
|
2014-09-18 12:56:07 +08:00
|
|
|
<para><command>mkdir -pv /etc/libpaper.d</command>:
|
2014-09-01 07:10:20 +08:00
|
|
|
<application>libpaper</application> expects that packages will install files
|
|
|
|
into this directory.</para>
|
|
|
|
|
2014-09-04 01:41:32 +08:00
|
|
|
<para><command>cat > /usr/bin/run-parts << "EOF"</command> :
|
|
|
|
<filename>paperconfig</filename> is a script which will invoke
|
|
|
|
<command>run-parts</command> if
|
|
|
|
<filename class="directory">/etc/libpaper.d</filename> exists. No other BLFS
|
|
|
|
package installs this, so we create it here.</para>
|
|
|
|
|
2014-09-01 07:10:20 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="configuration">
|
|
|
|
<title>Configuring libpaper</title>
|
|
|
|
|
|
|
|
<sect3>
|
|
|
|
<title>Configuration Information</title>
|
|
|
|
|
|
|
|
<para>Create <filename>/etc/papersize</filename> to set the default
|
|
|
|
system paper size. Issue the following command as the
|
|
|
|
<systemitem class="username">root</systemitem> user to set this to
|
2014-09-04 01:41:32 +08:00
|
|
|
'A4' (libpaper prefers the lowercase form). You may wish
|
2014-09-01 07:10:20 +08:00
|
|
|
to use a different size, such as letter.</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>cat > /etc/papersize << "EOF"
|
|
|
|
a4
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
2014-08-28 22:44:20 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Library</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>
|
2014-09-04 01:41:32 +08:00
|
|
|
paperconf, paperconfig, run-parts
|
2014-08-28 22:44:20 +08:00
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
libpaper.so
|
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
/etc/libpaper.d
|
|
|
|
</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="paperconf">
|
|
|
|
<term><command>paperconf</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>print paper configuration information.</para>
|
|
|
|
<indexterm zone="libpaper paperconf">
|
|
|
|
<primary sortas="b-paperconf">paperconf</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="paperconfig">
|
|
|
|
<term><command>paperconfig</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>configure the system default paper size.</para>
|
|
|
|
<indexterm zone="libpaper paperconfig">
|
|
|
|
<primary sortas="b-paperconfig">paperconfig</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2014-09-04 01:41:32 +08:00
|
|
|
<varlistentry id="run-parts">
|
|
|
|
<term><command>run-parts</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>run all the scripts found in a directory.</para>
|
|
|
|
<indexterm zone="libpaper run-parts">
|
|
|
|
<primary sortas="b-run-parts">run-parts</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2014-08-28 22:44:20 +08:00
|
|
|
<varlistentry id="libpaper-lib">
|
|
|
|
<term><filename class="libraryfile">libpaper.so</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
contains functions for interrogating the paper library.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="libpaper libpaper-lib">
|
|
|
|
<primary sortas="c-libpaper">libpaper.so</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|