libgphoto2: fixed cross build if -udev-rules subpkg is not available.

This commit is contained in:
Juan RP 2014-11-20 16:46:32 +01:00
parent 0df77f8bf7
commit 179a863d87

View file

@ -14,6 +14,10 @@ homepage="http://www.gphoto.org"
distfiles="${SOURCEFORGE_SITE}/gphoto/$pkgname-$version.tar.bz2"
checksum=59b32d45252f67d066cc3bda7a59f8078e0cf4e7f23590a4b621633e81060292
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" libgphoto2"
fi
pre_configure() {
autoreconf -fi
}
@ -25,28 +29,25 @@ post_install() {
# Remove recursive symlink
rm -f ${DESTDIR}/usr/include/gphoto2/gphoto2
if [ "$CROSS_BUILD" ]; then
return 0
fi
vmkdir usr/lib/udev/rules.d
LD_LIBRARY_PATH="${DESTDIR}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
CAMLIBS="${DESTDIR}/usr/lib/libgphoto2/${version}" \
"${DESTDIR}/usr/lib/libgphoto2/print-camera-list" udev-rules version 136 > \
"${DESTDIR}/usr/lib/udev/rules.d/40-gphoto.rules"
if [ -z "$CROSS_BUILD" ]; then
LD_LIBRARY_PATH="${DESTDIR}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
CAMLIBS="${DESTDIR}/usr/lib/libgphoto2/${version}" \
${DESTDIR}/usr/lib/libgphoto2/print-camera-list udev-rules version 136 > \
${DESTDIR}/usr/lib/udev/rules.d/40-gphoto.rules
else
/usr/lib/libgphoto2/print-camera-list udev-rules version 136 > \
${DESTDIR}/usr/lib/udev/rules.d/40-gphoto.rules
fi
}
if [ -z "$CROSS_BUILD" ]; then
libgphoto2-udev-rules_package() {
replaces="libgphoto2<2.4.14_8"
short_desc+=" - udev rules"
noarch=yes
pkg_install() {
vmove usr/lib/udev/rules.d
}
libgphoto2-udev-rules_package() {
short_desc+=" - udev rules"
noarch=yes
pkg_install() {
vmove usr/lib/udev/rules.d
}
fi # CROSS_BUILD
}
libgphoto2-devel_package() {
depends="libexif-devel libusb-compat-devel libgphoto2>=${version}_${revision}"
short_desc+=" - development files"