Changes of Revision 2

iscan.spec Changed
x
 
1
@@ -33,6 +33,7 @@
2
 Patch1:         jpegstream.patch
3
 # PATCH-FIX-UPSTREAM -- https://bugs.gentoo.org/692708
4
 Patch2:         iscan-2.30.4.2-sscanf.patch
5
+Patch3:         iscan-data.patch
6
 BuildRequires:  gcc-c++
7
 BuildRequires:  gettext-tools
8
 BuildRequires:  libjpeg-devel
9
@@ -47,9 +48,8 @@
10
 BuildRequires:  pkgconfig(libxml-2.0)
11
 BuildRequires:  pkgconfig(sane-backends)
12
 BuildRequires:  pkgconfig(udev)
13
-Requires:       %{name}-data
14
+Requires:       %{name}-data = %version-%release
15
 Requires(post): systemd
16
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
17
 ExclusiveArch: x86_64
18
 
19
 %description
20
@@ -78,21 +78,17 @@
21
 Image Scan! for Linux will not function without this package.
22
 
23
 %prep
24
-%setup -q
25
-%setup -q -D -T -a 1
26
-
27
-%patch0
28
-%patch1 -p2
29
-%patch2 -p1
30
+%autosetup -p1 -a 1
31
 
32
+%build
33
 # Fix for CXX ABI different than 1002 (export from arch)
34
 ln -s libesmod-x86_64.c2.so non-free/libesmod-x86_64.so
35
 
36
-%build
37
-# Build iscan
38
-export CFLAGS="$(echo %optflags | sed 's/\-fstack-clash-protection//')"
39
-export CXXFLAGS="${CFLAGS}"
40
-export LDFLAGS="${LDFLAGS} -ldl -lpng16"
41
+find -name Makefile.in -print -delete
42
+autoreconf -vif
43
+CFLAGS='%optflags -Wno-deprecated-declarations'
44
+CXXFLAGS="${CFLAGS}"
45
+LDFLAGS="${LDFLAGS} -ldl -lpng16"
46
 %configure \
47
   --sbindir=%{_bindir} \
48
   --enable-dependency-reduction \
49
@@ -102,34 +98,36 @@
50
   --enable-png \
51
   --enable-gimp \
52
   --enable-static=no
53
-
54
-make  %{?_smp_mflags}
55
+%make_build
56
 
57
 # Build data
58
-cd %{name}-data-%{version_iscan_data}
59
+pushd %{name}-data-%{version_iscan_data}
60
+autoreconf -vif
61
 %configure --libdir="%{_prefix}/lib"
62
-make  %{?_smp_mflags}
63
-make %{?_smp_mflags} %{name}-data.hwdb
64
+%make_build
65
+%make_build %{name}-data.hwdb
66
+popd
67
 
68
 %install
69
-# iscan: install files
70
-make DESTDIR=%{buildroot} install %{?_smp_mflags}
71
+%make_install
72
 install -d %{buildroot}%{plugindir}/plug-ins
73
-ln -s %{_bindir}/iscan %{buildroot}%{_libdir}/gimp/2.0/plug-ins/iscan
74
+gimplibdir="`pkg-config --variable=gimplibdir gimp-2.0`"
75
+mkdir -vp %{buildroot}${gimplibdir}/plug-ins
76
+ln -s %{_bindir}/iscan %{buildroot}${gimplibdir}/plug-ins/iscan
77
 install -D -m 0644 backend/epkowa.conf %{buildroot}%{_sysconfdir}/sane.d/epkowa.conf
78
 install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sane.d/dll.d/epkowa.conf
79
 
80
-find %{buildroot} \( -name \*.la -o -name \*.so  \) -exec rm {} \;
81
+find %{buildroot} \( -name \*.la -o -name \*.so \) -ls -delete
82
 
83
 %suse_update_desktop_file -i %{name} Graphics Scanning
84
 
85
 %find_lang %{name}
86
 
87
 # data: install files
88
-cd %{name}-data-%{version_iscan_data}
89
-make DESTDIR=%{buildroot} install %{?_smp_mflags}
90
-
91
+pushd %{name}-data-%{version_iscan_data}
92
+%make_install
93
 install -D -m 0644 %{name}-data.hwdb %{buildroot}/%{_udevhwdbdir}/%{name}-data.hwdb
94
+popd
95
 
96
 %post
97
 /sbin/ldconfig
98
@@ -143,8 +141,9 @@
99
 
100
 %files -f %{name}.lang
101
 %defattr(-,root,root,-)
102
-%doc NEWS README AUTHORS COPYING
103
-%doc non-free/COPYING.EPSON.en.txt
104
+%doc NEWS README AUTHORS
105
+%license COPYING
106
+%license non-free/COPYING.EPSON.en.txt
107
 %doc doc/xinetd.sane
108
 %dir %{_sysconfdir}/sane.d
109
 %dir %{_sysconfdir}/sane.d/dll.d
110
@@ -154,15 +153,14 @@
111
 %{_bindir}/%{name}-registry
112
 %{_libdir}/libesmod.so*
113
 %{_libdir}/sane/libsane-epkowa.so*
114
-%{_libdir}/gimp/2.0/plug-ins/iscan
115
+%{_libdir}/gimp
116
 %{_datadir}/applications/%{name}.desktop
117
 %{_mandir}/man?/iscan.?.gz
