1 # Build recipe for feh.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018 Matias Fonzo, <selk@dragora.org>.
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-apps"
25 tarname=${program}-${version}.tar.bz2
28 fetch=http://feh.finalrewind.org/"$tarname"
31 A fast and light image viewer.
33 Feh is a fast, lightweight image viewer which uses imlib2. It is
34 command line-driven and supports multiple images through slideshows,
35 thumbnail browsing or multiple windows, and montages or index prints
36 (using TrueType fonts to display file info). Advanced features include
37 fast dynamic zooming, progressive loading, loading via HTTP (with
38 reload support for watching webcams), recursive file opening (slideshow
39 of a directory hierarchy), and mouse wheel/keyboard control.
42 homepage=http://feh.finalrewind.org
43 license="MIT Expat variant"
45 # Source documentation
46 docs="AUTHORS COPYING ChangeLog README.md TODO"
47 docsdir="${docdir}/${program}-${version}"
49 # Limit parallel jobs for this build
56 unpack "${tardir}/$tarname"
60 # Apply patch from Dragora adding a missing header in getopt.c
61 patch -p1 < "${worktree}/patches/feh/getopt.c_header"
63 # Replace default C flags with the ones provided by Qi
64 sed -i "s/-g -O2/$QICFLAGS/" config.mk
66 make -j${jobs} V=1 PREFIX=/usr
69 doc_dir="$destdir/$docsdir" \
70 example_dir="$destdir/${docsdir}/examples" \
71 DESTDIR="$destdir" install
73 strip --strip-unneeded "${destdir}/usr/bin/feh"
75 # Compress and link man pages (if needed)
76 if test -d "${destdir}/$mandir"
79 cd "${destdir}/$mandir"
80 find . -type f -exec lzip -9 '{}' +
81 find . -type l | while read -r file
83 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
90 mkdir -p "${destdir}${docsdir}"
91 cp -p $docs "${destdir}${docsdir}/"