recipe 2.5 KB

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