recipe 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. program=eudev
  17. version=3.2.9
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/boot"
  21. tarname=${program}-${version}.tar.gz
  22. # Remote source(s)
  23. fetch=http://dev.gentoo.org/~blueness/eudev/$tarname
  24. description="
  25. Dynamic device management.
  26. Udev is the device manager for the Linux 2.6 kernel series.
  27. Its primary function is managing device nodes in /dev.
  28. It is the successor of devfs and hotplug, which means that
  29. it handles the /dev directory and all user space actions
  30. when adding/removing devices, including firmware load.
  31. This is a fork of Udev from Gentoo.
  32. "
  33. homepage=http://wiki.gentoo.org/wiki/Eudev
  34. license=GPLv2+
  35. # Source documentation
  36. docs=COPYING
  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. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  46. $configure_args \
  47. --libdir=/usr/lib${libSuffix} \
  48. --mandir=$mandir \
  49. --docdir=$docsdir \
  50. --enable-static=yes \
  51. --enable-shared=yes \
  52. --enable-hwdb \
  53. --enable-manpages \
  54. --enable-rule-generator \
  55. --disable-selinux \
  56. --disable-introspection \
  57. --build="$(cc -dumpmachine)"
  58. make -j${jobs} V=1
  59. make -j${jobs} DESTDIR="$destdir" install-strip
  60. # Move installed hwdb files under /lib
  61. # Reported on http://github.com/gentoo/eudev/pull/127
  62. mkdir -p "${destdir}/lib/udev/hwdb.d"
  63. mv "${destdir}/etc/udev/hwdb.d"/* "${destdir}/lib/udev/hwdb.d"
  64. # Make symlink for multipath
  65. (
  66. cd "${destdir}/usr/sbin" && \
  67. ln -sf /usr/lib${libSuffix}/udev/scsi_id .
  68. )
  69. # Install perp service for udevd(8)
  70. mkdir -p "${destdir}/etc/perp/udevd"
  71. cp -p "${worktree}/archive/eudev/rc.log" \
  72. "${worktree}/archive/eudev/rc.main" \
  73. "${destdir}/etc/perp/udevd/"
  74. chmod 755 "${destdir}"/etc/perp/udevd/rc.*
  75. # Be an active service by default
  76. chmod +t "${destdir}/etc/perp/udevd"
  77. # To handle config file(s)
  78. touch "${destdir}/etc/perp/udevd/.graft-config" \
  79. "${destdir}/etc/udev/.graft-config"
  80. # Compress and link man pages (if needed)
  81. if test -d "${destdir}/$mandir"
  82. then
  83. (
  84. cd "${destdir}/$mandir"
  85. find . -type f -exec lzip -9 '{}' +
  86. find . -type l | while read -r file
  87. do
  88. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  89. rm -- "$file"
  90. done
  91. )
  92. fi
  93. # Copy documentation
  94. mkdir -p "${destdir}${docsdir}"
  95. cp -p $docs "${destdir}${docsdir}"
  96. }