summaryrefslogtreecommitdiff
path: root/feh.spec
blob: 04275efaacc1bf1fecdb6bfbefc084e47f81af16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Name:           feh
Version:        3.9.1
Release:        1
Summary:        Fast command line image viewer using Imlib2
License:        MIT
URL:            https://feh.finalrewind.org
Source0:        %{url}/%{name}-%{version}.tar.bz2

BuildRequires:  gcc
BuildRequires:  imlib2-devel
BuildRequires:  libcurl-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libXt-devel
BuildRequires:  libXinerama-devel
BuildRequires:  libexif-devel
BuildRequires:  perl-Test-Command
BuildRequires:  perl-Test-Harness
BuildRequires: make
Requires:       dejavu-sans-fonts
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

%description
feh is a versatile and fast image viewer using imlib2, the
premier image file handling library. feh has many features,
from simple single file viewing, to multiple file modes using
a slide-show or multiple windows. feh supports the creation of
montages as index prints with many user-configurable options.

%prep
%autosetup -p1 -n feh-%{version}

%build
# Propagate values into config.mk
sed -i \
  -e "s|^doc_dir =.*$|doc_dir = \$(DESTDIR)%{_pkgdocdir}|" \
  -e "s|^example_dir =.*$|example_dir = \$(doc_dir)/examples|" \
  -e "s|^CFLAGS ?=.*$|CFLAGS = ${RPM_OPT_FLAGS}|" \
  config.mk
%make_build PREFIX="%{_prefix}" VERSION="%{version}" \
    curl=1 exif=1 test=1 xinerama=1


%install
%make_install PREFIX=%{_prefix}
rm %{buildroot}%{_datadir}/%{name}/fonts/yudit.ttf
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
rm %{buildroot}%{_docdir}/%{name}/examples/find-lowres

%check
make test

%files
%license COPYING
%doc %{_docdir}/%{name}
%{_bindir}/*
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/*
%{_datarootdir}/icons/hicolor/48x48/apps/feh.png
%{_datarootdir}/icons/hicolor/scalable/apps/feh.svg

%changelog
* Fri Feb 17 2023 lichaoran <pkwarcraft@hotmail.com> - 3.9.1-1
- init package