- puts "Created package #{@current_package_fullname}"
- rescue Exception => e
- raise RuntimeError, "Could not build package - #{e}"
+ if data[:plugindependency]
+ dependencies << "#{data[:plugindependency][:name]} (= ${binary:Version})"
+ end
+
+ dependencies.join(', ')
+ end
+
+ # Creates an install file for each of the packages that are going to be created
+ # for the plugin
+ def create_install_file(type, data)
+ install_file = "#{@package_name}-#{type}"
+ begin
+ install_file = File.join(@build_dir, 'debian', "#{install_file}.install")
+ File.open(install_file, 'w') do |file|
+ data[:files].each do |f|
+ extended_filename = File.join(@libdir, File.expand_path(f).gsub(/^#{@plugin.target_path}/, ''))
+ file.puts "#{extended_filename} #{File.dirname(extended_filename)}"
+ end
+ end
+ rescue Errno::EACCES => e
+ puts "Could not create install file '#{install_file}'. Permission denied"
+ raise e
+ rescue => e
+ puts "Could not create install file '#{install_file}'."
+ raise e