# autorpmspec

> Auto-Generate RPM Spec

Latest version **1.1.7** (published 2017-07-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install autorpmspec
pnpm add autorpmspec
yarn add autorpmspec
bun add autorpmspec
```

Provides the command `autorpmspec`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2017-07-20 |
| First published | 2017-06-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | J. M. Becker |
| Maintainers | techzilla |
| Keywords | rpm, spec, rpmspec, generate |

## Links

- npm: https://www.npmjs.com/package/autorpmspec
- Repository: https://github.com/techzilla/autorpmspec
- Homepage: https://github.com/techzilla/autorpmspec#readme
- Issues: https://github.com/techzilla/autorpmspec/issues
- npm.io page: https://npm.io/package/autorpmspec

## Dependencies (5)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [tar-fs](https://npm.io/package/tar-fs.md) ^1.15.0
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.6
- [mixin-deep](https://npm.io/package/mixin-deep.md) ^1.1.3

## Recent versions

- 1.1.7 (latest) — 2017-07-20
- 1.1.6 — 2017-07-20
- 1.1.5 — 2017-07-20
- 1.1.4 — 2017-07-20
- 1.1.3 — 2017-07-20
- 1.1.2 — 2017-07-20
- 1.1.1 — 2017-06-15

## README

# autorpmspec

Generate an RPM Spec from a NodeJS package

## Installation

```
npm install --save autorpmspec
```

## Features

* Generates an RPM Spec
* Creates a [systemd](https://www.freedesktop.org/wiki/Software/systemd/) service


## Usage


### `npm start` script

The systemd service file uses the `npm start` script to start your application.

```json
{
  "scripts": {
    "start": "node server.js"
  }
}
```

### Directory Structure

The following directories are used for your application:

|Directory|Purpose|
|---------|-------|
|`/var/lib/:projectName`|application|
|`/var/log/:projectName`|logs|
 the `spec` property inside your existing `package.json` file.

### Dependencies

list the package dependencies in the `requires` array:

```json
{
  "spec": {
    "requires": [
      "vim",
      "screen"
    ]
  }
}
```

```json
{
  "spec": {
    "buildRequires": [
      "python"
    ]
  }
}
```

### Executables

List files and directories that need to be executable:

```json
{
  "spec": {
    "executable": [
      "./other-scripts/my-script.js",
      "./scripts"
    ]
  }
}
```

### Scriptlet

```json
{
  "spec": {
    "pre": [
      "echo example"
    ],
    "post": [
      "echo example"
    ],
    "preun": [
      "echo example"
    ],
    "postun": [
      "echo example"
    ]
  }
}
```

### Environment variable

specify environment variables during startup:

```json
{
  "spec": {
    "environment": {
      "NODE_ENV": "production",
      "NODE_INSTANCE": "%i"
    }
  }
}
```

### Release Number

`--release` flag:

```sh
autorpmspec --release=7
```

### Custom Name

`--name` flag:

```sh
autorpmspec --name=my-cool-api
```

---
_Source: https://npm.io/package/autorpmspec · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
