<commit_before>import { promisify } from 'util'
import { join } from 'path'

import glob = require('glob')
const globPromise = promisify(glob)

import { rename } from 'fs-extra'

import { getVersion } from '../app/package-info'
import { getDistPath, getDistRoot } from './dist-info'

const distRoot = getDistRoot()

// best guess based on documentation
type RedhatOptions = {
  // required
  src: string
  dest: string
  arch: 'x86_64'
  // optional
  description?: string
  productDescription?: string
  categories?: Array<string>
  icon?: any
  scripts?: {
    pre?: string
    post?: string
    preun?: string
    postun?: string
  }
  homepage?: string
  mimeType?: Array<string>
  requires?: Array<string>
}

const options: RedhatOptions = {
  src: getDistPath(),
  dest: distRoot,
  arch: 'x86_64',
  description: 'Simple collaboration from your desktop',
  productDescription:
    'This is the unofficial port of GitHub Desktop for Linux distributions',
  categories: ['GNOME', 'GTK', 'Development'],
  requires: [
    // default Electron dependencies
    'libXScrnSaver',
    'libX11-xcb',
    'alsa-lib',
    // dugite-native dependencies
    '(libcurl or libcurl4)',
    // keytar dependencies
    'libsecret',
    'gnome-keyring',
  ],
  icon: {
    '256x256': 'app/static/logos/256x256.png',
    '512x512': 'app/static/logos/512x512.png',
    '1024x1024': 'app/static/logos/1024x1024.png',
  },
  scripts: {
    post: 'script/resources/rpm/post.sh',<commit_msg>add optional x11 dependency for SUSE-based distributions (#369)<commit_after>import { promisify } from 'util'
import { join } from 'path'

import glob = require('glob')
const globPromise = promisify(glob)

import { rename } from 'fs-extra'

import { getVersion } from '../app/package-info'
import { getDistPath, getDistRoot } from './dist-info'

const distRoot = getDistRoot()

// best guess based on documentation
type RedhatOptions = {
  // required
  src: string
  dest: string
  arch: 'x86_64'
  // optional
  description?: string
  productDescription?: string
  categories?: Array<string>
  icon?: any
  scripts?: {
    pre?: string
    post?: string
    preun?: string
    postun?: string
  }
  homepage?: string
  mimeType?: Array<string>
  requires?: Array<string>
}

const options: RedhatOptions = {
  src: getDistPath(),
  dest: distRoot,
  arch: 'x86_64',
  description: 'Simple collaboration from your desktop',
  productDescription:
    'This is the unofficial port of GitHub Desktop for Linux distributions',
  categories: ['GNOME', 'GTK', 'Development'],
  requires: [
    // default Electron dependencies
    'libXScrnSaver',
    '(libX11-xcb or libX11-xcb1)',
    'alsa-lib',
    // dugite-native dependencies
    '(libcurl or libcurl4)',
    // keytar dependencies
    'libsecret',
    'gnome-keyring',
  ],
  icon: {
    '256x256': 'app/static/logos/256x256.png',
    '512x512': 'app/static/logos/512x512.png',
    '1024x1024': 'app/static/logos/1024x1024.png',
  },
  scripts: {
    post: 'script/resources/rpm/post.sh',
{'fraction_non_alphanumeric': 0.13574510454696315, 'fraction_numerical': 0.036508463325589116, 'mean_word_length': 3.566666666666667, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1648252', 'n_tokens_mistral': 1076, 'n_tokens_neox': 970, 'n_words': 258}