01-custom-destdir.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. Description: Use standard ‘DESTDIR’ environment variable to override destination directory.
  2. Origin: Created to fix build issues in Debian packaging of multiple binary packages.
  3. Author: Ben Finney <ben+debian@benfinney.id.au>
  4. Last-Update: 2014-01-21
  5. === modified file 'Makefile'
  6. --- old/Makefile revid:j.luetkens@limitland.de-20131023072122-26ua6glkzx1uxm07
  7. +++ new/Makefile 2014-01-21 00:27:49 +0000
  8. @@ -27,7 +27,6 @@
  9. CURSORSNAME = ComixCursors
  10. PACKAGENAME ?= ${CURSORSNAME}
  11. SUMMARY ?= The original Comix Cursors
  12. -ICONSDIR ?= ${HOME}/.icons
  13. THEMENAME ?= Custom
  14. GENERATED_FILES :=
  15. @@ -49,8 +48,14 @@
  16. configfile = ${configdir}/${THEMENAME}.CONFIG
  17. themefile = ${builddir}/${THEMENAME}.theme
  18. -destdir = ${ICONSDIR}/${CURSORSNAME}${THEMEOPTIONS}${THEMEINCLUDE}${SIZENAME}-${THEMENAME}
  19. -xcursor_destdir = ${destdir}/cursors
  20. +ifdef DESTDIR
  21. +icons_destdir = ${DESTDIR}/usr/share/icons
  22. +else
  23. +icons_destdir = ${HOME}/.icons
  24. +endif
  25. +
  26. +theme_destdir = ${icons_destdir}/${CURSORSNAME}${THEMEOPTIONS}${THEMEINCLUDE}${SIZENAME}-${THEMENAME}
  27. +xcursor_destdir = ${theme_destdir}/cursors
  28. template_configfile = ${configdir}/Custom.CONFIG
  29. template_themefile = ${configdir}/Custom.theme
  30. @@ -89,22 +94,22 @@
  31. .PHONY: install
  32. install: all
  33. # Create necessary directories.
  34. - install -d "${ICONSDIR}" "${ICONSDIR}/default"
  35. - $(RM) -r "${destdir}"
  36. + install -d "${icons_destdir}" "${icons_destdir}/default"
  37. + $(RM) -r "${theme_destdir}"
  38. install -d "${xcursor_destdir}"
  39. # Install the cursors.
  40. install -m u=rw,go=r "${xcursor_builddir}"/* "${xcursor_destdir}"
  41. # Install the theme configuration file.
  42. - install -m u=rw,go=r "${themefile}" "${destdir}/index.theme"
  43. + install -m u=rw,go=r "${themefile}" "${theme_destdir}/index.theme"
  44. # Install alternative name symlinks for the cursors.
  45. $(LINK_CURSORS) "${xcursor_destdir}"
  46. .PHONY: uninstall
  47. uninstall:
  48. - $(RM) -r "${destdir}"
  49. + $(RM) -r "${theme_destdir}"
  50. .PHONY: custom-theme
  51. === modified file 'build-distribution'
  52. --- old/build-distribution revid:j.luetkens@limitland.de-20131023072122-26ua6glkzx1uxm07
  53. +++ new/build-distribution 2014-01-20 23:53:23 +0000
  54. @@ -43,6 +43,7 @@
  55. printf "Packaging %s %s...\n" "$themename_root" $VERSION
  56. workdir="$(mktemp -t -d)"
  57. +DESTDIR="${workdir}/dest"
  58. #
  59. # source package
  60. @@ -68,9 +69,9 @@
  61. printf "Installing cursor files...\n"
  62. # Make a temporary directory for installing icons into.
  63. -ICONSDIR="${workdir}/icons"
  64. -export ICONSDIR
  65. -mkdir --parents "${ICONSDIR}"
  66. +icons_destdir="${DESTDIR}/usr/share/icons"
  67. +
  68. +export DESTDIR
  69. ./install-all
  70. @@ -93,7 +94,7 @@
  71. packagedir="${workdir}/${PACKAGENAME}"
  72. mkdir --parents "$packagedir"
  73. - mv "${ICONSDIR}/${PACKAGENAME}"* "$packagedir"/.
  74. + mv "${icons_destdir}/${PACKAGENAME}"* "$packagedir"/.
  75. tarfile="${distdir}/${PACKAGENAME}-${VERSION}.tar.bz2"
  76. tar -cjf "$tarfile" --directory "$packagedir" --files-from <(
  77. === modified file 'install-all'
  78. --- old/install-all revid:j.luetkens@limitland.de-20131023072122-26ua6glkzx1uxm07
  79. +++ new/install-all 2014-01-20 23:53:23 +0000
  80. @@ -27,10 +27,6 @@
  81. bindir="$(dirname $0)"/bin
  82. -# Set the ICONSDIR destination to a default (if not already set).
  83. -ICONSDIR=${ICONSDIR:-~/.icons}
  84. -export ICONSDIR
  85. -
  86. # We want to use cursors with multiple sizes combined.
  87. # The script check wether MULTISIZE is exported at all, so don't export
  88. # MULTISIZE if you want distinct cursor sizes, comment it out here or