Description: Point to Javascript files at /usr/share
 This patch is Debian-specific.
Author: Antonio Terceiro <terceiro@debian.org>

--- a/lib/uglifier.rb
+++ b/lib/uglifier.rb
@@ -62,12 +62,19 @@ class Uglifier
     }
   JS
 
+  def self.find_asset(filename)
+    [
+          File.expand_path("../" + filename, __FILE__),
+          File.join("/usr/share/javascript/ruby-uglifier", filename)
+    ].find { |f| File.exists?(f) }
+  end
+
   # UglifyJS source patch
-  SourcePath = File.expand_path("../uglify.js", __FILE__)
+  SourcePath = find_asset("uglify.js")
   # ES5 shims source path
-  ES5FallbackPath = File.expand_path("../es5.js", __FILE__)
+  ES5FallbackPath = find_asset("es5.js")
   # String.split shim source path
-  SplitFallbackPath = File.expand_path("../split.js", __FILE__)
+  SplitFallbackPath = find_asset("split.js")
 
   # Default options for compilation
   DEFAULTS = {
