# during this command files go into ./dist directory
make install &&

# NSS configuration info
install --mode=755 config/nspr-config                $INSTALL_ROOT/usr/bin            &&
install --mode=644 $SCRIPT_DIRECTORY/nspr.pc $INSTALL_ROOT/usr/lib/pkgconfig/ &&
# setup pkg-config file to have the correct version number
sedit  "s/VERSION/$(config/nspr-config --version)/"  $INSTALL_ROOT/usr/lib/pkgconfig/nspr.pc  &&

# manually do the real install, keeping in mind that most of these files are symlinks
cd dist &&
install --mode=755 lib/*.so $INSTALL_ROOT/usr/lib/ &&
install --mode=644 lib/*.a  $INSTALL_ROOT/usr/lib/ &&
cd include/nspr &&
find -name '*.h' -exec install -D --mode=644 {} $INSTALL_ROOT/usr/include/nspr/{} ';'
