recipe 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Build recipe for libinput.
  2. #
  3. # Copyright (c) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. # Copyright (c) 2017-2019, 2021-2022 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=libinput
  20. version=1.19.4
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=xorg_extra
  24. tarname=${program}-${version}.tar.xz
  25. # Remote source(s)
  26. fetch=https://www.freedesktop.org/software/libinput/$tarname
  27. description="
  28. Input device library.
  29. Library that handles input devices for display servers and other
  30. applications that need to directly deal with input devices.
  31. "
  32. homepage=https://www.x.org
  33. license="MIT X Consortium"
  34. # Source documentation
  35. docs="COPYING README.md"
  36. docsdir="${docdir}/${program}-${version}"
  37. build()
  38. {
  39. unpack "${tardir}/$tarname"
  40. cd "$srcdir"
  41. # Set sane permissions
  42. chmod -R u+w,go-w,a+rX-s .
  43. rm -rf BUILD
  44. mkdir BUILD
  45. cd BUILD
  46. CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  47. meson setup $configure_args \
  48. --libdir /usr/lib${libSuffix} \
  49. --buildtype=release \
  50. --strip \
  51. -Dudev-dir=/lib/udev \
  52. -Ddocumentation=false \
  53. -Dtests=false \
  54. ..
  55. ninja -j${jobs}
  56. DESTDIR="$destdir" ninja -j${jobs} install
  57. cd ..
  58. # Compress and link man pages (if needed)
  59. if test -d "${destdir}/$mandir"
  60. then
  61. (
  62. cd "${destdir}/$mandir"
  63. find . -type f -exec lzip -9 {} +
  64. find . -type l | while read -r file
  65. do
  66. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  67. rm -- "$file"
  68. done
  69. )
  70. fi
  71. # Copy documentation
  72. mkdir -p "${destdir}/$docsdir"
  73. cp -p $docs "${destdir}/$docsdir"
  74. }