recipe 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Build recipe for feh.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018-2019 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. program=feh
  18. version=3.2.1
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/x-apps"
  22. tarname=${program}-${version}.tar.bz2
  23. # Remote source(s)
  24. fetch=http://feh.finalrewind.org/"$tarname"
  25. description="
  26. A fast and light image viewer.
  27. Feh is a fast, lightweight image viewer which uses imlib2. It is
  28. command line-driven and supports multiple images through slideshows,
  29. thumbnail browsing or multiple windows, and montages or index prints
  30. (using TrueType fonts to display file info). Advanced features include
  31. fast dynamic zooming, progressive loading, loading via HTTP (with
  32. reload support for watching webcams), recursive file opening (slideshow
  33. of a directory hierarchy), and mouse wheel/keyboard control.
  34. "
  35. homepage=http://feh.finalrewind.org
  36. license="MIT Expat variant"
  37. # Source documentation
  38. docs="AUTHORS COPYING ChangeLog README.md TODO"
  39. docsdir="${docdir}/${program}-${version}"
  40. # Limit parallel jobs for this build
  41. jobs=1
  42. build()
  43. {
  44. set -e
  45. unpack "${tardir}/$tarname"
  46. cd "$srcdir"
  47. # Apply patch from Dragora adding a missing header in getopt.c
  48. patch -p1 < "${worktree}/patches/feh/getopt.c_header"
  49. # Replace default C flags with the ones provided by Qi
  50. sed -i "s/-g -O2/$QICFLAGS/" config.mk
  51. make -j${jobs} V=1 PREFIX=/usr
  52. make -j${jobs} V=1 \
  53. PREFIX=/usr \
  54. doc_dir="$destdir/$docsdir" \
  55. example_dir="$destdir/${docsdir}/examples" \
  56. DESTDIR="$destdir" install
  57. strip --strip-unneeded "${destdir}/usr/bin/feh"
  58. # Compress and link man pages (if needed)
  59. if test -d "${destdir}/$mandir"
  60. then
  61. (
  62. cd "${destdir}/$mandir"
  63. find . -type f -exec lzip -9 '{}' +
  64. find . -type l | while read -r file
  65. do
  66. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  67. rm -- "$file"
  68. done
  69. )
  70. fi
  71. # Copy documentation
  72. mkdir -p "${destdir}${docsdir}"
  73. cp -p $docs "${destdir}${docsdir}/"
  74. }