core/libgphoto2-nolimit/PKGBUILD

50 lines
1.7 KiB
Bash

#
# Platform Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas@chakra-project.org
pkgname=libgphoto2-nolimit
oldpkgname=libgphoto2
pkgver=2.4.14
pkgrel=2
pkgdesc="The core library of gphoto2. This variation is only to increase the limit of files !"
arch=(i686 x86_64)
url="http://www.gphoto.org"
license=(LGPL)
conflicts=('libgphoto2')
provides=(libgphoto2=${pkgver})
depends=('libexif>=0.6.19' 'libjpeg>=8' 'gd' 'libtool>=2.4' 'libusb')
install=libgphoto2.install
options=('libtool')
source=(http://downloads.sourceforge.net/gphoto/${oldpkgname}-${pkgver}.tar.bz2)
md5sums=('c7fc6cafa6343f2457976dbe9f2d9d68')
build() {
cd "${srcdir}/${oldpkgname}-${pkgver}"
#Change the limit which cause "Fixed limit exceeded"
sed -i "s#MAX_ENTRIES 1024#MAX_ENTRIES 8192#" libgphoto2/gphoto2-list.c
./configure --prefix=/usr --with-drivers=all --disable-rpath
LD_PRELOAD="" make
make DESTDIR="${pkgdir}" install
rm -f ${pkgdir}/usr/lib/libgphoto2/${pkgver}/*.a
install -m755 -d "${pkgdir}/usr/share/hal/fdi/information/20thirdparty"
install -m755 -d "${pkgdir}/usr/lib/udev/rules.d"
LD_LIBRARY_PATH="${pkgdir}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
CAMLIBS="${pkgdir}/usr/lib/libgphoto2/${pkgver}" \
"${pkgdir}/usr/lib/libgphoto2/print-camera-list" hal-fdi > \
"${pkgdir}/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
LD_LIBRARY_PATH="${pkgdir}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
CAMLIBS="${pkgdir}/usr/lib/libgphoto2/${pkgver}" \
"${pkgdir}/usr/lib/libgphoto2/print-camera-list" udev-rules version 175 > \
"${pkgdir}/usr/lib/udev/rules.d/54-gphoto.rules"
# Remove recursive symlink
rm -f "${pkgdir}/usr/include/gphoto2/gphoto2"
}