system_assignation/node_modules/electron-installer-redhat/resources/spec.ejs

59 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-03-24 09:22:39 -04:00
%define _binary_payload w<%= compressionLevel %>.xzdio
Name: <%= name %>
Version: <%= version %>
Release: <%= revision %>%{?dist}
<% if (description) { print(`Summary: ${description}\n`) }
%>
<% if (license) { print(`License: ${license}\n`) }
if (homepage) { print(`URL: ${homepage}\n`) }
if (license || homepage) { print('\n') }
%>Requires: <%= requires.join(', ') %>
AutoReqProv: no
<% if (productDescription) {
%>%description
<% print(productDescription)
print('\n\n\n') }
%>%install
mkdir -p %{buildroot}/usr/
cp <%= process.platform === 'darwin' ? '-R' : '-r' %> usr/* %{buildroot}/usr/
%files
/usr/bin/<%= name %>
/usr/lib/<%= name %>/
/usr/share/applications/<%= name %>.desktop
/usr/share/doc/<%= name %>/
<% if (_.isObject(icon)) {
_.forEach(icon, function (path, resolution) {
%>/usr/share/icons/hicolor/<%= resolution %>/apps/<%= name %><%= resolution === 'symbolic' ? '-symbolic' : '' %>.<%= ['scalable', 'symbolic'].includes(resolution) ? 'svg' : 'png' %>
<% }) } else {
%>/usr/share/pixmaps/<%= name %>.png
<% } %>
<% if (pre) {
%>%pre
<% print(pre)
if (preun || post || postun) print('\n\n\n') }
%><% if (preun) {
%>%preun
<% print(preun)
if (post || postun) print('\n\n\n') }
%><% if (post) {
%>%post
<% print(post)
if (postun) print('\n\n\n') }
%><% if (postun) {
%>%postun
<% print(postun) } %>