Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (51 sloc) 1.779 kb
Summary: <%= @plugin.metadata[:description] %>
Name: <%= @current_package_name%>
Version: <%= @plugin.metadata[:version] %>
Release: <%= @plugin.iteration %>
License: <%= @plugin.metadata[:license] %>
URL: <%= @plugin.metadata[:url] %>
Vendor: <%= @plugin.vendor %>
Packager: <%= @plugin.metadata[:author] %>
BuildRoot: %buildroot
BuildArch: noarch
Group: System Tools
Source0: <%= "#{@current_package_name}-#{@plugin.metadata[:version]}.tgz" %>
<% @current_package_data[:dependencies].each do |dep|-%>
Requires: <%= dep.is_a?(Array) ? "%s = %s" % [dep[0], dep[1]] : dep%>
<% end -%>
%description
<%= @plugin.metadata[:description] %>
%prep
%setup
%build
%install
<% @dirs = [] -%>
<% @package_files = [] -%>
<% @current_package_data[:files].each do |file| -%>
<% @dirs << File.dirname(File.join(@libdir, File.expand_path(file).gsub(/#{File.expand_path(plugin.path)}|\.\//, ''))) -%>
<% @package_files << File.join(@libdir, File.expand_path(file).gsub(/#{File.expand_path(plugin.path)}|\.\//, '')) -%>
<% end -%>
rm -rf %{buildroot}
<% @dirs.uniq.each do |dir| -%>
%{__install} -d -m0755 %{buildroot}<%= dir%>
<% end -%>
<% @package_files -= @dirs %>
<% @package_files.each do |package_file| -%>
%{__install} -m0644 <%= (package_file[0].chr == '/') ? package_file[1..package_file.size-1]: package_file%> %{buildroot}<%=package_file %>
<% end -%>
%files
%defattr(-,root,root,-)
<% @package_files.each do |file| -%>
<%= file %>
<% end -%>
<% if @plugin.preinstall -%>
%pre
<%= @plugin.preinstall %>
<% end -%>
<% if @plugin.postinstall -%>
%post
<%= @plugin.postinstall%>
<% end -%>
%changelog
* <%= Time.now.strftime("%a %b %d %Y") -%> <%= @plugin.metadata[:author]%> - <%= @plugin.metadata[:version]%>-<%= @plugin.iteration%>
- Built Package <%= @current_package_name-%>
Jump to Line
Something went wrong with that request. Please try again.