recipe 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Build recipe for inih.
  2. #
  3. # Copyright (c) 2021-2022 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=inih
  19. version=r56
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=libs
  23. tarname=${program}-${version}.tar.gz
  24. # Remote source(s)
  25. fetch=https://github.com/benhoyt/inih/archive/${version}/$tarname
  26. description="
  27. A simple .ini file parser written in C.
  28. inih (INI Not Invented Here) is a simple .INI file parser written in C.
  29. It's only a couple of pages of code, and it was designed to be small and
  30. simple, so it's good for embedded systems. It's also more or less
  31. compatible with Python's ConfigParser style of .INI files, including
  32. RFC 822-style multi-line syntax and name: value entries.
  33. "
  34. homepage=https://github.com/benhoyt/inih/
  35. license="New BSD License"
  36. # Source documentation
  37. docs=README.md
  38. docsdir="${docdir}/${program}-${version}"
  39. # Limit parallel jobs for this build
  40. jobs=1
  41. build()
  42. {
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. rm -rf BUILD
  48. mkdir -p BUILD
  49. cd BUILD
  50. CPPFLAGS="$QICPPFLAGS" \
  51. CFLAGS="$QICFLAGS" \
  52. CXXFLAGS="$QICXXFLAGS" \
  53. LDFLAGS="$QILDFLAGS" \
  54. meson setup $configure_args \
  55. --libdir /usr/lib${libSuffix} \
  56. --buildtype=release \
  57. --strip \
  58. ..
  59. ninja -j${jobs}
  60. DESTDIR="$destdir" ninja -j${jobs} install
  61. cd ..
  62. mkdir -p "${destdir}/$docsdir"
  63. cp -p $docs "${destdir}/$docsdir"
  64. }