recipe 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Build recipe for fittsen (fork of fittstool).
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018-2019 Matias Fonzo, <selk@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=fittsen
  18. version=20190618_277dd4f
  19. release=4
  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="
  25. http://rsync.dragora.org/current/sources/$tarname
  26. http://mirror.cedia.org.ec/dragora/current/sources/$tarname
  27. "
  28. description="
  29. A mouse command utitlity.
  30. Utility to bind commands to mouse button events on the screen corners,
  31. via a simple and concise configuration file.
  32. "
  33. homepage=http://notabug.org/frusen/fittsen
  34. license="GPLv2+ | New BSD (inih library)"
  35. # Source documentation
  36. docs="LICENSE* README.md github.README.md"
  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. make -j${jobs} CFLAGS="$QICFLAGS"
  46. mkdir -p "${destdir}/usr/bin"
  47. cp -p fittsen "${destdir}/usr/bin"/
  48. chmod 755 "${destdir}/usr/bin/fittsen"
  49. strip --strip-unneeded "${destdir}/usr/bin/fittsen"
  50. # Make symlink for compatibility with fittstool
  51. ( cd "${destdir}/usr/bin" && ln -sf fittsen fittstool )
  52. # Compress and link man pages (if needed)
  53. if test -d "${destdir}/$mandir"
  54. then
  55. (
  56. cd "${destdir}/$mandir"
  57. find . -type f -exec lzip -9 '{}' +
  58. find . -type l | while read -r file
  59. do
  60. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  61. rm -- "$file"
  62. done
  63. )
  64. fi
  65. # Copy documentation
  66. mkdir -p "${destdir}${docsdir}"
  67. cp -p $docs "${destdir}${docsdir}/"
  68. }