Lines 11-26
Link Here
|
11 |
LICENSE="GPL-2" |
11 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
12 |
SLOT="0" |
13 |
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
13 |
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
14 |
IUSE="nls doc exif nousb" |
14 |
IUSE="nls doc exif usb hal" |
15 |
|
15 |
|
16 |
# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb* |
16 |
# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb* |
17 |
# conflicts with dev-libs/libusb |
17 |
# conflicts with dev-libs/libusb |
18 |
RDEPEND="!nousb? ( |
18 |
RDEPEND="usb? ( |
19 |
>=dev-libs/libusb-0.1.8 |
19 |
>=dev-libs/libusb-0.1.8 |
20 |
>=sys-apps/usbutils-0.11-r2 |
20 |
>=sys-apps/usbutils-0.11-r2 |
21 |
kernel_linux? ( sys-apps/hotplug ) |
21 |
kernel_linux? ( sys-apps/hotplug ) |
22 |
) |
22 |
) |
23 |
exif? ( >=media-libs/libexif-0.5.9 )" |
23 |
exif? ( >=media-libs/libexif-0.5.9 )" |
|
|
24 |
# hal? ( >=sys-apps/hal-O.5 )" |
24 |
DEPEND="${RDEPEND} |
25 |
DEPEND="${RDEPEND} |
25 |
dev-util/pkgconfig |
26 |
dev-util/pkgconfig |
26 |
doc? ( dev-util/gtk-doc )" |
27 |
doc? ( dev-util/gtk-doc )" |
Lines 81-91
Link Here
|
81 |
${myconf} || die "econf failed" |
82 |
${myconf} || die "econf failed" |
82 |
|
83 |
|
83 |
# or the documentation fails. |
84 |
# or the documentation fails. |
84 |
emake -j1 || die "make failed" |
85 |
emake || die "make failed" |
85 |
} |
86 |
} |
86 |
|
87 |
|
87 |
src_install() { |
88 |
src_install() { |
88 |
if use !nousb && use kernel_linux; then |
89 |
if use usb && use kernel_linux; then |
89 |
make DESTDIR=${D} \ |
90 |
make DESTDIR=${D} \ |
90 |
gphotodocdir=/usr/share/doc/${PF} \ |
91 |
gphotodocdir=/usr/share/doc/${PF} \ |
91 |
HTML_DIR=/usr/share/doc/${PF}/sgml \ |
92 |
HTML_DIR=/usr/share/doc/${PF}/sgml \ |
Lines 110-116
Link Here
|
110 |
dodoc ChangeLog NEWS* README AUTHORS TESTERS MAINTAINERS HACKING CHANGES |
111 |
dodoc ChangeLog NEWS* README AUTHORS TESTERS MAINTAINERS HACKING CHANGES |
111 |
|
112 |
|
112 |
# install hotplug support |
113 |
# install hotplug support |
113 |
if use !nousb && use kernel_linux; then |
114 |
if use usb && use kernel_linux; then |
114 |
insinto /etc/hotplug/usb |
115 |
insinto /etc/hotplug/usb |
115 |
newins ${S}/packaging/linux-hotplug/usbcam.group usbcam |
116 |
newins ${S}/packaging/linux-hotplug/usbcam.group usbcam |
116 |
chmod +x ${D}/etc/hotplug/usb/usbcam |
117 |
chmod +x ${D}/etc/hotplug/usb/usbcam |
Lines 118-136
Link Here
|
118 |
} |
119 |
} |
119 |
|
120 |
|
120 |
pkg_postinst() { |
121 |
pkg_postinst() { |
121 |
if use !nousb && use kernel_linux; then |
122 |
if [[ -x ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list ]]; then |
122 |
einfo "Generating usbcam-gphoto2.usermap .." |
|
|
123 |
HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap" |
123 |
HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap" |
124 |
if [[ -x ${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap ]]; then |
124 |
HAL_FDI="/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2.fdi" |
|
|
125 |
|
126 |
if use usb && use kernel_linux; then |
127 |
einfo "Generating usbcam-gphoto2.usermap ..." |
125 |
echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${ROOT}/${HOTPLUG_USERMAP} |
128 |
echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${ROOT}/${HOTPLUG_USERMAP} |
126 |
echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${ROOT}/${HOTPLUG_USERMAP} |
129 |
echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${ROOT}/${HOTPLUG_USERMAP} |
127 |
${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap >> ${ROOT}/${HOTPLUG_USERMAP} |
130 |
${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list usb-user-map >> ${ROOT}/${HOTPLUG_USERMAP} |
128 |
else |
131 |
|
129 |
eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap" |
|
|
130 |
eerror "and therefore unable to generate hotplug usermap." |
131 |
eerror "You will have to manually generate it by running:" |
132 |
eerror " /usr/$(get_libdir)/libgphoto2/print-usb-usermap > ${HOTPLUG_USERMAP}" |
133 |
fi |
132 |
fi |
|
|
133 |
|
134 |
if use hal; then |
135 |
einfo "Generating HAL FDI files ..." |
136 |
${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list hal-fdi >> ${ROOT}/${HAL_FDI} |
137 |
fi |
138 |
else |
139 |
eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list" |
140 |
eerror "and therefore unable to generate hotplug usermap or HAL FDI files." |
141 |
eerror "You will have to manually generate it by running:" |
142 |
eerror " /usr/$(get_libdir)/libgphoto2/print-camera-list usb-usermap > ${HOTPLUG_USERMAP}" |
143 |
eerror " /usr/$(get_libdir)/libgphoto2/print-camera-list hal-fdi > ${HAL_FDI}" |
134 |
fi |
144 |
fi |
135 |
|
145 |
|
136 |
einfo "Don't forget to add yourself to the plugdev group " |
146 |
einfo "Don't forget to add yourself to the plugdev group " |