Blame README.packaging

Packit 2a9478
========================================================================
Packit 2a9478
libgphoto2 README.packaging
Packit 2a9478
========================================================================
Packit 2a9478
Packit 2a9478
This file describes a number of things you should know when building
Packit 2a9478
packages (.debs, .rpms, ports, emerges, etc. pp.)
Packit 2a9478
Packit 2a9478
Packit 2a9478
========================================================================
Packit 2a9478
libgphoto2 and libgphoto2_port
Packit 2a9478
==============================
Packit 2a9478
Packit 2a9478
The libgphoto2 library builds on the libgphoto2_port library, which is
Packit 2a9478
thus internally contained within every libgphoto2 release. By
Packit 2a9478
installing libgphoto2, you always also install libgphoto2_port.
Packit 2a9478
Packit 2a9478
Packit 2a9478
========================================================================
Packit 2a9478
Installed files
Packit 2a9478
===============
Packit 2a9478
Packit 2a9478
A standard install of libgphoto2 does about this:
Packit 2a9478
Packit 2a9478
   * The most important files:
Packit 2a9478
     * ${libdir}/libgphoto2.{a,la,so}
Packit 2a9478
     * ${libdir}/libgphoto2/<VERSION>/*.{a,la,so}        (camlibs)
Packit 2a9478
     * ${libdir}/libgphoto2_port.{a,la,so}
Packit 2a9478
     * ${libdir}/libgphoto2_port/<VERSION>/*.{a,la,so}   (iolibs)
Packit 2a9478
     In most cases, you can remove the *.a and *.la files from the
Packit 2a9478
     list of files to ship.
Packit 2a9478
   * Packaging helpers:
Packit 2a9478
     * ${utilsdir}/libgphoto2/print-camera-list
Packit 2a9478
     * ${utilsdir}/libgphoto2/print-usb-usermap (linux-hotplug, obsolete)
Packit 2a9478
     * ${udevscriptdir}/check-mtp-device
Packit 2a9478
     * ${udevscriptdir}/check-ptp-camera
Packit 2a9478
     Defaults: utilsdir=${libdir}, ${udevscriptdir}=${libdir}/udev.
Packit 2a9478
     You probably want to ./configure udevscriptdir=/lib/udev and possibly
Packit 2a9478
     utilsdir='${libexecdir}', depending on your system.
Packit 2a9478
   * Documentation:
Packit 2a9478
     * Man pages:
Packit 2a9478
       * ${mandir}/man3/libgphoto2.3
Packit 2a9478
       * ${mandir}/man3/libgphoto2_port.3
Packit 2a9478
     * ${docdir}/camlibs/README.*    (camlib docs)
Packit 2a9478
     * ${docdir}/{README,AUTHORS,NEWS}
Packit 2a9478
     * ${docdir}/apidocs.html/       API docs
Packit 2a9478
     * ${docdir}/{README,AUTHORS,NEWS}
Packit 2a9478
     You may want to install these files into your custom locations.
Packit 2a9478
     If you separate library from libfoo-devel packages, the former
Packit 2a9478
     should probably ship with the camlib docs, and the general README
Packit 2a9478
     and NEWS. Try configure --with-docdir=.
Packit 2a9478
   * Translated strings:
Packit 2a9478
     * ${datadir}/locale/*/LC_MESSAGES/libgphoto2-2.mo
Packit 2a9478
     * ${datadir}/locale/*/LC_MESSAGES/libgphoto2_port-0.mo
Packit 2a9478
     * ${datadir}/libgphoto2/<VERSION>/konica/*
Packit 2a9478
       These files are required for the konica camlib to work at all.
Packit 2a9478
   * For developers:
Packit 2a9478
     * ${includedir}/gphoto2/gphoto2*.h
Packit 2a9478
     * ${libdir}/pkgconfig/libgphoto2.pc
Packit 2a9478
     * ${libdir}/pkgconfig/libgphoto2_port.pc
Packit 2a9478
Packit 2a9478
Note that utilsdir, udevscriptdir, etc. can be set at configure
Packit 2a9478
time. See "configure --help".
Packit 2a9478
Packit 2a9478
Packit 2a9478
========================================================================
Packit 2a9478
Permission setup
Packit 2a9478
================
Packit 2a9478
Packit 2a9478
We consider it a bug in the package if the package does not offer a
Packit 2a9478
way for the user to just plug in his camera and use it. This may at
Packit 2a9478
most require adding the user to a "camera" or "plugdev" group.
Packit 2a9478
Packit 2a9478
You will want to create HAL or UDEV rules by running this utility:
Packit 2a9478
Packit 2a9478
   * print-camera-list
Packit 2a9478
Packit 2a9478
This utility requires libgphoto2 and its camlibs being installed,
Packit 2a9478
either
Packit 2a9478
Packit 2a9478
   * at package building time by doing a DESTDIR based temporary
Packit 2a9478
     install somewhere and setting LD_LIBRARY_PATH and CAMLIBS before
Packit 2a9478
     running print-camera-list
Packit 2a9478
   * at package installation time as a post installation hook
Packit 2a9478
Packit 2a9478
The UDEV rules require two helper scripts/binaries, which obviously
Packit 2a9478
need to be installed by the package:
Packit 2a9478
Packit 2a9478
   * check-mtp-device (not working yet)
Packit 2a9478
   * check-ptp-camera
Packit 2a9478
Packit 2a9478
You can either use fixed permissions in the generated rules, or call
Packit 2a9478
your own permission setup script to dynamically decide what to do.
Packit 2a9478
Packit 2a9478
(Contemporary example scripts are not being shipped yet.)
Packit 2a9478
Packit 2a9478
Packit 2a9478
========================================================================
Packit 2a9478
Development packages
Packit 2a9478
====================
Packit 2a9478
Packit 2a9478
The recommended way to use libgphoto2 in a build process is to use
Packit 2a9478
pkg-config and thus these files really should be shipped in a package:
Packit 2a9478
Packit 2a9478
   * /usr/lib/pkgconfig/libgphoto2.pc
Packit 2a9478
   * /usr/lib/pkgconfig/libgphoto2_port.pc
Packit 2a9478
Packit 2a9478
We are still shipping
Packit 2a9478
Packit 2a9478
   * /usr/bin/gphoto2-config
Packit 2a9478
   * /usr/bin/gphoto2-port-config
Packit 2a9478
Packit 2a9478
for compatibility reasons, but that will obviously break when you have
Packit 2a9478
a /usr/lib64 vs. /usr/lib conflict. That problem is one the packager
Packit 2a9478
will have to resolve - we consider this mechanism obsolete.
Packit 2a9478
Packit 2a9478
Packit 2a9478
========================================================================
Packit 2a9478
End of file.
Packit 2a9478
========================================================================