#!/bin/sh [ -z $PREPKG ] && exit 1 PACKAGE=i2c VERSION=2.10.2 FILES=$(cd $(dirname $0) ; pwd) # decision time: # Various headers were to be installed in /usr/local/include/linux/. Not # liking that (packages should avoid the /usr/local/ hierarchy) & noting # that lm_sensors uses variations on the theme of "#include ", # I chose to overwrite the headers installed from the kernel-headers package. # To the best of my knowledge, only i2c itself & lm_sensors require the # updated headers. # note: # separate builds required for SMP & UP kernels # experiment begins: UP build on SMP kernel (failed: unresolved symbols) mkdir -p $PREPKG/{install,usr/doc/$PACKAGE-$VERSION}/ chmod -R g-w . chown -R root:root . make $MAKEJOBS all &> make.output || exit 1 make DESTDIR=$PREPKG LINUX_INCLUDE_DIR=/usr/include/linux install \ &> make_install.output || exit 1 find $PREPKG/lib/modules/ -type f -name '*.o' -exec gzip -9 {} \; cp -a doc/ CHANGES COPYING INSTALL README TODO \ $PREPKG/usr/doc/$PACKAGE-$VERSION/ cp $FILES/{doinst.sh,slack-desc} $PREPKG/install/