npm-pkgbuild 22.1.1 → 22.1.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
|
@@ -39,8 +39,10 @@ export class NodeModulesContentProvider extends ContentProvider {
|
|
|
39
39
|
}
|
|
40
40
|
super(definitions);
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
if (definitions.withoutDevelpmentDependencies !== undefined) {
|
|
43
|
+
this.withoutDevelpmentDependencies =
|
|
44
|
+
definitions.withoutDevelpmentDependencies;
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
/**
|
package/src/output/alpm.mjs
CHANGED
|
@@ -250,6 +250,7 @@ package() {
|
|
|
250
250
|
|
|
251
251
|
if [ "$(ls -A $srcdir)" ]
|
|
252
252
|
then
|
|
253
|
+
cp -rp $srcdir/* "$pkgdir"
|
|
253
254
|
### PERMISSION ###
|
|
254
255
|
|
|
255
256
|
${verbose}
|
|
@@ -279,37 +280,33 @@ package() {
|
|
|
279
280
|
createEntryWhenMissing: () => new ContentEntry(PKGBUILD)
|
|
280
281
|
});
|
|
281
282
|
|
|
282
|
-
const
|
|
283
|
+
const permission = [];
|
|
283
284
|
|
|
284
285
|
for await (const file of copyEntries(
|
|
285
286
|
transform(aggregate(sources), transformer),
|
|
286
287
|
join(staging, "src"),
|
|
287
288
|
expander
|
|
288
289
|
)) {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
290
|
+
if(file.destination !== '../PKGBUILD') {
|
|
291
|
+
if (file.owner || file.group) {
|
|
292
|
+
permission.push(
|
|
293
|
+
` chown ${[file.owner ?? "", file.group ?? ""].join(":")} \"$pkgdir/${file.destination}\"`
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
const mode = (await file.mode) & 0o7777;
|
|
297
|
+
if (mode) {
|
|
298
|
+
permission.push(
|
|
299
|
+
` chmod ${Number(mode).toString(8)} \"$pkgdir/${file.destination}\"`
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
302
|
}
|
|
303
|
-
install.push(
|
|
304
|
-
` install ${file.isBlob ? "-D" : "-d"} ${options.join(" ")} \"$srcdir/${file.name}\" \"$pkgdir/${file.destination}\"`
|
|
305
|
-
);
|
|
306
303
|
|
|
307
304
|
if (options.verbose) {
|
|
308
305
|
console.log(file.destination);
|
|
309
306
|
}
|
|
310
307
|
}
|
|
311
308
|
|
|
312
|
-
if (
|
|
309
|
+
if (permission.length) {
|
|
313
310
|
const pkgbuild = join(staging, PKGBUILD);
|
|
314
311
|
const content = await readFile(pkgbuild, utf8StreamOptions);
|
|
315
312
|
const markerPos = content.indexOf("### PERMISSION ###");
|
|
@@ -317,7 +314,7 @@ package() {
|
|
|
317
314
|
await writeFile(
|
|
318
315
|
pkgbuild,
|
|
319
316
|
content.substring(0, markerPos) +
|
|
320
|
-
|
|
317
|
+
permission.join("\n") +
|
|
321
318
|
content.substring(markerPos + 18),
|
|
322
319
|
utf8StreamOptions
|
|
323
320
|
);
|