npm-pkgbuild 20.9.2 → 20.9.3
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/package.json
CHANGED
|
@@ -36,7 +36,7 @@ export class ContentProvider {
|
|
|
36
36
|
*
|
|
37
37
|
* @param {string} name
|
|
38
38
|
* @param {boolean} isCollection
|
|
39
|
-
* @returns {Object}
|
|
39
|
+
* @returns {Object|undefined}
|
|
40
40
|
*/
|
|
41
41
|
propertiesFor(name, isCollection) {
|
|
42
42
|
for (const [pattern, properties] of Object.entries(this.properties)) {
|
package/src/output/arch.mjs
CHANGED
|
@@ -231,7 +231,7 @@ export class ARCH extends Packager {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
const depends = this.makeDepends(properties.dependencies).join(" ");
|
|
234
|
-
const dependsStatement = depends.length ? `depends=(${depends})
|
|
234
|
+
const dependsStatement = depends.length ? `depends=(${depends})` : "";
|
|
235
235
|
const verbose = options.verbose ? 'ls -laR "$pkgdir"' : "";
|
|
236
236
|
|
|
237
237
|
async function* trailingLines() {
|
|
@@ -278,7 +278,7 @@ package() {
|
|
|
278
278
|
join(staging, "src"),
|
|
279
279
|
expander
|
|
280
280
|
)) {
|
|
281
|
-
if (file.
|
|
281
|
+
if (file.user || file.group || file.mode) {
|
|
282
282
|
permissions.push(file);
|
|
283
283
|
}
|
|
284
284
|
|
|
@@ -292,17 +292,25 @@ package() {
|
|
|
292
292
|
let content = await readFile(pkgbuild, utf8StreamOptions);
|
|
293
293
|
const markerPos = content.indexOf("### PERMISSION ###");
|
|
294
294
|
|
|
295
|
+
const flags = {
|
|
296
|
+
user: ["-u", f => f.user],
|
|
297
|
+
group: ["-g", f => f.group],
|
|
298
|
+
mode: ["-m", f => Number(f.mode).toString(8)]
|
|
299
|
+
};
|
|
300
|
+
|
|
295
301
|
content =
|
|
296
302
|
content.substring(0, markerPos) +
|
|
297
303
|
permissions
|
|
298
|
-
.filter(f=>f.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
+
.filter(f=>f.isBlob)
|
|
305
|
+
.map(f => {
|
|
306
|
+
const options = Object.keys(flags)
|
|
307
|
+
.filter(name => f[name])
|
|
308
|
+
.map(name => `${flags[name][0]} ${flags[name][1](f)}`)
|
|
309
|
+
.join(" ");
|
|
310
|
+
return ` install -D ${options} \"$srcdir/${f.name}\" \"$pkgdir/${f.destination}\"`;
|
|
311
|
+
})
|
|
304
312
|
.join("\n") +
|
|
305
|
-
content.substring(markerPos +
|
|
313
|
+
content.substring(markerPos + 18);
|
|
306
314
|
|
|
307
315
|
await writeFile(pkgbuild, content, utf8StreamOptions);
|
|
308
316
|
}
|