recipe 2.3 KB

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