recipe 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Build recipe for hwids.
  2. #
  3. # Copyright (c) 2017-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=hwids
  17. version=20200306
  18. arch=noarch
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/libs"
  22. tarname=${program}-${version}.tar.gz
  23. # Remote source(s)
  24. fetch=http://github.com/gentoo/hwids/archive/$tarname
  25. description="
  26. Hardware identification databases.
  27. This package contain a specially re-packaged copy of the pci.ids
  28. and usb.ids files, as well as a copy of IEEE's databases for the
  29. Organizationally Unique Identifiers (OUI) and Individual Address
  30. Block (IAB).
  31. "
  32. homepage=http://github.com/gentoo/hwids
  33. license="GPLv2+ | 3-clause BSD"
  34. # Source documentation
  35. docs="README.md *.txt"
  36. docsdir="${docdir}/${program}-${version}"
  37. # Custom source directory name
  38. srcdir=hwids-hwids-${version}
  39. build()
  40. {
  41. set -e
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. mkdir -p "${destdir}/usr/share/hwdata"
  47. for file in *.ids
  48. do
  49. cp -p $file "${destdir}/usr/share/hwdata/"
  50. chmod 644 "${destdir}/usr/share/hwdata/${file}"
  51. done
  52. # Copy documentation
  53. mkdir -p "${destdir}${docsdir}"
  54. cp -p $docs "${destdir}${docsdir}"
  55. }