diff --git a/srcpkgs/libgphoto2-udev-rules b/srcpkgs/libgphoto2-udev-rules new file mode 120000 index 0000000000..fa1dd611bd --- /dev/null +++ b/srcpkgs/libgphoto2-udev-rules @@ -0,0 +1 @@ +libgphoto2 \ No newline at end of file diff --git a/srcpkgs/libgphoto2/template b/srcpkgs/libgphoto2/template index 3be4aad4a5..29ef725963 100644 --- a/srcpkgs/libgphoto2/template +++ b/srcpkgs/libgphoto2/template @@ -1,11 +1,12 @@ # Template file for 'libgphoto2' pkgname=libgphoto2 version=2.4.14 -revision=7 +revision=8 build_style=gnu-configure configure_args="--disable-static --disable-rpath udevscriptdir=/usr/lib/udev" -hostmakedepends="pkg-config" +hostmakedepends="automake libtool pkg-config gettext-devel" makedepends="libltdl-devel libusb-compat-devel libjpeg-turbo-devel gd-devel>=2.1.0 libexif-devel" +depends="${pkgname}-udev-rules-${version}_${revision}" short_desc="Digital camera access library" maintainer="Juan RP " license="GPL-2" @@ -13,22 +14,41 @@ homepage="http://www.gphoto.org" distfiles="${SOURCEFORGE_SITE}/gphoto/$pkgname-$version.tar.bz2" checksum=59b32d45252f67d066cc3bda7a59f8078e0cf4e7f23590a4b621633e81060292 +pre_configure() { + autoreconf -fi +} + post_install() { # Remove unused udev helper rm -rf ${DESTDIR}/usr/lib/udev + # 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" - - # Remove recursive symlink - rm -f ${DESTDIR}/usr/include/gphoto2/gphoto2 } +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 + } + } +fi # CROSS_BUILD + libgphoto2-devel_package() { - depends="libexif-devel libusb-compat-devel libgphoto2>=${version}" + depends="libexif-devel libusb-compat-devel libgphoto2>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/bin