recipe 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # Build recipe for eudev.
  2. #
  3. # Copyright (c) 2016-2020 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Exit immediately on any error
  17. set -e
  18. program=eudev
  19. version=3.2.9
  20. release=2
  21. # Define a category for the output of the package name
  22. pkgcategory=boot
  23. tarname=${program}-${version}.tar.gz
  24. # Remote source(s)
  25. fetch=http://dev.gentoo.org/~blueness/eudev/$tarname
  26. description="
  27. Dynamic device management.
  28. Udev is the device manager for the Linux 2.6 kernel series.
  29. Its primary function is managing device nodes in /dev.
  30. It is the successor of devfs and hotplug, which means that
  31. it handles the /dev directory and all user space actions
  32. when adding/removing devices, including firmware load.
  33. This is a fork of Udev from Gentoo.
  34. "
  35. homepage=http://wiki.gentoo.org/wiki/Eudev
  36. license=GPLv2+
  37. # Source documentation
  38. docs=COPYING
  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 CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  47. $configure_args \
  48. --libdir=/usr/lib${libSuffix} \
  49. --mandir=$mandir \
  50. --docdir=$docsdir \
  51. --enable-static=yes \
  52. --enable-shared=yes \
  53. --enable-hwdb \
  54. --enable-manpages \
  55. --enable-rule-generator \
  56. --disable-selinux \
  57. --disable-introspection \
  58. --build="$(gcc -dumpmachine)"
  59. make -j${jobs} V=1
  60. make -j${jobs} DESTDIR="$destdir" install-strip
  61. # Move installed hwdb files under /lib
  62. # Reported on http://github.com/gentoo/eudev/pull/127
  63. mkdir -p "${destdir}/lib/udev/hwdb.d"
  64. mv "${destdir}/etc/udev/hwdb.d"/* "${destdir}/lib/udev/hwdb.d"
  65. # Make symlink for multipath
  66. (
  67. cd "${destdir}/usr/sbin" && \
  68. ln -sf /usr/lib${libSuffix}/udev/scsi_id .
  69. )
  70. # To handle config file(s)
  71. touch "${destdir}/etc/udev/.graft-config"
  72. # Compress and link man pages (if needed)
  73. if test -d "${destdir}/$mandir"
  74. then
  75. (
  76. cd "${destdir}/$mandir"
  77. find . -type f -exec lzip -9 {} +
  78. find . -type l | while read -r file
  79. do
  80. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  81. rm -- "$file"
  82. done
  83. )
  84. fi
  85. # Copy documentation
  86. mkdir -p "${destdir}${docsdir}"
  87. cp -p $docs "${destdir}${docsdir}"
  88. }