#!/bin/sh [ -z $PREPKG ] && exit 1 PACKAGE=libgphoto2 VERSION=2.4.2 FILES=$(cd $(dirname $0) ; pwd) mkdir -p \ $PREPKG/{install,etc/udev/rules.d,usr/share/hal/fdi/information/20thirdparty}/ chmod -R \ go-w . chown -R \ root:root . CFLAGS="-O2 -march=i486 -mtune=i686" \ ./configure \ --prefix=/usr \ --mandir=/usr/man \ --with-doc-dir=/usr/doc/$PACKAGE-$VERSION \ --build=i486-slackware-linux &> configure.output || exit 1 make $MAKEJOBS &> make.output || exit 1 # Make sure udev helper scripts are put in the right place & install the # other utilities to /usr/bin/ instead of /usr/lib/libgphoto2/ make DESTDIR=$PREPKG udevscriptdir=/lib/udev utilsdir=/usr/bin install \ &> make_install.output || exit 1 # tidy up (we don't need these) rm -rf \ $PREPKG/usr/doc/$PACKAGE-$VERSION/{README.apidocs,apidocs.html,camlibs,linux-hotplug} cp -p \ ABOUT-NLS ChangeLog HACKING INSTALL MAINTAINERS TESTERS \ $PREPKG/usr/doc/$PACKAGE-$VERSION/ gzip -r9 \ $PREPKG/usr/man/ # Generate udev rules & hal device information files # First, we'll have to set (and export) some important variables export LD_LIBRARY_PATH=/$PREPKG/usr/lib/ export CAMLIBS=$PREPKG/usr/lib/$PACKAGE/$VERSION/ export LIBDIR=$PREPKG/usr/lib/ $PREPKG/usr/bin/print-camera-list \ udev-rules mode 0660 owner root group plugdev \ > $PREPKG/etc/udev/rules.d/90-libgphoto2.rules $PREPKG/usr/bin/print-camera-list \ hal-fdi \ > $PREPKG/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi $PREPKG/usr/bin/print-camera-list \ hal-fdi-device \ > $PREPKG/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2-device.fdi unset LD_LIBRARY_PATH CAMLIBS LIBDIR cp \ $FILES/slack-desc \ $PREPKG/install/ find $PREPKG -exec file {} \; \ | awk -F : '/ ELF / {print $1}' \ | xargs strip -p --strip-unneeded