--- squirrelsh-1.2.5/configure 2011-08-04 23:19:35.370824646 +0200 +++ configure 2011-08-05 00:52:17.750774534 +0200 @@ -562,6 +562,10 @@ msg_invalidvalue;; esac;; + --mime-buildroot=*) + [ "$arg_value" ] || msg_invalidvalue + mime_buildroot="$arg_value";; + --with-mime=*) case "$arg_value" in no | file | gnome | kde | auto) @@ -1037,10 +1041,10 @@ mime_file="yes" - findfile "magic" "/etc" "/usr/share/file" "/usr/local/share/file" + findfile "magic" "$mime_buildroot/etc" "$mime_buildroot/usr/share/file" "$mime_buildroot/usr/local/share/file" mime_file_f1=`cat "$configure_tmp"` - findfile "mime.types" "/etc" "/usr/share/file" + findfile "mime.types" "$mime_buildroot/etc" "$mime_buildroot/usr/share/file" mime_file_f2=`cat "$configure_tmp"` fi @@ -1077,8 +1081,8 @@ mime_gnome="yes" mime_gnome_d="`$pkgconfig --variable=prefix "$mime_gnome_pkg" 2>>"$configure_log"`/share/mime-info" - mime_gnome_f1="$mime_gnome_d/$mime_type.mime" - mime_gnome_f2="$mime_gnome_d/$mime_type.keys" + mime_gnome_f1="$mime_buildroot$mime_gnome_d/$mime_type.mime" + mime_gnome_f2="$mime_buildroot$mime_gnome_d/$mime_type.keys" fi # Check if KDE desktop is installed @@ -1101,13 +1105,13 @@ mime_kde_d1=`kde-config --expandvars --install mime 2>>"$configure_log"` msg_result "$mime_kde_d1" - mime_kde_f1="$mime_kde_d1/$mime_type_full.desktop" + mime_kde_f1="$mime_buildroot$mime_kde_d1/$mime_type_full.desktop" msg_checkingfor "KDE configuration directory" mime_kde_d2="`kde-config --expandvars --install config 2>>"$configure_log"`/magic" msg_result "$mime_kde_d2" - mime_kde_f2="$mime_kde_d2/$mime_type.magic" + mime_kde_f2="$mime_buildroot$mime_kde_d2/$mime_type.magic" fi # Disable MIME completely if no supported packages were found @@ -1124,7 +1128,7 @@ in_CFLAGS="-c $c_compiler_flags" in_CXXFLAGS="-c $cpp_compiler_flags" in_LFLAGS="$linker_flags" -in_INSTALL_EXE="$installer -c -m 0755 \"\$(target)\" \"$bindir/\$(target_name)\"" +in_INSTALL_EXE="$installer -c -m 0755 \"\$(target)\" \"\$(DESTDIR)$bindir/\$(target_name)\"" if [ "$with_pcre" = "local" ] || [ "$with_squirrel" = "local" ]; then in_LFLAGS="-L\"$source_dir/lib\"" @@ -1239,8 +1243,8 @@ # ... and other :) if [ "$with_symlink" = "yes" ] && [ "$bindir" != "/usr/bin" ] && [ "$bindir" != "/usr/bin/" ]; then - in_INSTALL_SYMLINK='ln -s "@BINDIR@/$(target_name)" "/usr/bin/$(target_name)"' - in_UNINSTALL_SYMLINK='rm -f "/usr/bin/$(target_name)"' + in_INSTALL_SYMLINK='ln -s "@BINDIR@/$(target_name)" "\$(DESTDIR)/usr/bin/$(target_name)"' + in_UNINSTALL_SYMLINK='rm -f "\$(DESTDIR)/usr/bin/$(target_name)"' else in_INSTALL_SYMLINK='@true Symbolic link is not installed' in_UNINSTALL_SYMLINK='@true Symbolic link is not installed' @@ -1299,10 +1303,10 @@ s#@RMDIR@#rm -rf# s#@UNINSTALL_SYMLINK@#$in_UNINSTALL_SYMLINK# s#@UNINSTALL_MIME@#$in_UNINSTALL_MIME# -s#@BINDIR@#$bindir# -s#@LIBDIR@#$libdir# -s#@DOCDIR@#$datadir/doc/squirrelsh# -s#@MANDIR@#$mandir/man1# +s#@BINDIR@#\$(DESTDIR)$bindir# +s#@LIBDIR@#\$(DESTDIR)$libdir# +s#@DOCDIR@#\$(DESTDIR)$datadir/doc/squirrelsh# +s#@MANDIR@#\$(DESTDIR)$mandir/man1# s#@FILE_MAGIC@#$mime_file_f1# s#@FILE_TYPES@#$mime_file_f2# s#@GNOME_DIR@#$mime_gnome_d#