# 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/mozilla-nspr.pc $INSTALL_ROOT/usr/lib/pkgconfig/ &&
# setup pkg-config file to have the correct version number
sedit  "s/VERSION/$VERSION/"  $INSTALL_ROOT/usr/lib/pkgconfig/mozilla-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/{} ';'
#install -d --mode=755                           $INSTALL_ROOT/usr/include/nspr           &&
#install    --mode=644 include/nspr/*.h          $INSTALL_ROOT/usr/include/nspr/          &&
#install -d --mode=755                           $INSTALL_ROOT/usr/include/nspr/obsolete  &&
#install    --mode=644 include/nspr/obsolete/*.h $INSTALL_ROOT/usr/include/nspr/obsolete/
