source: projects/specs/trunk/x/xsane/xsane-vl.spec @ 12394

Revision 12394, 11.2 KB checked in by tomop, 4 years ago (diff)

updated 4 packages

geeqie-1.5.1-1

lcms2-2.9-2

sane-1.0.29-1

xsane-0.999-3

Line 
1%define gimpdirs %(/bin/ls -d %{_libdir}/gimp/*/plug-ins 2> /dev/null)
2%global gimpplugindir %(gimptool --gimpplugindir 2>/dev/null || echo INVALID)/plug-ins
3%global iconrootdir %{_datadir}/icons/hicolor
4
5# needed for off-root building
6%global _configure ../configure
7
8Name: xsane
9Summary: XSane is a graphical frontend for scanners. It uses the library SANE.
10Summary(ja): SANE スキャナインタフェースの Xウィンドウ用フロントエンドです
11Version: 0.999
12Release: 3%{?_dist_release}
13Group: Applications/Multimedia
14Vendor: Project Vine
15Distribution: Vine Linux
16
17License: GPL
18URL: http://www.xsane.org/
19Source: http://www.xsane.org/download/%{name}-%{version}.tar.gz
20Source1: xsane-256x256.png
21# use "xdg-open" instead of "netscape" to launch help browser
22# submitted to upstream (Oliver Rauch) via email, 2013-06-04
23Patch0: xsane-0.995-xdg-open.patch
24# submitted to upstream (Oliver Rauch) via email, 2009-08-18
25Patch1: xsane-0.995-close-fds.patch
26# https://bugzilla.redhat.com/show_bug.cgi?id=504344
27# distro-specific(?), upstream won't accept it: "don't show license dialog"
28# submitted to upstream (Oliver Rauch) anyway via email, 2013-06-04
29Patch2: xsane-0.996-no-eula.patch
30# enable off-root building
31# submitted to upstream (Oliver Rauch) via email, 2010-06-23
32Patch3: xsane-0.997-off-root-build.patch
33# https://bugzilla.redhat.com/show_bug.cgi?id=608047
34# https://bugzilla.redhat.com/show_bug.cgi?id=621778
35# submitted to upstream (Oliver Rauch) via email, 2013-07-05
36Patch4: xsane-0.999-no-file-selected.patch
37# https://bugzilla.redhat.com/show_bug.cgi?id=198422
38# submitted to upstream (Oliver Rauch) via email, 2010-06-29
39Patch5: xsane-0.997-ipv6.patch
40# https://bugzilla.redhat.com/show_bug.cgi?id=624190
41# fix from: https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/370818
42# submitted to upstream (Oliver Rauch) via email, 2011-06-01
43Patch6: xsane-0.998-preview-selection.patch
44# fix building with libpng >= 1.5
45# submitted to upstream (Oliver Rauch) via email, 2011-11-21
46Patch7: xsane-0.998-libpng.patch
47# https://bugzilla.redhat.com/show_bug.cgi?id=795085
48# set program name/wmclass so GNOME shell picks appropriate high resolution
49# icon file
50# submitted to upstream (Oliver Rauch) via email, 2013-06-04
51Patch8: xsane-0.998-wmclass.patch
52# partly distro-specific: customize desktop file
53# submitted to upstream (Oliver Rauch) via email, 2013-06-04
54Patch9: xsane-0.998-desktop-file.patch
55# man page: update command line options
56# submitted to upstream (Oliver Rauch) via email, 2013-07-08
57Patch10: xsane-0.999-man-page.patch
58# avoid producing PDFs with bpp > 8
59# submitted to upstream (Oliver Rauch) via email, 2013-09-09
60Patch11: xsane-0.999-pdf-no-high-bpp.patch
61# build against lcms 2.x
62# submitted to upstream (Oliver Rauch) via email, 2013-09-23
63Patch12: xsane-0.999-lcms2.patch
64# fix issues found during static analysis that don't require far-reaching
65# refactoring
66# submitted to upstream (Oliver Rauch) via email, 2014-04-02
67Patch13: xsane-0.999-coverity.patch
68# update lib/snprintf.c to the latest version from LPRng that has a Free license
69# submitted to upstream (Oliver Rauch) via email, 2014-05-29
70Patch14: xsane-0.999-snprintf-update.patch
71# fix signal handling (#1073698)
72# submitted to upstream (Oliver Rauch) via email, 2014-07-03
73Patch15: xsane-0.999-signal-handling.patch
74
75# autoconf-generated files
76Patch100: xsane-0.999-7-autoconf.patch.bz2
77
78BuildRoot: %{_tmppath}/%{name}-%{version}-root
79BuildRequires: sane-devel
80BuildRequires: gimp-devel
81BuildRequires: lcms2-devel
82BuildRequires: libjpeg-devel
83BuildRequires: libpng-devel
84BuildRequires: desktop-file-utils >= 0.2.92
85BuildRequires: libtiff-devel
86BuildRequires: gettext-devel
87Requires: hicolor-icon-theme
88
89%description
90Xsane is a grahical frontend for sane. Install this if you want a grahpical
91frontend for sane for use in the X Windowing System.
92
93%description -l ja
94XSane は、多くのスキャナ、デジタルカメラ、その他の画像取り込み装置に対応
95した SANE スキャナインタフェースの Xウィンドウ用フロントエンドです。
96XSane は GTK+ で書かれ、画像取り込みや取込み画像の操作を行うことができま
97す。
98
99
100%prep
101%setup -q
102
103# convert some files to UTF-8
104for doc in xsane.{CHANGES,PROBLEMS,INSTALL}; do
105    iconv -f ISO-8859-1 -t utf8 "$doc" -o "$doc.new" && \
106    touch -r "$doc" "$doc.new" && \
107    mv "$doc.new" "$doc"
108done
109
110%patch0 -p1 -b .xdg-open
111%patch1 -p1 -b .close-fds
112%patch2 -p1 -b .no-eula
113%patch3 -p1 -b .off-root-build
114%patch4 -p1 -b .no-file-selected
115%patch5 -p1 -b .ipv6
116%patch6 -p1 -b .preview-selection.patch
117%patch7 -p1 -b .libpng
118%patch8 -p1 -b .wmclass
119%patch9 -p1 -b .desktop-file
120%patch10 -p1 -b .man-page
121%patch11 -p1 -b .pdf-no-high-bpp
122%patch12 -p1 -b .lcms2
123%patch13 -p1 -b .coverity
124%patch14 -p1 -b .snprintf-update
125%patch15 -p1 -b .signal-handling
126
127%patch100 -p1 -b .autoconf
128
129# in-root config.h breaks off-root building
130rm include/config.h
131
132mkdir build-with-gimp
133mkdir build-without-gimp
134
135
136%build
137CFLAGS='%optflags -fno-strict-aliasing'
138export CFLAGS
139
140pushd build-with-gimp
141%configure --enable-gimp
142make %{?_smp_mflags}
143popd
144
145pushd build-without-gimp
146%configure --disable-gimp
147make
148popd
149
150cp %{SOURCE1} src/
151
152
153%install
154%__rm -rf $RPM_BUILD_ROOT
155pushd build-without-gimp
156make DESTDIR=%{buildroot} install
157popd
158
159# install GIMP plugin
160install -m 0755 -d %{buildroot}%{gimpplugindir}
161install -m 0755 build-with-gimp/src/xsane %{buildroot}%{gimpplugindir}
162
163# install customized desktop file
164rm %{buildroot}%{_datadir}/applications/xsane.desktop
165
166cat > src/xsane.desktop <<EOF
167[Desktop Entry]
168Encoding=UTF-8
169Name=XSane
170Name[ja]=XSane スキャナ操作
171Comment=Scanner program
172Comment[ja]=スキャナを操作するツールです
173Terminal=false
174Type=Application
175Icon=%{iconrootdir}/48x48/apps/xsane.png
176Exec=xsane
177X-MultipleArgs=false
178Categories=Application;Graphics;
179EOF
180
181desktop-file-install \
182    --dir %{buildroot}%{_datadir}/applications \
183    src/xsane.desktop
184
185# icon files in multiple resolutions
186for res in 16 32 48 256; do
187    tdir="%{buildroot}%{iconrootdir}/${res}x${res}/apps"
188    install -m 0755 -d "$tdir"
189    install -m 0644 src/xsane-${res}x${res}.png "${tdir}/xsane.png"
190done
191
192# Register as an application to be visible in the software center
193#
194# NOTE: It would be *awesome* if this file was maintained by the upstream
195# project, translated and installed into the right place during `make install`.
196#
197# See http://www.freedesktop.org/software/appstream/docs/ for more details.
198#
199
200mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
201cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
202<?xml version="1.0" encoding="UTF-8"?>
203<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
204<!--
205EmailAddress: Oliver.Rauch@xsane.org
206SentUpstream: 2014-09-17
207-->
208<application>
209  <id type="desktop">xsane.desktop</id>
210  <metadata_license>CC0-1.0</metadata_license>
211  <summary>Scan images with a scanner</summary>
212  <description>
213    <p>
214      XSane is an application to scan images using a hardware scanner attached
215      to your computer.
216      It is able to save in a variety of image formats, including TIFF and JPEG
217      and can even save your scan as a PDF.
218      XSane also has support for scanning multiple pages and merging them into
219      a single document.
220    </p>
221  </description>
222  <url type="homepage">http://www.xsane.org/</url>
223  <screenshots>
224    <screenshot type="default">http://www.xsane.org/doc/xsane-save.jpg</screenshot>
225  </screenshots>
226</application>
227EOF
228
229%find_lang %{name}
230
231
232%clean
233rm -rf $RPM_BUILD_ROOT
234
235
236%pre
237# remove obsolete gimp-plugin-mgr managed symlink
238if [ -L "%{gimpplugindir}/xsane" ]; then
239    rm -f "%{gimpplugindir}/xsane"
240fi
241
242
243%files -f %{name}.lang
244%defattr(-,root,root)
245%doc xsane.ACCELKEYS xsane.AUTHOR xsane.BEGINNERS-INFO xsane.BUGS xsane.CHANGES xsane.FAQ xsane.LANGUAGES xsane.LOGO xsane.NEWS xsane.ONLINEHELP xsane.PROBLEMS xsane.ROOT xsane.TODO
246%license xsane.COPYING
247%{_bindir}/*
248%{_mandir}/*/*
249%dir %{_datadir}/sane
250%{_datadir}/sane/*
251%{gimpplugindir}/xsane
252%{_datadir}/appdata/%{name}.appdata.xml
253%{_datadir}/applications/xsane.desktop
254%{_datadir}/pixmaps/xsane.xpm
255%{iconrootdir}/*/apps/%{name}.png
256
257
258%changelog
259* Mon May 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.999-3
260- rebuilt with lcms2.
261- dropped Patch0.
262- imported patches from rawhide.
263
264* Mon Feb 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.999-2
265- rebuild with libgphoto2-2.5.7
266- add BuildRequires: lcms-devel
267
268* Wed Jan 14 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.999-1
269- update to 0.999
270- add Patch0 (xsane-0.999-libpng.patch)
271
272* Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 0.997-2
273- build with libgphoto2 2.5.0-1
274
275* Sun Jul 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.997-1
276- new upstream release
277- add BuildRequires: gimp-devel
278- remove configure option (--enable-gimp)
279- fix %files
280
281* Sat Jul 26 2008 Shu KONNO <owa@bg.wakwak.com> 0.995-1vl5
282- applied new versioning policy
283- updated script to create %{name}.desktop
284
285* Mon Dec 24 2007 Shu KONNO <owa@bg.wakwak.com> 0.995-0vl1
286- new upstream
287- updated xsane.desktop
288
289* Sat Jan 08 2005 Satoshi MACHINO <machino@vinelinux.org> 0.96-0vl1
290- new upstream version (xsane-0.96)
291- fixed spec file
292        -- cleaned up
293        -- added Requires: sane >= 1.0.0, gtk2, glib2, atk, pango, zlib
294        -- added BuildRequires: sane-devel, gtk2-devel, atk-devel, pango-devel
295        -- added BuildRequires: gimp >= 1.3.23
296        -- added BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel,zlib-devel
297
298* Fri Oct 25 2002 Tomoya TAKA <taka@vinelinux.org> 0.89-0vl1
299- new upstream release
300
301* Mon May 13 2002 Satoshi MACHINO <machino@vinelinux.org> xsane-0.86-0vl1
302- updated xsane-0.86
303
304* Thu Apr 4 2002 Masaki Shinomiya <shino@pos.to>
305- 0.84-0vl1 for Vine Linux-2.x
306- 0.84-0.1
307- symlink for gimp listed in %file section
308- some html-documents
309- set %_sysconfdir to /etc for RedHat6.x/Vine2.x
310- RPM Group move to Applications/Multimedia
311
312* Tue Mar 12 2002 Masaki Shinomiya <shino@pos.to>
313- 0.84-0
314- bugfix in %post script
315
316* Sun Dec 23 2001 Masaki Shinomiya <shino@pos.to>
317- 0.82-0.1
318- use mocros as possible, nosrc
319
320* Thu Jul 5 2001 Masaki Shinomiya <shino@pos.to>
321- 0.79-0test
322- remove the patch of the tooltips
323
324* Thu Jul 5 2001 Masaki Shinomiya <shino@pos.to>
325- 0.78-1vl2
326- fixed script for gimp plug-in setup
327
328* Sat Jun 23 2001 Masaki Shinomiya <shino@pos.to>
329- rename for VinePlus. program registoration for gnome
330
331* Tue Jun 19 2001 Masaki Shinomiya <shino@pos.to>
332- patch to provide proper fonts for the tooltips
333
334* Thu Jun 14 2001 Masaki Shinomiya <shino@pos.to>
335- 0.78-1
336- escape confliction of the document file 'sane-pnm-doc.html' with one from SANE
337
338* Sun Jun 3 2001 Masaki Shinomiya <shino@pos.to>
339- 0.77-1
340
341* Mon May 21 2001 Masaki Shinomiya <shino@pos.to>
342- 0.76-1
343- refined script for gimp plug-in setup
344
345* Wed Nov 15 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
346- 0.64-0vl1
347- updated to 0.64 (hope it'll be compatible with gimp-1.1.27...)
348
349* Mon Oct 16 2000 Jun Nishii <jun@vinelinux.org>
350- 0.61-0vl3
351- build with gimp-1.1.27
352
353* Mon Sep 25 2000 Jun Nishii <jun@vinelinux.org>
354- 0.61-0vl2
355- build with gimp-1.1.25
356
357* Thu Sep 21 2000 Jun Nishii <jun@vinelinux.org>
358- 0.61-0vl1
359
360* Sat Jan 22 2000 Jun Nishii <jun@vinelinux.org>
361- 0.51-0vl1
362
363* Mon Aug 30 1999 Tim Powers <timp@redhat.com>
364- changed group
365
366* Mon Jul 26 1999 Tim Powers <timp@redhat.com>
367- update to 0.30
368- added %defattr
369- built for 6.1
370
371* Thu Apr 22 1999 Preston Brown <pbrown@redhat.com>
372- initial RPM for PowerTools 6.0
373
374
375
376
377
378
Note: See TracBrowser for help on using the repository browser.