From b3a102b218b49420626b6f574484dc250378fc0c Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Wed, 16 Aug 2006 11:12:26 +0000 Subject: [PATCH] revamp scheme for integrating external GIMP plugins (#202545) use disttag --- xsane.conf.in | 1 + xsane.spec | 33 ++++++++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 xsane.conf.in diff --git a/xsane.conf.in b/xsane.conf.in new file mode 100644 index 0000000..57c055f --- /dev/null +++ b/xsane.conf.in @@ -0,0 +1 @@ +PLUGINFILE=@BINDIR@/xsane-gimp diff --git a/xsane.spec b/xsane.spec index f2a8c8e..a3b9938 100644 --- a/xsane.spec +++ b/xsane.spec @@ -3,10 +3,10 @@ Name: xsane Summary: An X Window System front-end for the SANE scanner interface. Version: 0.99 -Release: 5.1 +Release: 6%{?dist} Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz -Source1: xsane-install-gimp-plugin -Source2: xsane.desktop +Source1: xsane.desktop +Source2: xsane.conf.in Patch0: xsane-0.90-htmlview.patch Patch1: xsane-0.99-medium-definitions.patch Patch2: xsane-0.92_gimp2.0.patch @@ -21,6 +21,7 @@ BuildRequires: libtiff-devel BuildRequires: gettext-devel BuildRequires: automake BuildRequires: autoconf +BuildRequires: sed ExcludeArch: s390 s390x %description @@ -32,7 +33,8 @@ performing the scan and then manipulating the captured image. %package gimp Summary: A GIMP plug-in which provides the SANE scanner interface. Group: Applications/Multimedia -Prereq: /usr/bin/awk sh-utils fileutils +Requires(post): gimp >= 2:2.2.12-4 +Requires(preun): gimp >= 2:2.2.12-4 %description gimp This package provides the regular XSane frontend for the SANE scanner @@ -56,6 +58,8 @@ make LDFLAGS= mv src/xsane src/xsane-gimp +sed -e 's|@BINDIR@|%{_bindir}|g' < "%{SOURCE2} > xsane.conf + make clean %configure --with-install-root=%{buildroot} --disable-gimp make LDFLAGS= @@ -66,9 +70,6 @@ rm -rf %{buildroot} install src/xsane-gimp %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_sbindir} -install -m 0755 %SOURCE1 %{buildroot}%{_sbindir}/xsane-install-gimp-plugin - mkdir %{buildroot}%{_datadir}/applications desktop-file-install --vendor %{desktop_vendor} \ --dir %{buildroot}%{_datadir}/applications \ @@ -76,10 +77,12 @@ desktop-file-install --vendor %{desktop_vendor} \ --add-category X-Fedora \ --add-category Graphics \ --add-category Application \ - %{SOURCE2} + %{SOURCE1} %find_lang %{name} XSANE.lang +mkdir -p %{buildroot}%{_sysconfdir}/gimp/plugins.d +install -m 0644 xsane.conf %{buildroot}%{_sysconfdir}/gimp/plugins.d/xsane.conf %clean rm -rf %{buildroot} @@ -96,22 +99,26 @@ rm -rf %{buildroot} %files gimp %defattr(-,root,root) %{_bindir}/xsane-gimp -%{_sbindir}/xsane-install-gimp-plugin %dir %{_datadir}/sane %dir %{_datadir}/sane/xsane %{_datadir}/sane/xsane/*eula* +%{_sysconfdir}/gimp +%{_sysconfdir}/gimp/plugins.d +%config %{_sysconfdir}/gimp/plugins.d/xsane.conf %post gimp -%{_sbindir}/xsane-install-gimp-plugin --install -exit 0 +%{_sbindir}/gimp-plugin-mgr --install xsane %preun gimp if [ $1 = 0 ]; then - %{_sbindir}/xsane-install-gimp-plugin --uninstall + %{_sbindir}/gimp-plugin-mgr --uninstall xsane fi -exit 0 %changelog +* Wed Aug 16 2006 Nils Philippsen - 0.99-6 +- revamp scheme for integrating external GIMP plugins (#202545) +- use disttag + * Wed Jul 12 2006 Jesse Keating - 0.99-5.1 - rebuild