recipe 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Build recipe for popt.
  2. #
  3. # Copyright (C) 2017 Alan Beadle, ab.beadle@gmail.com.
  4. # Copyright (c) 2018-2019, 2021 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=popt
  20. version=1.18
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=libs
  24. tarname=${program}-${version}.tar.gz
  25. # Remote source(s)
  26. fetch="
  27. https://ftp.rpm.org/popt/releases/popt-1.x/$tarname
  28. ftp://anduin.linuxfromscratch.org/BLFS/popt/$tarname
  29. "
  30. description="
  31. Popt is a C library for parsing command line parameters.
  32. Popt was heavily influenced by the getopt() and getopt_long()
  33. functions, but it improves on them by allowing more powerful
  34. argument expansion.
  35. "
  36. homepage=https://rpm5.org
  37. license="MIT X Consortium"
  38. # Source documentation
  39. docs="CHANGES COPYING README"
  40. docsdir="${docdir}/${program}-${version}"
  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. ./configure CPPFLAGS="$QICPPFLAGS" \
  48. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  49. $configure_args \
  50. --libdir=/usr/lib${libSuffix} \
  51. --mandir=$mandir \
  52. --docdir=$docsdir \
  53. --enable-static=yes \
  54. --enable-shared=yes \
  55. --build="$(gcc -dumpmachine)"
  56. make -j${jobs} V=1 libdir=/usr/lib${libSuffix} \
  57. pkgconfigdir=/usr/lib${libSuffix}/pkgconfig
  58. make -j${jobs} libdir=/usr/lib${libSuffix} \
  59. pkgconfigdir=/usr/lib${libSuffix}/pkgconfig \
  60. DESTDIR="${destdir}" install-strip
  61. # Compress man pages
  62. lzip -9 "${destdir}/${mandir}"/man?/*
  63. # Copy documentation
  64. mkdir -p "${destdir}/$docsdir"
  65. cp -p $docs "${destdir}/$docsdir"
  66. }