deboa 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/classes/Deboa.js +6 -9
- package/dist/cjs/types/classes/Deboa.d.ts +46 -44
- package/dist/cjs/types/classes/DeboaFromFile.d.ts +23 -23
- package/dist/cjs/types/index.d.ts +4 -4
- package/dist/cjs/types/types/IAddTarEntriesParams.d.ts +5 -5
- package/dist/cjs/types/types/IControlFileOptions.d.ts +130 -130
- package/dist/cjs/types/types/IDeboa.d.ts +138 -133
- package/dist/cjs/types/types/IDeboaFromFile.d.ts +8 -8
- package/dist/cjs/types/types/INormalizeOptionsLength.d.ts +8 -8
- package/dist/cjs/types/types/IWriteFileFromLinesArgs.d.ts +10 -10
- package/dist/cjs/types/types/IWriteToArchive.d.ts +19 -19
- package/dist/cjs/types/types/MaintainerScript.d.ts +1 -1
- package/dist/cjs/types/types/Priority.d.ts +1 -1
- package/dist/cjs/types/types/Section.d.ts +1 -1
- package/dist/cjs/types/types/index.d.ts +10 -10
- package/dist/cjs/types/utils/addTarEntries.d.ts +5 -5
- package/dist/cjs/types/utils/changeOwnerToRoot.d.ts +6 -0
- package/dist/cjs/types/utils/createFileHeader.d.ts +2 -2
- package/dist/cjs/types/utils/writeFileFromLines.d.ts +5 -5
- package/dist/cjs/types/utils/writeToArchive.d.ts +5 -5
- package/dist/cjs/utils/changeOwnerToRoot.js +15 -0
- package/dist/esm/classes/Deboa.js +6 -9
- package/dist/esm/types/classes/Deboa.d.ts +46 -44
- package/dist/esm/types/classes/DeboaFromFile.d.ts +23 -23
- package/dist/esm/types/index.d.ts +4 -4
- package/dist/esm/types/types/IAddTarEntriesParams.d.ts +5 -5
- package/dist/esm/types/types/IControlFileOptions.d.ts +130 -130
- package/dist/esm/types/types/IDeboa.d.ts +138 -133
- package/dist/esm/types/types/IDeboaFromFile.d.ts +8 -8
- package/dist/esm/types/types/INormalizeOptionsLength.d.ts +8 -8
- package/dist/esm/types/types/IWriteFileFromLinesArgs.d.ts +10 -10
- package/dist/esm/types/types/IWriteToArchive.d.ts +19 -19
- package/dist/esm/types/types/MaintainerScript.d.ts +1 -1
- package/dist/esm/types/types/Priority.d.ts +1 -1
- package/dist/esm/types/types/Section.d.ts +1 -1
- package/dist/esm/types/types/index.d.ts +10 -10
- package/dist/esm/types/utils/addTarEntries.d.ts +5 -5
- package/dist/esm/types/utils/changeOwnerToRoot.d.ts +6 -0
- package/dist/esm/types/utils/createFileHeader.d.ts +2 -2
- package/dist/esm/types/utils/writeFileFromLines.d.ts +5 -5
- package/dist/esm/types/utils/writeToArchive.d.ts +5 -5
- package/dist/esm/utils/changeOwnerToRoot.js +10 -0
- package/package.json +11 -5
|
@@ -18,6 +18,7 @@ const _writeFileFromLines = require("../utils/writeFileFromLines");
|
|
|
18
18
|
const _deboaFromFile = require("./DeboaFromFile");
|
|
19
19
|
const _stream = require("stream");
|
|
20
20
|
const _addTarEntries = require("../utils/addTarEntries");
|
|
21
|
+
const _changeOwnerToRoot = require("../utils/changeOwnerToRoot");
|
|
21
22
|
function _interopRequireDefault(obj) {
|
|
22
23
|
return obj && obj.__esModule ? obj : {
|
|
23
24
|
default: obj
|
|
@@ -98,6 +99,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
98
99
|
/** See {@link IDeboa.sourceDir} */ sourceDir = null;
|
|
99
100
|
/** See {@link IDeboa.tarballFormat} */ tarballFormat = null;
|
|
100
101
|
/** See {@link IDeboa.targetDir} */ targetDir = null;
|
|
102
|
+
/** See {@link IDeboa.targetFileName} */ targetFileName = null;
|
|
101
103
|
#appFolderDestination = null;
|
|
102
104
|
#controlFolderDestination = null;
|
|
103
105
|
#dataFolderDestination = null;
|
|
@@ -147,7 +149,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
147
149
|
}
|
|
148
150
|
this.#tempDir = _path.default.join(_os.default.tmpdir(), 'deboa_temp');
|
|
149
151
|
const { architecture , packageName , version } = this.controlFileOptions;
|
|
150
|
-
this.#outputFile = _path.default.join(this.targetDir, `${packageName}_${version}_${architecture}.deb`);
|
|
152
|
+
this.#outputFile = _path.default.join(this.targetDir, `${options.targetFileName || `${packageName}_${version}_${architecture}`}.deb`);
|
|
151
153
|
this.#controlFolderDestination = _path.default.join(this.#tempDir, 'control');
|
|
152
154
|
this.#dataFolderDestination = _path.default.join(this.#tempDir, 'data');
|
|
153
155
|
this.#appFolderDestination = _path.default.join(this.#dataFolderDestination, ...options.installationRoot ? [
|
|
@@ -165,7 +167,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
165
167
|
console.log('Validating options...\n');
|
|
166
168
|
const { controlFileOptions: { shortDescription , maintainer , packageName , version , } , } = options;
|
|
167
169
|
if (!packageName) {
|
|
168
|
-
throw new Error('The controlFileOptions
|
|
170
|
+
throw new Error('The `controlFileOptions.packageName` field is mandatory');
|
|
169
171
|
}
|
|
170
172
|
if (!version) {
|
|
171
173
|
throw new Error('The `controlFileOptions.version` field is mandatory');
|
|
@@ -272,13 +274,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
272
274
|
const controlFileWriteStream = _fs.default.createWriteStream(controlFileLocation);
|
|
273
275
|
_tarFs.default.pack(this.#dataFolderDestination, {
|
|
274
276
|
map: (header)=>{
|
|
275
|
-
|
|
276
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
277
|
-
// @ts-ignore
|
|
278
|
-
header.gname = 'root';
|
|
279
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
280
|
-
// @ts-ignore
|
|
281
|
-
header.uname = 'root';
|
|
277
|
+
header = (0, _changeOwnerToRoot.changeOwnerToRoot)(header);
|
|
282
278
|
// sensible defaults for Windows users
|
|
283
279
|
if (process.platform === 'win32') {
|
|
284
280
|
const defaultFilePermission = parseInt('0644', 8);
|
|
@@ -314,6 +310,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
314
310
|
}).pipe(dataFileCompressor).pipe(dataFileWriteStream);
|
|
315
311
|
_tarFs.default.pack(this.#controlFolderDestination, {
|
|
316
312
|
map: (header)=>{
|
|
313
|
+
header = (0, _changeOwnerToRoot.changeOwnerToRoot)(header);
|
|
317
314
|
const maintainerScripts = [
|
|
318
315
|
'postinst',
|
|
319
316
|
'postrm',
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Some useful references:
|
|
3
|
-
*
|
|
4
|
-
* https://radagast.ca/linux/anatomy_of_a_deb_file.html
|
|
5
|
-
* https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ar.html
|
|
6
|
-
* https://www.unix.com/man-page/opensolaris/3head/ar.h/
|
|
7
|
-
*/
|
|
8
|
-
import type { IDeboa } from '../types';
|
|
9
|
-
/**
|
|
10
|
-
* @return IDeboa
|
|
11
|
-
*/
|
|
12
|
-
declare class Deboa implements IDeboa {
|
|
13
|
-
#private;
|
|
14
|
-
/** See {@link IDeboa.additionalTarEntries} */
|
|
15
|
-
additionalTarEntries: IDeboa['additionalTarEntries'];
|
|
16
|
-
/** See {@link IDeboa.beforeCreateDesktopEntry} */
|
|
17
|
-
beforeCreateDesktopEntry: IDeboa['beforeCreateDesktopEntry'];
|
|
18
|
-
/** See {@link IDeboa.beforePackage} */
|
|
19
|
-
beforePackage: IDeboa['beforePackage'];
|
|
20
|
-
/** See {@link IDeboa.controlFileOptions} */
|
|
21
|
-
controlFileOptions: IDeboa['controlFileOptions'];
|
|
22
|
-
/** See {@link IDeboa.icon} */
|
|
23
|
-
icon: IDeboa['icon'];
|
|
24
|
-
/** See {@link IDeboa.modifyTarHeader} */
|
|
25
|
-
modifyTarHeader: IDeboa['modifyTarHeader'];
|
|
26
|
-
/** See {@link IDeboa.sourceDir} */
|
|
27
|
-
sourceDir: IDeboa['sourceDir'];
|
|
28
|
-
/** See {@link IDeboa.tarballFormat} */
|
|
29
|
-
tarballFormat: IDeboa['tarballFormat'];
|
|
30
|
-
/** See {@link IDeboa.targetDir} */
|
|
31
|
-
targetDir: IDeboa['targetDir'];
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Some useful references:
|
|
3
|
+
*
|
|
4
|
+
* https://radagast.ca/linux/anatomy_of_a_deb_file.html
|
|
5
|
+
* https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ar.html
|
|
6
|
+
* https://www.unix.com/man-page/opensolaris/3head/ar.h/
|
|
7
|
+
*/
|
|
8
|
+
import type { IDeboa } from '../types';
|
|
9
|
+
/**
|
|
10
|
+
* @return IDeboa
|
|
11
|
+
*/
|
|
12
|
+
declare class Deboa implements IDeboa {
|
|
13
|
+
#private;
|
|
14
|
+
/** See {@link IDeboa.additionalTarEntries} */
|
|
15
|
+
additionalTarEntries: IDeboa['additionalTarEntries'];
|
|
16
|
+
/** See {@link IDeboa.beforeCreateDesktopEntry} */
|
|
17
|
+
beforeCreateDesktopEntry: IDeboa['beforeCreateDesktopEntry'];
|
|
18
|
+
/** See {@link IDeboa.beforePackage} */
|
|
19
|
+
beforePackage: IDeboa['beforePackage'];
|
|
20
|
+
/** See {@link IDeboa.controlFileOptions} */
|
|
21
|
+
controlFileOptions: IDeboa['controlFileOptions'];
|
|
22
|
+
/** See {@link IDeboa.icon} */
|
|
23
|
+
icon: IDeboa['icon'];
|
|
24
|
+
/** See {@link IDeboa.modifyTarHeader} */
|
|
25
|
+
modifyTarHeader: IDeboa['modifyTarHeader'];
|
|
26
|
+
/** See {@link IDeboa.sourceDir} */
|
|
27
|
+
sourceDir: IDeboa['sourceDir'];
|
|
28
|
+
/** See {@link IDeboa.tarballFormat} */
|
|
29
|
+
tarballFormat: IDeboa['tarballFormat'];
|
|
30
|
+
/** See {@link IDeboa.targetDir} */
|
|
31
|
+
targetDir: IDeboa['targetDir'];
|
|
32
|
+
/** See {@link IDeboa.targetFileName} */
|
|
33
|
+
targetFileName: IDeboa['targetFileName'];
|
|
34
|
+
constructor(options: IDeboa);
|
|
35
|
+
/**
|
|
36
|
+
* Creates the .deb file.
|
|
37
|
+
* @return {Promise<string>} outputFile - Absolute path to the generated .deb
|
|
38
|
+
*/
|
|
39
|
+
package(): Promise<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Checks if the values provided to the hook options are file paths
|
|
42
|
+
* and imports the actual functions from them if necessary.
|
|
43
|
+
*/
|
|
44
|
+
loadHooks(): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
export { Deboa };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { ReadStream } from 'fs';
|
|
3
|
-
import type { IWriteToArchive, IDeboaFromFile } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* @return IDeboaFromFile
|
|
6
|
-
*/
|
|
7
|
-
export declare class DeboaFromFile implements IDeboaFromFile {
|
|
8
|
-
#private;
|
|
9
|
-
isARFile: IDeboaFromFile['isARFile'];
|
|
10
|
-
outputFile: IDeboaFromFile['outputFile'];
|
|
11
|
-
writeStream: IWriteToArchive['writeStream'];
|
|
12
|
-
constructor(options: IDeboaFromFile);
|
|
13
|
-
/**
|
|
14
|
-
* Creates a ReadStream from the input file.
|
|
15
|
-
* Useful if you need access to the underlying stream.
|
|
16
|
-
*/
|
|
17
|
-
createReadStream(inputFile: string): Promise<ReadStream>;
|
|
18
|
-
writeFromStream(readStream: ReadStream): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Writes the input file to the .deb.
|
|
21
|
-
*/
|
|
22
|
-
writeFromFile(inputFile: string): Promise<void>;
|
|
23
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { ReadStream } from 'fs';
|
|
3
|
+
import type { IWriteToArchive, IDeboaFromFile } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* @return IDeboaFromFile
|
|
6
|
+
*/
|
|
7
|
+
export declare class DeboaFromFile implements IDeboaFromFile {
|
|
8
|
+
#private;
|
|
9
|
+
isARFile: IDeboaFromFile['isARFile'];
|
|
10
|
+
outputFile: IDeboaFromFile['outputFile'];
|
|
11
|
+
writeStream: IWriteToArchive['writeStream'];
|
|
12
|
+
constructor(options: IDeboaFromFile);
|
|
13
|
+
/**
|
|
14
|
+
* Creates a ReadStream from the input file.
|
|
15
|
+
* Useful if you need access to the underlying stream.
|
|
16
|
+
*/
|
|
17
|
+
createReadStream(inputFile: string): Promise<ReadStream>;
|
|
18
|
+
writeFromStream(readStream: ReadStream): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Writes the input file to the .deb.
|
|
21
|
+
*/
|
|
22
|
+
writeFromFile(inputFile: string): Promise<void>;
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Deboa } from './classes/Deboa';
|
|
2
|
-
import { DeboaFromFile } from './classes/DeboaFromFile';
|
|
3
|
-
export { Deboa, DeboaFromFile };
|
|
4
|
-
export * from './types';
|
|
1
|
+
import { Deboa } from './classes/Deboa';
|
|
2
|
+
import { DeboaFromFile } from './classes/DeboaFromFile';
|
|
3
|
+
export { Deboa, DeboaFromFile };
|
|
4
|
+
export * from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Headers as TarStreamHeader, Pack } from 'tar-stream';
|
|
2
|
-
export interface IAddTarEntriesParams {
|
|
3
|
-
entries: TarStreamHeader[];
|
|
4
|
-
pack: Pack;
|
|
5
|
-
}
|
|
1
|
+
import { Headers as TarStreamHeader, Pack } from 'tar-stream';
|
|
2
|
+
export interface IAddTarEntriesParams {
|
|
3
|
+
entries: TarStreamHeader[];
|
|
4
|
+
pack: Pack;
|
|
5
|
+
}
|
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
import { MaintainerScript } from './MaintainerScript';
|
|
2
|
-
import { Priority } from './Priority';
|
|
3
|
-
import { Section } from './Section';
|
|
4
|
-
/**
|
|
5
|
-
* The descriptions are mostly just shameless copies from the following docs:
|
|
6
|
-
*
|
|
7
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html}
|
|
8
|
-
*
|
|
9
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html}
|
|
10
|
-
*
|
|
11
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
12
|
-
*/
|
|
13
|
-
export interface IControlFileOptions {
|
|
14
|
-
/**
|
|
15
|
-
* Target architecture. Defaults to the current system's architecture.
|
|
16
|
-
*
|
|
17
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-architecture}
|
|
18
|
-
*/
|
|
19
|
-
architecture?: string;
|
|
20
|
-
/**
|
|
21
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html#s-built-using}
|
|
22
|
-
*/
|
|
23
|
-
builtUsing?: string;
|
|
24
|
-
/**
|
|
25
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
26
|
-
*/
|
|
27
|
-
conflicts?: string[];
|
|
28
|
-
/**
|
|
29
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
30
|
-
*/
|
|
31
|
-
depends?: string[];
|
|
32
|
-
/**
|
|
33
|
-
* If set to `yes`, then the package management system will refuse to
|
|
34
|
-
* remove
|
|
35
|
-
* the package (upgrading and replacing it is still possible). The other
|
|
36
|
-
* possible value is `no`, which is the same as not having the field at
|
|
37
|
-
* all.
|
|
38
|
-
*
|
|
39
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-essential}
|
|
40
|
-
*/
|
|
41
|
-
essential?: 'yes' | 'no';
|
|
42
|
-
/**
|
|
43
|
-
* Extended description for the package. Defaults to the value provided for
|
|
44
|
-
* the `shortDescription` option.
|
|
45
|
-
*
|
|
46
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-description}
|
|
47
|
-
*/
|
|
48
|
-
extendedDescription?: string;
|
|
49
|
-
/**
|
|
50
|
-
* URL for this package.
|
|
51
|
-
*
|
|
52
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-homepage}
|
|
53
|
-
*/
|
|
54
|
-
homepage?: string;
|
|
55
|
-
/**
|
|
56
|
-
* The package maintainer's name and email address. The name must come
|
|
57
|
-
* first, then the email address inside angle brackets. **This field is
|
|
58
|
-
* mandatory.**
|
|
59
|
-
*
|
|
60
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-maintainer}
|
|
61
|
-
*/
|
|
62
|
-
maintainer: string;
|
|
63
|
-
/**
|
|
64
|
-
* Path to the scripts you want to execute before/after the system
|
|
65
|
-
* installs/upgrades/removes your package. There are quite a few rules
|
|
66
|
-
* here,
|
|
67
|
-
* so please check
|
|
68
|
-
* {@link
|
|
69
|
-
* https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html} for
|
|
70
|
-
* details.
|
|
71
|
-
*/
|
|
72
|
-
maintainerScripts?: Partial<Record<MaintainerScript, string>>;
|
|
73
|
-
/**
|
|
74
|
-
* Binary package name. Must be at least two characters long and must start
|
|
75
|
-
* with an alphanumeric character. Only lower case letters (a-z), digits
|
|
76
|
-
* (0-9), plus (+) and minus (-) signs, and periods (.) are allowed. **This
|
|
77
|
-
* field is mandatory.**
|
|
78
|
-
*
|
|
79
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source}
|
|
80
|
-
*/
|
|
81
|
-
packageName: string;
|
|
82
|
-
/**
|
|
83
|
-
* See {@link
|
|
84
|
-
* https://www.debian.org/doc/debian-policy/ch-relationships.html} for
|
|
85
|
-
* details.
|
|
86
|
-
*/
|
|
87
|
-
preDepends?: string[];
|
|
88
|
-
/**
|
|
89
|
-
* This field represents how important it is that the user have the package
|
|
90
|
-
* installed. Defaults to `optional`.
|
|
91
|
-
*
|
|
92
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-priority}
|
|
93
|
-
*/
|
|
94
|
-
priority?: Priority;
|
|
95
|
-
/**
|
|
96
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
97
|
-
*/
|
|
98
|
-
recommends?: string[];
|
|
99
|
-
/**
|
|
100
|
-
* This field specifies an application area into which the package has been
|
|
101
|
-
* classified. This is a recommended field.
|
|
102
|
-
*
|
|
103
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-section}
|
|
104
|
-
*/
|
|
105
|
-
section?: Section;
|
|
106
|
-
/**
|
|
107
|
-
* Short, single-line synopsys for the package. Usually ~80 characters.
|
|
108
|
-
* **This field is mandatory.**
|
|
109
|
-
*
|
|
110
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-description}
|
|
111
|
-
*/
|
|
112
|
-
shortDescription: string;
|
|
113
|
-
/**
|
|
114
|
-
* Source package name.
|
|
115
|
-
*
|
|
116
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source}
|
|
117
|
-
*/
|
|
118
|
-
source?: string;
|
|
119
|
-
/**
|
|
120
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
121
|
-
*/
|
|
122
|
-
suggests?: string[];
|
|
123
|
-
/**
|
|
124
|
-
* Version number of the package in the
|
|
125
|
-
* `[epoch:]upstream_version[-debian_revision]` format. See
|
|
126
|
-
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-version}
|
|
127
|
-
* for details. **This field is mandatory.**
|
|
128
|
-
*/
|
|
129
|
-
version: string;
|
|
130
|
-
}
|
|
1
|
+
import { MaintainerScript } from './MaintainerScript';
|
|
2
|
+
import { Priority } from './Priority';
|
|
3
|
+
import { Section } from './Section';
|
|
4
|
+
/**
|
|
5
|
+
* The descriptions are mostly just shameless copies from the following docs:
|
|
6
|
+
*
|
|
7
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html}
|
|
8
|
+
*
|
|
9
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html}
|
|
10
|
+
*
|
|
11
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
12
|
+
*/
|
|
13
|
+
export interface IControlFileOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Target architecture. Defaults to the current system's architecture.
|
|
16
|
+
*
|
|
17
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-architecture}
|
|
18
|
+
*/
|
|
19
|
+
architecture?: string;
|
|
20
|
+
/**
|
|
21
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html#s-built-using}
|
|
22
|
+
*/
|
|
23
|
+
builtUsing?: string;
|
|
24
|
+
/**
|
|
25
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
26
|
+
*/
|
|
27
|
+
conflicts?: string[];
|
|
28
|
+
/**
|
|
29
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
30
|
+
*/
|
|
31
|
+
depends?: string[];
|
|
32
|
+
/**
|
|
33
|
+
* If set to `yes`, then the package management system will refuse to
|
|
34
|
+
* remove
|
|
35
|
+
* the package (upgrading and replacing it is still possible). The other
|
|
36
|
+
* possible value is `no`, which is the same as not having the field at
|
|
37
|
+
* all.
|
|
38
|
+
*
|
|
39
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-essential}
|
|
40
|
+
*/
|
|
41
|
+
essential?: 'yes' | 'no';
|
|
42
|
+
/**
|
|
43
|
+
* Extended description for the package. Defaults to the value provided for
|
|
44
|
+
* the `shortDescription` option.
|
|
45
|
+
*
|
|
46
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-description}
|
|
47
|
+
*/
|
|
48
|
+
extendedDescription?: string;
|
|
49
|
+
/**
|
|
50
|
+
* URL for this package.
|
|
51
|
+
*
|
|
52
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-homepage}
|
|
53
|
+
*/
|
|
54
|
+
homepage?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The package maintainer's name and email address. The name must come
|
|
57
|
+
* first, then the email address inside angle brackets. **This field is
|
|
58
|
+
* mandatory.**
|
|
59
|
+
*
|
|
60
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-maintainer}
|
|
61
|
+
*/
|
|
62
|
+
maintainer: string;
|
|
63
|
+
/**
|
|
64
|
+
* Path to the scripts you want to execute before/after the system
|
|
65
|
+
* installs/upgrades/removes your package. There are quite a few rules
|
|
66
|
+
* here,
|
|
67
|
+
* so please check
|
|
68
|
+
* {@link
|
|
69
|
+
* https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html} for
|
|
70
|
+
* details.
|
|
71
|
+
*/
|
|
72
|
+
maintainerScripts?: Partial<Record<MaintainerScript, string>>;
|
|
73
|
+
/**
|
|
74
|
+
* Binary package name. Must be at least two characters long and must start
|
|
75
|
+
* with an alphanumeric character. Only lower case letters (a-z), digits
|
|
76
|
+
* (0-9), plus (+) and minus (-) signs, and periods (.) are allowed. **This
|
|
77
|
+
* field is mandatory.**
|
|
78
|
+
*
|
|
79
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source}
|
|
80
|
+
*/
|
|
81
|
+
packageName: string;
|
|
82
|
+
/**
|
|
83
|
+
* See {@link
|
|
84
|
+
* https://www.debian.org/doc/debian-policy/ch-relationships.html} for
|
|
85
|
+
* details.
|
|
86
|
+
*/
|
|
87
|
+
preDepends?: string[];
|
|
88
|
+
/**
|
|
89
|
+
* This field represents how important it is that the user have the package
|
|
90
|
+
* installed. Defaults to `optional`.
|
|
91
|
+
*
|
|
92
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-priority}
|
|
93
|
+
*/
|
|
94
|
+
priority?: Priority;
|
|
95
|
+
/**
|
|
96
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
97
|
+
*/
|
|
98
|
+
recommends?: string[];
|
|
99
|
+
/**
|
|
100
|
+
* This field specifies an application area into which the package has been
|
|
101
|
+
* classified. This is a recommended field.
|
|
102
|
+
*
|
|
103
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-section}
|
|
104
|
+
*/
|
|
105
|
+
section?: Section;
|
|
106
|
+
/**
|
|
107
|
+
* Short, single-line synopsys for the package. Usually ~80 characters.
|
|
108
|
+
* **This field is mandatory.**
|
|
109
|
+
*
|
|
110
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-description}
|
|
111
|
+
*/
|
|
112
|
+
shortDescription: string;
|
|
113
|
+
/**
|
|
114
|
+
* Source package name.
|
|
115
|
+
*
|
|
116
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source}
|
|
117
|
+
*/
|
|
118
|
+
source?: string;
|
|
119
|
+
/**
|
|
120
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-relationships.html}
|
|
121
|
+
*/
|
|
122
|
+
suggests?: string[];
|
|
123
|
+
/**
|
|
124
|
+
* Version number of the package in the
|
|
125
|
+
* `[epoch:]upstream_version[-debian_revision]` format. See
|
|
126
|
+
* {@link https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-version}
|
|
127
|
+
* for details. **This field is mandatory.**
|
|
128
|
+
*/
|
|
129
|
+
version: string;
|
|
130
|
+
}
|