1#!/bin/sh 2 3INSTALL=install 4INCLUDEINSTALLDIR=/usr/local/include/cabinet 5BININSTALLDIR=/usr/local/bin 6LIBINSTALLDIR=/usr/local/lib 7LIBRARY_NAME=cabinet 8PROGRAM_NAME=listcab 9LIBRARY_HEADERS_DIR=dist-include 10LIBRARY_HEADERS="bstring.h cfcreate.h cfdblock.h cffdrmgr.h cffile.h cffolder.h cfheader.h cfreader.h cftypes.h darray.h dos_comp.h object.hpp queue.hpp zconf.h zlib.h" 11 12libtool --mode=install ${INSTALL} -c -s lib${LIBRARY_NAME}.la ${LIBINSTALLDIR}/lib${LIBRARY_NAME}.la 13libtool --mode=install ${INSTALL} -c -s ${PROGRAM_NAME} ${BININSTALLDIR}/${PROGRAM_NAME} 14libtool -n --finish ${LIBINSTALLDIR} 15 16echo -n "Installing cabinet header files..." 17 18if [ ! -d ${INCLUDEINSTALLDIR} ]; then 19 mkdir -p ${INCLUDEINSTALLDIR} 20fi 21 22for file in ${LIBRARY_HEADERS} 23do 24 ${INSTALL} -c ${LIBRARY_HEADERS_DIR}/${file} ${INCLUDEINSTALLDIR}/${file} 25done 26 27echo "done" 28 29echo -n "Running ldconfig..." 30ldconfig 31echo "done" 32 33exit 0 34