recipe 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Build recipe for icewm.
  2. #
  3. # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2019 Lucas Skoldqvist, <frusen@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. program=icewm
  18. version=1.6.2
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/community/x-apps"
  22. tarname=${program}-${version}.tar.lz
  23. # Remote source(s)
  24. fetch=http://github.com/ice-wm/icewm/releases/download/${version}/$tarname
  25. homepage=http://ice-wm.org/
  26. description="
  27. IceWM Window Manager.
  28. IceWM is a window manager for the X Window System. The goal of IceWM
  29. is speed, simplicity, and not getting in the user's way. It comes with
  30. a taskbar with pager, global and per-window keybindings and a dynamic
  31. menu system.
  32. For more information, visit: $homepage
  33. "
  34. license=LGPLv2+
  35. # Source documentation
  36. docs="AUTHORS ChangeLog COPYING NEWS README.md THANKS TODO VERSION doc/*.html icewm.lsm"
  37. docsdir="${docdir}/${program}-${version}"
  38. build()
  39. {
  40. set -e
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. ./configure CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  46. $configure_args \
  47. --libdir=/usr/lib${libSuffix} \
  48. --mandir=$mandir \
  49. --with-docdir=$docsdir \
  50. --disable-rpath \
  51. --build="$(cc -dumpmachine)"
  52. make -j${jobs} V=1
  53. make -j${jobs} DESTDIR="$destdir" install
  54. mkdir -p "${destdir}/usr/share/xsessions" \
  55. "${destdir}/usr/share/applications"
  56. cp -p lib/icewm-session.desktop "${destdir}/usr/share/xsessions"
  57. cp -p lib/icewm.desktop "${destdir}/usr/share/applications"
  58. # Include xinitrc file to start IceWM
  59. mkdir -p "${destdir}/etc/X11/xinit"
  60. cp -p "${worktree}/archive/icewm/xinitrc-icewm" "${destdir}/etc/X11/xinit/"
  61. chmod 644 "${destdir}/etc/X11/xinit/xinitrc-icewm"
  62. touch "${destdir}/etc/X11/xinit/.graft-config"
  63. # Compress and link man pages (if needed)
  64. if test -d "${destdir}/$mandir"
  65. then
  66. (
  67. cd "${destdir}/$mandir"
  68. find . -type f -exec lzip -9 '{}' +
  69. find . -type l | while read -r file
  70. do
  71. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  72. rm -- "$file"
  73. done
  74. )
  75. fi
  76. # Copy documentation
  77. mkdir -p "${destdir}${docsdir}"
  78. cp -p $docs "${destdir}${docsdir}"
  79. }