void-packages/srcpkgs/libgphoto2/template
2016-03-27 00:20:13 +01:00

62 lines
1.8 KiB
Bash

# Template file for 'libgphoto2'
pkgname=libgphoto2
version=2.5.10
revision=1
build_style=gnu-configure
configure_args="--disable-static --disable-rpath udevscriptdir=/usr/lib/udev"
hostmakedepends="automake libtool pkg-config gettext-devel"
makedepends="libltdl-devel libusb-compat-devel libjpeg-turbo-devel gd-devel libexif-devel"
depends="${pkgname}-udev-rules-${version}_${revision}"
short_desc="Digital camera access library"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://www.gphoto.org"
distfiles="${SOURCEFORGE_SITE}/gphoto/$pkgname-$version.tar.bz2"
checksum=8d8668d432ba595c7466442aec2cf553bdf8782ec171291dbc65717c633a4ef2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" libgphoto2"
fi
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
vmkdir usr/lib/udev/rules.d
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
}
libgphoto2-udev-rules_package() {
short_desc+=" - udev rules"
noarch=yes
pkg_install() {
vmove usr/lib/udev/rules.d
}
}
libgphoto2-devel_package() {
depends="libexif-devel libusb-compat-devel libgphoto2>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/doc
vmove usr/share/man/man3
}
}