recipe 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Build recipe for icewm.
  2. #
  3. # Copyright (c) 2018-2020 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. # Exit immediately on any error
  18. set -e
  19. program=icewm
  20. version=1.6.2
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=x-apps
  24. tarname=${program}-${version}.tar.lz
  25. # Remote source(s)
  26. fetch=http://github.com/ice-wm/icewm/releases/download/${version}/$tarname
  27. homepage=http://ice-wm.org/
  28. description="
  29. IceWM Window Manager.
  30. IceWM is a window manager for the X Window System. The goal of IceWM
  31. is speed, simplicity, and not getting in the user's way. It comes with
  32. a taskbar with pager, global and per-window keybindings and a dynamic
  33. menu system.
  34. For more information, visit: $homepage
  35. "
  36. license=LGPLv2+
  37. # Source documentation
  38. docs="AUTHORS ChangeLog COPYING NEWS README.md THANKS TODO VERSION doc/*.html icewm.lsm"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. ./configure CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  47. $configure_args \
  48. --libdir=/usr/lib${libSuffix} \
  49. --mandir=$mandir \
  50. --with-docdir=$docsdir \
  51. --disable-rpath \
  52. --build="$(cc -dumpmachine)"
  53. make -j${jobs} V=1
  54. make -j${jobs} DESTDIR="$destdir" install
  55. mkdir -p "${destdir}/usr/share/xsessions" \
  56. "${destdir}/usr/share/applications"
  57. cp -p lib/icewm-session.desktop "${destdir}/usr/share/xsessions"
  58. cp -p lib/icewm.desktop "${destdir}/usr/share/applications"
  59. # Include xinitrc file to start IceWM
  60. mkdir -p "${destdir}/etc/X11/xinit"
  61. cp -p "${worktree}/archive/icewm/xinitrc-icewm" "${destdir}/etc/X11/xinit/"
  62. chmod 644 "${destdir}/etc/X11/xinit/xinitrc-icewm"
  63. touch "${destdir}/etc/X11/xinit/.graft-config"
  64. # Compress and link man pages (if needed)
  65. if test -d "${destdir}/$mandir"
  66. then
  67. (
  68. cd "${destdir}/$mandir"
  69. find . -type f -exec lzip -9 {} +
  70. find . -type l | while read -r file
  71. do
  72. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  73. rm -- "$file"
  74. done
  75. )
  76. fi
  77. # Copy documentation
  78. mkdir -p "${destdir}${docsdir}"
  79. cp -p $docs "${destdir}${docsdir}"
  80. }