|
@@ -1,24 +1,90 @@
|
|
%define gimpdirs %(/bin/ls -d %{_libdir}/gimp/*/plug-ins 2> /dev/null)
|
|
%define gimpdirs %(/bin/ls -d %{_libdir}/gimp/*/plug-ins 2> /dev/null)
|
|
|
|
+%global gimpplugindir %(gimptool --gimpplugindir 2>/dev/null || echo INVALID)/plug-ins
|
|
|
|
+%global iconrootdir %{_datadir}/icons/hicolor
|
|
|
|
+
|
|
|
|
+# needed for off-root building
|
|
|
|
+%global _configure ../configure
|
|
|
|
+
|
|
Name: xsane
|
|
Name: xsane
|
|
Summary: XSane is a graphical frontend for scanners. It uses the library SANE.
|
|
Summary: XSane is a graphical frontend for scanners. It uses the library SANE.
|
|
-Summary: SANE スキャナインタフェースの Xウィンドウ用フロントエンドです
|
|
+Summary(ja): SANE スキャナインタフェースの Xウィンドウ用フロントエンドです
|
|
Version: 0.999
|
|
Version: 0.999
|
|
-Release: 2%{?_dist_release}
|
|
+Release: 3%{?_dist_release}
|
|
-Source: http://www.xsane.org/download/%{name}-%{version}.tar.gz
|
|
+Group: Applications/Multimedia
|
|
-%{?nosrc:NoSource: 0}
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+
|
|
License: GPL
|
|
License: GPL
|
|
URL: http://www.xsane.org/
|
|
URL: http://www.xsane.org/
|
|
-Group: Applications/Multimedia
|
|
+Source: http://www.xsane.org/download/%{name}-%{version}.tar.gz
|
|
|
|
+Source1: xsane-256x256.png
|
|
|
|
+# use "xdg-open" instead of "netscape" to launch help browser
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2013-06-04
|
|
|
|
+Patch0: xsane-0.995-xdg-open.patch
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2009-08-18
|
|
|
|
+Patch1: xsane-0.995-close-fds.patch
|
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=504344
|
|
|
|
+# distro-specific(?), upstream won't accept it: "don't show license dialog"
|
|
|
|
+# submitted to upstream (Oliver Rauch) anyway via email, 2013-06-04
|
|
|
|
+Patch2: xsane-0.996-no-eula.patch
|
|
|
|
+# enable off-root building
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2010-06-23
|
|
|
|
+Patch3: xsane-0.997-off-root-build.patch
|
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=608047
|
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=621778
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2013-07-05
|
|
|
|
+Patch4: xsane-0.999-no-file-selected.patch
|
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=198422
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2010-06-29
|
|
|
|
+Patch5: xsane-0.997-ipv6.patch
|
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=624190
|
|
|
|
+# fix from: https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/370818
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2011-06-01
|
|
|
|
+Patch6: xsane-0.998-preview-selection.patch
|
|
|
|
+# fix building with libpng >= 1.5
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2011-11-21
|
|
|
|
+Patch7: xsane-0.998-libpng.patch
|
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=795085
|
|
|
|
+# set program name/wmclass so GNOME shell picks appropriate high resolution
|
|
|
|
+# icon file
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2013-06-04
|
|
|
|
+Patch8: xsane-0.998-wmclass.patch
|
|
|
|
+# partly distro-specific: customize desktop file
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2013-06-04
|
|
|
|
+Patch9: xsane-0.998-desktop-file.patch
|
|
|
|
+# man page: update command line options
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2013-07-08
|
|
|
|
+Patch10: xsane-0.999-man-page.patch
|
|
|
|
+# avoid producing PDFs with bpp > 8
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2013-09-09
|
|
|
|
+Patch11: xsane-0.999-pdf-no-high-bpp.patch
|
|
|
|
+# build against lcms 2.x
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2013-09-23
|
|
|
|
+Patch12: xsane-0.999-lcms2.patch
|
|
|
|
+# fix issues found during static analysis that don't require far-reaching
|
|
|
|
+# refactoring
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2014-04-02
|
|
|
|
+Patch13: xsane-0.999-coverity.patch
|
|
|
|
+# update lib/snprintf.c to the latest version from LPRng that has a Free license
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2014-05-29
|
|
|
|
+Patch14: xsane-0.999-snprintf-update.patch
|
|
|
|
+# fix signal handling (#1073698)
|
|
|
|
+# submitted to upstream (Oliver Rauch) via email, 2014-07-03
|
|
|
|
+Patch15: xsane-0.999-signal-handling.patch
|
|
|
|
+
|
|
|
|
+# autoconf-generated files
|
|
|
|
+Patch100: xsane-0.999-7-autoconf.patch.bz2
|
|
|
|
+
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
-Requires: sane >= 1.0.0, gtk2, glib2, atk, pango, zlib
|
|
+BuildRequires: sane-devel
|
|
-BuildRequires: sane-devel, gtk2-devel, atk-devel, pango-devel
|
|
|
|
-BuildRequires: gimp >= 1.3.23
|
|
|
|
-BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel,zlib-devel
|
|
|
|
-BuildRequires: lcms-devel
|
|
|
|
-BuildRequires: sed, glibc-common
|
|
|
|
BuildRequires: gimp-devel
|
|
BuildRequires: gimp-devel
|
|
-
|
|
+BuildRequires: lcms2-devel
|
|
-Patch0: xsane-0.999-libpng.patch
|
|
+BuildRequires: libjpeg-devel
|
|
|
|
+BuildRequires: libpng-devel
|
|
|
|
+BuildRequires: desktop-file-utils >= 0.2.92
|
|
|
|
+BuildRequires: libtiff-devel
|
|
|
|
+BuildRequires: gettext-devel
|
|
|
|
+Requires: hicolor-icon-theme
|
|
|
|
|
|
%description
|
|
%description
|
|
Xsane is a grahical frontend for sane. Install this if you want a grahpical
|
|
Xsane is a grahical frontend for sane. Install this if you want a grahpical
|
|
@@ -30,44 +96,74 @@ XSane は、多くのスキャナ、デジタルカメラ、その他の画像
|
|
XSane は GTK+ で書かれ、画像取り込みや取込み画像の操作を行うことができま
|
|
XSane は GTK+ で書かれ、画像取り込みや取込み画像の操作を行うことができま
|
|
す。
|
|
す。
|
|
|
|
|
|
|
|
+
|
|
%prep
|
|
%prep
|
|
%setup -q
|
|
%setup -q
|
|
-%patch0 -p1 -b .libpng
|
|
+
|
|
-
|
|
+# convert some files to UTF-8
|
|
-# correct some links in html documents
|
|
+for doc in xsane.{CHANGES,PROBLEMS,INSTALL}; do
|
|
-cd doc
|
|
+ iconv -f ISO-8859-1 -t utf8 "$doc" -o "$doc.new" && \
|
|
-DOCFILE=sane-backends-doc.html
|
|
+ touch -r "$doc" "$doc.new" && \
|
|
-cat ${DOCFILE} | sed 's,/usr/local/share,%{_datadir},' > ${DOCFILE}.new
|
|
+ mv "$doc.new" "$doc"
|
|
-[ -f ${DOCFILE}.new ] && mv -f ${DOCFILE}.new ${DOCFILE}
|
|
+done
|
|
-DOCFILE=sane-xsane-gimp-doc.html
|
|
+
|
|
-cat ${DOCFILE} | sed 's,/usr/local/bin,%{_bindir},' > ${DOCFILE}.new
|
|
+%patch0 -p1 -b .xdg-open
|
|
-[ -f ${DOCFILE}.new ] && mv -f ${DOCFILE}.new ${DOCFILE}
|
|
+%patch1 -p1 -b .close-fds
|
|
-ICONFILE=sane-logo2.jpg
|
|
+%patch2 -p1 -b .no-eula
|
|
-[ -f %{_datadir}/sane/${ICONFILE} ] && cp %{_datadir}/sane/${ICONFILE} ./
|
|
+%patch3 -p1 -b .off-root-build
|
|
|
|
+%patch4 -p1 -b .no-file-selected
|
|
|
|
+%patch5 -p1 -b .ipv6
|
|
|
|
+%patch6 -p1 -b .preview-selection.patch
|
|
|
|
+%patch7 -p1 -b .libpng
|
|
|
|
+%patch8 -p1 -b .wmclass
|
|
|
|
+%patch9 -p1 -b .desktop-file
|
|
|
|
+%patch10 -p1 -b .man-page
|
|
|
|
+%patch11 -p1 -b .pdf-no-high-bpp
|
|
|
|
+%patch12 -p1 -b .lcms2
|
|
|
|
+%patch13 -p1 -b .coverity
|
|
|
|
+%patch14 -p1 -b .snprintf-update
|
|
|
|
+%patch15 -p1 -b .signal-handling
|
|
|
|
+
|
|
|
|
+%patch100 -p1 -b .autoconf
|
|
|
|
+
|
|
|
|
+# in-root config.h breaks off-root building
|
|
|
|
+rm include/config.h
|
|
|
|
+
|
|
|
|
+mkdir build-with-gimp
|
|
|
|
+mkdir build-without-gimp
|
|
|
|
+
|
|
|
|
|
|
%build
|
|
%build
|
|
-%configure
|
|
+CFLAGS='%optflags -fno-strict-aliasing'
|
|
-%{__make} %{?_smp_mflags}
|
|
+export CFLAGS
|
|
|
|
+
|
|
|
|
+pushd build-with-gimp
|
|
|
|
+%configure --enable-gimp
|
|
|
|
+make %{?_smp_mflags}
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+pushd build-without-gimp
|
|
|
|
+%configure --disable-gimp
|
|
|
|
+make
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+cp %{SOURCE1} src/
|
|
|
|
+
|
|
|
|
|
|
%install
|
|
%install
|
|
%__rm -rf $RPM_BUILD_ROOT
|
|
%__rm -rf $RPM_BUILD_ROOT
|
|
-%{__make} install DESTDIR=${RPM_BUILD_ROOT}
|
|
+pushd build-without-gimp
|
|
|
|
+make DESTDIR=%{buildroot} install
|
|
|
|
+popd
|
|
|
|
|
|
-cp src/*.xpm $RPM_BUILD_ROOT%{_datadir}/sane/%{name}
|
|
+# install GIMP plugin
|
|
-
|
|
+install -m 0755 -d %{buildroot}%{gimpplugindir}
|
|
-if (echo "%{gimpdirs}" | grep -q plug-ins) ;then
|
|
+install -m 0755 build-with-gimp/src/xsane %{buildroot}%{gimpplugindir}
|
|
- for D in %{gimpdirs} ; do
|
|
|
|
- mkdir -p $RPM_BUILD_ROOT${D}
|
|
|
|
- %__ln_s -f %{_bindir}/xsane $RPM_BUILD_ROOT${D}/xsane
|
|
|
|
- done
|
|
|
|
-fi
|
|
|
|
|
|
|
|
-# prepare applnk
|
|
+# install customized desktop file
|
|
-%define applnkdir /etc/X11/applnk/Graphics
|
|
+rm %{buildroot}%{_datadir}/applications/xsane.desktop
|
|
-%define icondir %{_datadir}/sane/%{name}
|
|
|
|
|
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
|
+cat > src/xsane.desktop <<EOF
|
|
-cat > $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop <<EOF
|
|
|
|
[Desktop Entry]
|
|
[Desktop Entry]
|
|
Encoding=UTF-8
|
|
Encoding=UTF-8
|
|
Name=XSane
|
|
Name=XSane
|
|
@@ -76,28 +172,95 @@ Comment=Scanner program
|
|
Comment[ja]=スキャナを操作するツールです
|
|
Comment[ja]=スキャナを操作するツールです
|
|
Terminal=false
|
|
Terminal=false
|
|
Type=Application
|
|
Type=Application
|
|
-Icon=%{icondir}/xsane-48x48.xpm
|
|
+Icon=%{iconrootdir}/48x48/apps/xsane.png
|
|
Exec=xsane
|
|
Exec=xsane
|
|
-MultipleArgs=false
|
|
+X-MultipleArgs=false
|
|
Categories=Application;Graphics;
|
|
Categories=Application;Graphics;
|
|
EOF
|
|
EOF
|
|
|
|
|
|
|
|
+desktop-file-install \
|
|
|
|
+ --dir %{buildroot}%{_datadir}/applications \
|
|
|
|
+ src/xsane.desktop
|
|
|
|
+
|
|
|
|
+# icon files in multiple resolutions
|
|
|
|
+for res in 16 32 48 256; do
|
|
|
|
+ tdir="%{buildroot}%{iconrootdir}/${res}x${res}/apps"
|
|
|
|
+ install -m 0755 -d "$tdir"
|
|
|
|
+ install -m 0644 src/xsane-${res}x${res}.png "${tdir}/xsane.png"
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+# Register as an application to be visible in the software center
|
|
|
|
+#
|
|
|
|
+# NOTE: It would be *awesome* if this file was maintained by the upstream
|
|
|
|
+# project, translated and installed into the right place during `make install`.
|
|
|
|
+#
|
|
|
|
+# See http://www.freedesktop.org/software/appstream/docs/ for more details.
|
|
|
|
+#
|
|
|
|
+
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
|
|
|
|
+cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
+<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
|
|
|
|
+<!--
|
|
|
|
+EmailAddress: Oliver.Rauch@xsane.org
|
|
|
|
+SentUpstream: 2014-09-17
|
|
|
|
+-->
|
|
|
|
+<application>
|
|
|
|
+ <id type="desktop">xsane.desktop</id>
|
|
|
|
+ <metadata_license>CC0-1.0</metadata_license>
|
|
|
|
+ <summary>Scan images with a scanner</summary>
|
|
|
|
+ <description>
|
|
|
|
+ <p>
|
|
|
|
+ XSane is an application to scan images using a hardware scanner attached
|
|
|
|
+ to your computer.
|
|
|
|
+ It is able to save in a variety of image formats, including TIFF and JPEG
|
|
|
|
+ and can even save your scan as a PDF.
|
|
|
|
+ XSane also has support for scanning multiple pages and merging them into
|
|
|
|
+ a single document.
|
|
|
|
+ </p>
|
|
|
|
+ </description>
|
|
|
|
+ <url type="homepage">http://www.xsane.org/</url>
|
|
|
|
+ <screenshots>
|
|
|
|
+ <screenshot type="default">http://www.xsane.org/doc/xsane-save.jpg</screenshot>
|
|
|
|
+ </screenshots>
|
|
|
|
+</application>
|
|
|
|
+EOF
|
|
|
|
+
|
|
%find_lang %{name}
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
+
|
|
%clean
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
+
|
|
|
|
+%pre
|
|
|
|
+# remove obsolete gimp-plugin-mgr managed symlink
|
|
|
|
+if [ -L "%{gimpplugindir}/xsane" ]; then
|
|
|
|
+ rm -f "%{gimpplugindir}/xsane"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+
|
|
%files -f %{name}.lang
|
|
%files -f %{name}.lang
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%doc xsane.*
|
|
+%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
|
|
|
|
+%license xsane.COPYING
|
|
%{_bindir}/*
|
|
%{_bindir}/*
|
|
%{_mandir}/*/*
|
|
%{_mandir}/*/*
|
|
|
|
+%dir %{_datadir}/sane
|
|
%{_datadir}/sane/*
|
|
%{_datadir}/sane/*
|
|
-%{_libdir}/gimp/*/plug-ins/*
|
|
+%{gimpplugindir}/xsane
|
|
|
|
+%{_datadir}/appdata/%{name}.appdata.xml
|
|
|
|
+%{_datadir}/applications/xsane.desktop
|
|
%{_datadir}/pixmaps/xsane.xpm
|
|
%{_datadir}/pixmaps/xsane.xpm
|
|
-%config(missingok) %{_datadir}/applications/*
|
|
+%{iconrootdir}/*/apps/%{name}.png
|
|
|
|
+
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Mon May 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.999-3
|
|
|
|
+- rebuilt with lcms2.
|
|
|
|
+- dropped Patch0.
|
|
|
|
+- imported patches from rawhide.
|
|
|
|
+
|
|
* Mon Feb 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.999-2
|
|
* Mon Feb 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.999-2
|
|
- rebuild with libgphoto2-2.5.7
|
|
- rebuild with libgphoto2-2.5.7
|
|
- add BuildRequires: lcms-devel
|
|
- add BuildRequires: lcms-devel
|