118
 %{_mandir}/man?/sane-epkowa.?.gz
119
 %{_mandir}/man?/iscan-registry.?.gz
120
 
121
 %files data
122
-%defattr(-, root, root)
123
-%doc %{name}-data-%{version_iscan_data}/COPYING
124
+%license %{name}-data-%{version_iscan_data}/COPYING
125
 %doc %{name}-data-%{version_iscan_data}/NEWS
126
 %doc %{name}-data-%{version_iscan_data}/KNOWN-PROBLEMS
127
 %doc %{name}-data-%{version_iscan_data}/SUPPORTED-DEVICES
128
iscan-2.30.4.2-sscanf.patch Changed
21
 
1
@@ -1,7 +1,6 @@
2
-diff -ur iscan-2.30.3/backend/cfg-obj.c b/iscan-2.30.3/backend/cfg-obj.c
3
---- iscan-2.30.3/backend/cfg-obj.c 2019-05-31 13:26:41.530042108 +0200
4
-+++ iscan-2.30.3/backend/cfg-obj.c 2019-05-31 14:05:13.040056748 +0200
5
-@@ -1026,7 +1026,7 @@
6
+--- a/backend/cfg-obj.c
7
++++ b/backend/cfg-obj.c
8
+@@ -1026,7 +1026,7 @@ _cfg_register_scsi_entry (const char *st
9
        char *vendor = NULL;
10
        char *model  = NULL;
11
  
12
@@ -10,7 +9,7 @@
13
  
14
        if (list_append (_cfg->seen[CFG_KEY_SCSI], info))
15
          {
16
-@@ -1108,7 +1108,7 @@
17
+@@ -1108,7 +1108,7 @@ _cfg_register_interpreter_entry (const c
18
        char *library  = NULL;
19
        char *firmware = NULL;
20
  
21
iscan-data.patch Added
11
 
1
@@ -0,0 +1,9 @@
2
+--- a/iscan-data-1.39.1/policy/Makefile.am
3
++++ b/iscan-data-1.39.1/policy/Makefile.am
4
+@@ -34,5 +34,5 @@ dist_iscandata_DATA = \
5
+ 
6
+ ##  Created by $(top_srcdir)/configure because the make-policy-file
7
+ ##  script does not refer to any of the directory variables.
8
+-pkglib_SCRIPTS = \
9
++pkglibexec_SCRIPTS = \
10
+   make-policy-file
11
jpegstream.patch Changed
19
 
1
@@ -1,6 +1,5 @@
2
-diff -ruN iscan_2.30.3-1.orig/iscan-2.30.3/lib/jpegstream.cc iscan_2.30.3-1/iscan-2.30.3/lib/jpegstream.cc
3
---- iscan_2.30.3-1.orig/iscan-2.30.3/lib/jpegstream.cc 2016-08-19 12:14:06.000000000 +0300
4
-+++ iscan_2.30.3-1/iscan-2.30.3/lib/jpegstream.cc  2018-04-13 21:23:10.433761773 +0300
5
+--- a/lib/jpegstream.cc
6
++++ b/lib/jpegstream.cc
7
 @@ -33,7 +33,7 @@
8
  
9
  #include "jpegstream.hh"
10
@@ -10,7 +9,7 @@
11
  #include <ios>
12
  
13
  namespace iscan
14
-@@ -82,7 +82,8 @@
15
+@@ -82,7 +82,8 @@ namespace iscan
16
          //        only that _bits != 8.
17
          for (unsigned int i = 0; i < _h_sz; ++i)
18
            {
19
libpng15.patch Changed
42
 
1
@@ -1,6 +1,6 @@
2
---- lib/pngstream.cc   2011-12-01 02:30:53.000000000 +0100
3
-+++ lib/pngstream.cc   2012-02-06 03:06:22.000000000 +0100
4
-@@ -83,7 +83,12 @@
5
+--- a/lib/pngstream.cc
6
++++ b/lib/pngstream.cc
7
+@@ -83,7 +83,12 @@ namespace iscan
8
  #if HAVE_PNG_H
9
      set_error_handler (_png, _info);
10
  
11
@@ -13,7 +13,7 @@
12
        {
13
          lib->write_end (_png, _info);
14
          _footer = true;
15
-@@ -167,6 +172,9 @@
16
+@@ -157,6 +162,9 @@ namespace iscan
17
      funcsym (write_row);
18
      funcsym (write_flush);
19
      funcsym (write_end);
20
@@ -23,7 +23,7 @@
21
  
22
      if (lib->access_version_number
23
          && lib->create_write_struct
24
-@@ -176,6 +184,9 @@
25
+@@ -166,6 +174,9 @@ namespace iscan
26
          && lib->set_IHDR
27
          && lib->set_pHYs
28
          && lib->set_invert_mono
29
@@ -33,9 +33,9 @@
30
          && lib->write_info
31
          && lib->write_row
32
          && lib->write_flush
33
---- lib/pngstream.hh   2011-12-01 02:30:53.000000000 +0100
34
-+++ lib/pngstream.hh   2012-02-06 03:09:09.000000000 +0100
35
-@@ -108,6 +108,10 @@
36
+--- a/lib/pngstream.hh
37
++++ b/lib/pngstream.hh
38
+@@ -108,6 +108,10 @@ namespace iscan
39
                 png_structp);
40
        fundecl (void, write_end,
41
                 png_structp, png_infop);
42