mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.2 KiB

  1. --- netpbm-10.12/buildtools/installnetpbm.pl.orig 2004-03-03 11:10:51.000000000 +0100
  2. +++ netpbm-10.12/buildtools/installnetpbm.pl 2004-03-03 12:03:52.000000000 +0100
  3. @@ -140,13 +140,12 @@
  4. if (`cp --version 2>/dev/null` =~ m/GNU/) {
  5. # It's GNU Cp -- we have options galore, and they're readable.
  6. - $cpCommand = "cp --recursive --preserve --no-dereference";
  7. + $cpCommand = "cp --preserve --no-dereference";
  8. } else {
  9. # This works on Cp from "4th Berkeley Distribution", July 1994.
  10. # Mac OSX has this.
  11. - # -R means recursive with no dereferencing of symlinks
  12. # -p means preserve attributes
  13. - $cpCommand = "cp -R -p";
  14. + $cpCommand = "cp -p -d";
  15. }
  16. return($cpCommand);
  17. }
  18. @@ -662,8 +661,30 @@
  19. }
  20. +sub installManPages($$) {
  21. +
  22. + my ($srcdir, $dstdir) = @_;
  23. +
  24. + if (! -d ($dstdir)) {
  25. + my $succeeded = mkdir($dstdir, 0777);
  26. +
  27. + if (!$succeeded) {
  28. + print("Unable to create directory '$dstdir'. " .
  29. + "Error=$ERRNO\n");
  30. + return;
  31. + }
  32. + }
  33. -sub installManPage($$) {
  34. + my $rc = system("$cpCommand $srcdir/* $dstdir/");
  35. +
  36. + if ($rc != 0) {
  37. + print("copy of man pages from $srcdir to $dstdir failed.\n");
  38. + print("cp exit code is $rc\n");
  39. + }
  40. +}
  41. +
  42. +
  43. +sub installManDirectories($$) {
  44. # Note: This installs the pointer man pages and the netpbm.url file for Manweb.
  45. @@ -674,16 +695,11 @@
  46. print("Installing man pages...\n");
  47. - my $rc = system("$cpCommand $pkgdir/man/* $manDir/");
  48. -
  49. - if ($rc != 0) {
  50. - print("copy of man pages from $pkgdir/man to $manDir failed.\n");
  51. - print("cp exit code is $rc\n");
  52. - } else {
  53. - print("done.\n");
  54. - }
  55. + installManPages("$pkgdir/man/man1", "$manDir/man1");
  56. + installManPages("$pkgdir/man/man3", "$manDir/man3");
  57. + installManPages("$pkgdir/man/man5", "$manDir/man5");
  58. - print("\n");
  59. + print("done\n");
  60. removeObsoleteManPage($manDir);
  61. @@ -730,7 +746,7 @@
  62. installHeader($pkgdir, $prefix);
  63. print("\n");
  64. -installManPage($pkgdir, $prefix);
  65. +installManDirectories($pkgdir, $prefix);
  66. print("\n");
  67. print("Installation is complete (except where previous error messages have\n");