don't use gimp-plugin-mgr anymore use off-root builds quote RPM macros in

changelog
This commit is contained in:
Nils Philippsen 2010-06-24 09:17:10 +00:00
parent f7b9909267
commit 2bc7320289
6 changed files with 155 additions and 31 deletions

View File

@ -1 +1,2 @@
xsane-0.997.tar.gz
xsane-0.997-5-autoconf.patch.bz2

1
import.log Normal file
View File

@ -0,0 +1 @@
xsane-0_997-5_fc14:F-13:xsane-0.997-5.fc14.src.rpm:1277370836

View File

@ -1 +1,2 @@
8377b3e3b792f3d2b7f13895467c7082 xsane-0.997.tar.gz
94916349487cd0a8cddab7851e58573c xsane-0.997-5-autoconf.patch.bz2

View File

@ -0,0 +1,105 @@
diff -up xsane-0.997/configure.in.off-root-build xsane-0.997/configure.in
--- xsane-0.997/configure.in.off-root-build 2009-07-21 20:37:20.000000000 +0200
+++ xsane-0.997/configure.in 2010-06-23 10:52:32.072734684 +0200
@@ -312,4 +312,4 @@ echo "* --------------------------------
echo "* ... PLEASE READ SANE DOCUMENTATION BEFORE STARTING XSANE ... *"
echo "* ------------------------------------------------------------ *"
echo "****************************************************************"
-cat xsane.NEWS
+cat ${srcdir}/xsane.NEWS
diff -up xsane-0.997/doc/Makefile.in.off-root-build xsane-0.997/doc/Makefile.in
--- xsane-0.997/doc/Makefile.in.off-root-build 2006-01-01 14:08:11.000000000 +0100
+++ xsane-0.997/doc/Makefile.in 2010-06-23 11:07:26.792736949 +0200
@@ -57,14 +57,14 @@ install: $(MANPAGES)
$(MKINSTALLDIRS) $(DESTDIR)$(datadir)
$(MKINSTALLDIRS) $(DESTDIR)$(xsanedocdir)
- @for page in *.html; do\
+ @for page in $(notdir $(wildcard $(srcdir)/*.html)); do \
echo installing $${page} in $(DESTDIR)$(xsanedocdir)/$${page}...; \
- $(INSTALL_DATA) $${page} $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \
+ $(INSTALL_DATA) $(srcdir)/$${page} $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \
done
- @for image in *.jpg; do\
+ @for image in $(notdir $(wildcard $(srcdir)/*.jpg)); do \
echo installing $${image} in $(DESTDIR)$(xsanedocdir)/$${image}...; \
- $(INSTALL_DATA) $${image} $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \
+ $(INSTALL_DATA) $(srcdir)/$${image} $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \
done
uninstall:
@@ -73,12 +73,12 @@ uninstall:
rm -f $(DESTDIR)$(mandir)/man1/$${page} || exit 1; \
done
- @for page in *.html; do\
+ @for page in $(notdir $(wildcard $(srcdir)/*.html)); do \
echo uninstalling $(DESTDIR)$(xsanedocdir)/$${page}...; \
rm -f $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \
done
- @for image in *.jpg; do\
+ @for image in $(notdir $(wildcard $(srcdir)/*.jpg)); do \
echo uninstalling $${image} in $(DESTDIR)$(xsanedocdir)/$${image}...; \
rm -f $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \
done
diff -up xsane-0.997/include/Makefile.in.off-root-build xsane-0.997/include/Makefile.in
diff -up xsane-0.997/intl/Makefile.in.off-root-build xsane-0.997/intl/Makefile.in
diff -up xsane-0.997/lib/Makefile.in.off-root-build xsane-0.997/lib/Makefile.in
--- xsane-0.997/lib/Makefile.in.off-root-build 2003-11-22 10:51:42.000000000 +0100
+++ xsane-0.997/lib/Makefile.in 2010-06-23 11:03:23.760737284 +0200
@@ -30,7 +30,7 @@ RANLIB = @RANLIB@
CC = @CC@
INCLUDES = -I. -I$(srcdir) \
- -I$(top_builddir)/include/sane -I$(top_srcdir)/include
+ -I$(top_builddir)/include/sane -I$(top_builddir)/include -I$(top_srcdir)/include
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
@@ -68,7 +68,7 @@ uninstall:
check:
depend:
- makedepend -I. -I../include *.c
+ makedepend -I. -I../include $(srcdir)/*.c
clean:
rm -f *.out *.o *.lo *~ *.a *.bak $(TESTPROGRAMS)
diff -up xsane-0.997/Makefile.in.off-root-build xsane-0.997/Makefile.in
diff -up xsane-0.997/po/Makefile.in.off-root-build xsane-0.997/po/Makefile.in
diff -up xsane-0.997/src/Makefile.in.off-root-build xsane-0.997/src/Makefile.in
--- xsane-0.997/src/Makefile.in.off-root-build 2008-03-29 10:51:00.000000000 +0100
+++ xsane-0.997/src/Makefile.in 2010-06-23 11:01:27.031779998 +0200
@@ -77,10 +77,10 @@ install: $(PROGRAMS)
$(INSTALL_DATA) $(srcdir)/xsane-eula.txt $(DESTDIR)$(sanedatadir)/xsane/xsane-eula.txt
$(INSTALL_DATA) $(srcdir)/xsane.desktop $(DESTDIR)$(desktopappdir)/xsane.desktop
$(INSTALL_DATA) $(srcdir)/xsane.xpm $(DESTDIR)$(pixmapdir)/xsane.xpm
- @for logo in *-logo.xpm; do \
+ @for logo in $(notdir $(wildcard $(srcdir)/*-logo.xpm)); do \
echo installing $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
$(INSTALL_DATA) $(srcdir)/$${logo} $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
- done
+ done
uninstall:
@for program in $(BINPROGS); do \
@@ -99,7 +99,7 @@ uninstall:
rm -f $(DESTDIR)$(desktopappdir)/xsane.desktop
echo uninstalling $(DESTDIR)$(pixmapdir)/xsane.xpm
rm -f $(DESTDIR)$(pixmapdir)/xsane.xpm
- @for logo in *-logo.xpm; do \
+ @for logo in $(notdir $(wildcard $(srcdir)/*-logo.xpm)); do \
echo uninstalling $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
rm -f $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
done
@@ -119,7 +119,7 @@ distclean: clean
rm -f Makefile $(PROGRAMS)
depend:
- makedepend $(INCLUDES) *.c
+ makedepend $(INCLUDES) $(srcdir)/*.c
.PHONY: all install depend clean distclean

View File

@ -1 +0,0 @@
PLUGINFILE=@BINDIR@/xsane-gimp

View File

@ -1,13 +1,14 @@
# if you rebuild, please change bugtracker_url accordingly:
%global bugtracker_url http://bugzilla.redhat.com
%global gimpplugindir %(gimptool --gimpplugindir)/plug-ins
Name: xsane
Summary: X Window System front-end for the SANE scanner interface
Version: 0.997
Release: 3%{?dist}
Release: 5%{?dist}
Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
Source1: xsane.desktop
Source2: xsane.conf.in
# distro-specific: use "xdg-open" instead of "netscape" to launch help browser
Patch0: xsane-0.995-xdg-open.patch
# submitted to upstream (Oliver Rauch) via email, 2009-08-18
@ -15,6 +16,11 @@ 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"
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
# autoconf-generated files
Patch10: xsane-0.997-5-autoconf.patch.bz2
License: GPLv2+
URL: http://www.xsane.org/
Group: Applications/Multimedia
@ -39,8 +45,6 @@ performing the scan and then manipulating the captured image.
Summary: GIMP plug-in providing the SANE scanner interface
Group: Applications/Multimedia
Requires: gimp >= 2:2.2.12-4
Requires(post): gimp >= 2:2.2.12-4
Requires(preun): gimp >= 2:2.2.12-4
Requires: xsane-common
%description gimp
@ -68,26 +72,42 @@ done
%patch0 -p1 -b .xdg-open
%patch1 -p1 -b .close-fds
%patch2 -p1 -b .no-eula
%patch3 -p1 -b .off-root-build
%patch10 -p1 -b .autoconf
# in-root config.h breaks off-root building
rm include/config.h
mkdir build-with-gimp
mkdir build-without-gimp
%build
CC='gcc -DXSANE_BUGTRACKER_URL=\"%{bugtracker_url}\"'
export CC
# needed for off-root building
%define _configure ../configure
pushd build-with-gimp
%configure --enable-gimp
make LDFLAGS=
make %{?_smp_mflags}
popd
mv src/xsane src/xsane-gimp
sed -e 's|@BINDIR@|%{_bindir}|g' < "%{SOURCE2}" > xsane.conf
make clean
pushd build-without-gimp
%configure --disable-gimp
make LDFLAGS=
make
popd
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
install src/xsane-gimp %{buildroot}%{_bindir}
pushd build-without-gimp
make DESTDIR=%{buildroot} install
popd
# install GIMP plugin
install -m 0755 -d %{buildroot}%{gimpplugindir}
install -m 0755 build-with-gimp/src/xsane %{buildroot}%{gimpplugindir}
# use our own desktop file
rm %{buildroot}%{_datadir}/applications/xsane.desktop
@ -97,22 +117,13 @@ desktop-file-install --vendor fedora \
%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}
%post gimp
if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then
%{_sbindir}/gimp-plugin-mgr --install xsane
fi
%preun gimp
if [ $1 = 0 ]; then
if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then
%{_sbindir}/gimp-plugin-mgr --uninstall xsane
fi
%pre gimp
# remove obsolete gimp-plugin-mgr managed symlink
if [ -L "%{gimpplugindir}/xsane" ]; then
rm -f "%{gimpplugindir}/xsane"
fi
%files -f XSANE.lang
@ -125,8 +136,7 @@ fi
%files gimp
%defattr(-,root,root)
%{_bindir}/xsane-gimp
%config(noreplace) %{_sysconfdir}/gimp/plugins.d/xsane.conf
%{gimpplugindir}/xsane
%files common
%defattr(-,root,root)
@ -134,6 +144,13 @@ fi
%{_datadir}/sane/xsane
%changelog
* Wed Jun 23 2010 Nils Philippsen <nils@redhat.com> 0.997-5
- don't use gimp-plugin-mgr anymore
- use off-root builds
* Thu Feb 25 2010 Nils Philippsen <nils@redhat.com> 0.997-4
- quote RPM macros in changelog
* Tue Aug 18 2009 Nils Philippsen <nils@redhat.com>
- explain patches
@ -166,8 +183,8 @@ fi
- Merge review (#226658):
- convert documentation files to UTF-8
- don't BR: sed
- don't own %{_datadir}/applications, %{_sysconfdir}/gimp,
%{_sysconfdir}/gimp/plugins.d
- don't own %%{_datadir}/applications, %%{_sysconfdir}/gimp,
%%{_sysconfdir}/gimp/plugins.d
- don't package unnecessary documentation
* Mon Mar 02 2009 Nils Philippsen <nils@redhat.com> - 0.996-6