OpenSDE Packages Database (without history before r20070)
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.

123 lines
5.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../bzip2/002-destdir.patch
  5. # Copyright (C) 2008 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. The first two chunks define a default DESTDIR, and skip `make test`
  17. when cross compiling, the rest is a simple:
  18. sed -i -e 's|$(PREFIX)|$(DESTDIR)$(PREFIX)|g' Makefile
  19. --- ./Makefile.orig 2008-07-05 22:20:18.000000000 +0300
  20. +++ ./Makefile 2008-07-05 22:24:39.000000000 +0300
  21. @@ -24,6 +24,7 @@
  22. CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
  23. # Where you want it installed when you do 'make install'
  24. +DESTDIR=
  25. PREFIX=/usr/local
  26. @@ -35,7 +36,11 @@
  27. decompress.o \
  28. bzlib.o
  29. +ifeq ($(DESTDIR),)
  30. all: libbz2.a bzip2 bzip2recover test
  31. +else
  32. +all: libbz2.a bzip2 bzip2recover
  33. +endif
  34. bzip2: libbz2.a bzip2.o
  35. $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
  36. @@ -70,43 +75,43 @@
  37. @cat words3
  38. install: bzip2 bzip2recover
  39. - if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
  40. - if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
  41. - if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
  42. - if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
  43. - if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
  44. - cp -f bzip2 $(PREFIX)/bin/bzip2
  45. - cp -f bzip2 $(PREFIX)/bin/bunzip2
  46. - cp -f bzip2 $(PREFIX)/bin/bzcat
  47. - cp -f bzip2recover $(PREFIX)/bin/bzip2recover
  48. - chmod a+x $(PREFIX)/bin/bzip2
  49. - chmod a+x $(PREFIX)/bin/bunzip2
  50. - chmod a+x $(PREFIX)/bin/bzcat
  51. - chmod a+x $(PREFIX)/bin/bzip2recover
  52. - cp -f bzip2.1 $(PREFIX)/man/man1
  53. - chmod a+r $(PREFIX)/man/man1/bzip2.1
  54. - cp -f bzlib.h $(PREFIX)/include
  55. - chmod a+r $(PREFIX)/include/bzlib.h
  56. - cp -f libbz2.a $(PREFIX)/lib
  57. - chmod a+r $(PREFIX)/lib/libbz2.a
  58. - cp -f bzgrep $(PREFIX)/bin/bzgrep
  59. - ln -s -f bzgrep $(PREFIX)/bin/bzegrep
  60. - ln -s -f bzgrep $(PREFIX)/bin/bzfgrep
  61. - chmod a+x $(PREFIX)/bin/bzgrep
  62. - cp -f bzmore $(PREFIX)/bin/bzmore
  63. - ln -s -f bzmore $(PREFIX)/bin/bzless
  64. - chmod a+x $(PREFIX)/bin/bzmore
  65. - cp -f bzdiff $(PREFIX)/bin/bzdiff
  66. - ln -s -f bzdiff $(PREFIX)/bin/bzcmp
  67. - chmod a+x $(PREFIX)/bin/bzdiff
  68. - cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
  69. - chmod a+r $(PREFIX)/man/man1/bzgrep.1
  70. - chmod a+r $(PREFIX)/man/man1/bzmore.1
  71. - chmod a+r $(PREFIX)/man/man1/bzdiff.1
  72. - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
  73. - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
  74. - echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
  75. - echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
  76. + if ( test ! -d $(DESTDIR)$(PREFIX)/bin ) ; then mkdir -p $(DESTDIR)$(PREFIX)/bin ; fi
  77. + if ( test ! -d $(DESTDIR)$(PREFIX)/lib ) ; then mkdir -p $(DESTDIR)$(PREFIX)/lib ; fi
  78. + if ( test ! -d $(DESTDIR)$(PREFIX)/man ) ; then mkdir -p $(DESTDIR)$(PREFIX)/man ; fi
  79. + if ( test ! -d $(DESTDIR)$(PREFIX)/man/man1 ) ; then mkdir -p $(DESTDIR)$(PREFIX)/man/man1 ; fi
  80. + if ( test ! -d $(DESTDIR)$(PREFIX)/include ) ; then mkdir -p $(DESTDIR)$(PREFIX)/include ; fi
  81. + cp -f bzip2 $(DESTDIR)$(PREFIX)/bin/bzip2
  82. + cp -f bzip2 $(DESTDIR)$(PREFIX)/bin/bunzip2
  83. + cp -f bzip2 $(DESTDIR)$(PREFIX)/bin/bzcat
  84. + cp -f bzip2recover $(DESTDIR)$(PREFIX)/bin/bzip2recover
  85. + chmod a+x $(DESTDIR)$(PREFIX)/bin/bzip2
  86. + chmod a+x $(DESTDIR)$(PREFIX)/bin/bunzip2
  87. + chmod a+x $(DESTDIR)$(PREFIX)/bin/bzcat
  88. + chmod a+x $(DESTDIR)$(PREFIX)/bin/bzip2recover
  89. + cp -f bzip2.1 $(DESTDIR)$(PREFIX)/man/man1
  90. + chmod a+r $(DESTDIR)$(PREFIX)/man/man1/bzip2.1
  91. + cp -f bzlib.h $(DESTDIR)$(PREFIX)/include
  92. + chmod a+r $(DESTDIR)$(PREFIX)/include/bzlib.h
  93. + cp -f libbz2.a $(DESTDIR)$(PREFIX)/lib
  94. + chmod a+r $(DESTDIR)$(PREFIX)/lib/libbz2.a
  95. + cp -f bzgrep $(DESTDIR)$(PREFIX)/bin/bzgrep
  96. + ln -s -f bzgrep $(DESTDIR)$(PREFIX)/bin/bzegrep
  97. + ln -s -f bzgrep $(DESTDIR)$(PREFIX)/bin/bzfgrep
  98. + chmod a+x $(DESTDIR)$(PREFIX)/bin/bzgrep
  99. + cp -f bzmore $(DESTDIR)$(PREFIX)/bin/bzmore
  100. + ln -s -f bzmore $(DESTDIR)$(PREFIX)/bin/bzless
  101. + chmod a+x $(DESTDIR)$(PREFIX)/bin/bzmore
  102. + cp -f bzdiff $(DESTDIR)$(PREFIX)/bin/bzdiff
  103. + ln -s -f bzdiff $(DESTDIR)$(PREFIX)/bin/bzcmp
  104. + chmod a+x $(DESTDIR)$(PREFIX)/bin/bzdiff
  105. + cp -f bzgrep.1 bzmore.1 bzdiff.1 $(DESTDIR)$(PREFIX)/man/man1
  106. + chmod a+r $(DESTDIR)$(PREFIX)/man/man1/bzgrep.1
  107. + chmod a+r $(DESTDIR)$(PREFIX)/man/man1/bzmore.1
  108. + chmod a+r $(DESTDIR)$(PREFIX)/man/man1/bzdiff.1
  109. + echo ".so man1/bzgrep.1" > $(DESTDIR)$(PREFIX)/man/man1/bzegrep.1
  110. + echo ".so man1/bzgrep.1" > $(DESTDIR)$(PREFIX)/man/man1/bzfgrep.1
  111. + echo ".so man1/bzmore.1" > $(DESTDIR)$(PREFIX)/man/man1/bzless.1
  112. + echo ".so man1/bzdiff.1" > $(DESTDIR)$(PREFIX)/man/man1/bzcmp.1
  113. clean:
  114. rm -f *.o libbz2.a bzip2 bzip2recover \