]> git.pld-linux.org Git - SPECS.git/blob - gscan2pdf.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / gscan2pdf.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 #
5 Summary:        A GUI to produce PDFs from scanned documents
6 Name:           gscan2pdf
7 Version:        0.9.32
8 Release:        1
9 License:        GPL
10 Group:          Applications/Publishing
11 Source0:        http://downloads.sourceforge.net/gscan2pdf/%{name}-%{version}.tar.gz
12 # Source0-md5:  97cdc74bcca61b9494b87bb155118eda
13 Patch0:         %{name}-tesseract_polish.patch
14 URL:            http://gscan2pdf.sourceforge.net/
15 BuildRequires:  desktop-file-utils
16 BuildRequires:  gettext-tools
17 %{?with_tests:BuildRequires:    perl-Test-Pod}
18 BuildRequires:  perl-devel
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 Requires(post,postun):  gtk-update-icon-cache
21 Requires(post,postun):  hicolor-icon-theme
22 Requires:       ImageMagick
23 Requires:       ImageMagick-perl
24 Requires:       djvulibre
25 Suggests:       gocr
26 Suggests:       sane-backends >= 1.0.17
27 Suggests:       sane-frontentds
28 Suggests:       tesseract
29 Suggests:       unpaper
30 Suggests:       xdg-utils
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Only two clicks are required to scan several pages and then save all
36 or a selection as a PDF file, including metadata if required.
37
38 gscan2pdf can control regular or sheet-fed (ADF) scanners with SANE
39 via scanimage or scanadf, and can scan multiple pages at once. It
40 presents a thumbnail view of scanned pages, and permits simple
41 operations such as rotating and deleting pages.
42
43 PDF conversion is done by PDF::API2.
44
45 The resulting document may be saved as a PDF or a multipage TIFF file.
46
47 %prep
48 %setup -q
49 %patch0 -p1
50
51 %build
52 %{__perl} Makefile.PL INSTALLDIRS=vendor
53 %{__make}
54
55 %{?with_tests:%{__make} test}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59
60 %{__make} install \
61         DESTDIR=$RPM_BUILD_ROOT
62 find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
63 find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
64 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
65 chmod -R u+w $RPM_BUILD_ROOT/*
66
67 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable
68 mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/gscan2pdf.svg \
69    $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable
70
71 desktop-file-install --delete-original  --vendor="" \
72   --dir=$RPM_BUILD_ROOT%{_desktopdir}         \
73   $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
74
75 %find_lang %{name}
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 update-desktop-database &> /dev/null ||:
82 %update_icon_cache hicolor
83
84 %postun
85 update-desktop-database &> /dev/null ||:
86 %update_icon_cache hicolor
87
88 %files -f %{name}.lang
89 %defattr(644,root,root,755)
90 %doc LICENCE
91 %attr(755,root,root) %{_bindir}/gscan2pdf
92 %attr(755,root,root) %{_bindir}/scanadf-perl
93 %attr(755,root,root) %{_bindir}/scanimage-perl
94 %{perl_vendorlib}/Gscan2pdf.pm
95 %{_datadir}/%{name}
96 %{_desktopdir}/%{name}.desktop
97 %{_mandir}/man1/*.1*
98 %{_iconsdir}/hicolor/scalable/gscan2pdf.svg
This page took 0.175134 seconds and 3 git commands to generate.