rpms/xsane/devel xsane-0.997-off-root-build.patch, NONE, 1.1 .cvsignore, 1.19, 1.20 sources, 1.19, 1.20 xsane.spec, 1.80, 1.81

Nils Philippsen nphilipp at fedoraproject.org
Wed Jun 23 09:32:06 UTC 2010


Author: nphilipp

Update of /cvs/pkgs/rpms/xsane/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv21723

Modified Files:
	.cvsignore sources xsane.spec 
Added Files:
	xsane-0.997-off-root-build.patch 
Log Message:
don't use gimp-plugin-mgr anymore
use off-root builds


xsane-0.997-off-root-build.patch:
 configure.in    |    2 +-
 doc/Makefile.in |   12 ++++++------
 lib/Makefile.in |    4 ++--
 src/Makefile.in |    8 ++++----
 4 files changed, 13 insertions(+), 13 deletions(-)

--- NEW FILE xsane-0.997-off-root-build.patch ---
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
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xsane/devel/.cvsignore,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- .cvsignore	31 Jul 2009 12:26:46 -0000	1.19
+++ .cvsignore	23 Jun 2010 09:32:06 -0000	1.20
@@ -1 +1,2 @@
 xsane-0.997.tar.gz
+xsane-0.997-5-autoconf.patch.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xsane/devel/sources,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- sources	31 Jul 2009 12:26:46 -0000	1.19
+++ sources	23 Jun 2010 09:32:06 -0000	1.20
@@ -1 +1,2 @@
 8377b3e3b792f3d2b7f13895467c7082  xsane-0.997.tar.gz
+94916349487cd0a8cddab7851e58573c  xsane-0.997-5-autoconf.patch.bz2


Index: xsane.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xsane/devel/xsane.spec,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -p -r1.80 -r1.81
--- xsane.spec	25 Feb 2010 11:00:46 -0000	1.80
+++ xsane.spec	23 Jun 2010 09:32:06 -0000	1.81
@@ -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: 4%{?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 manipulatin
 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
-%configure --enable-gimp
-make LDFLAGS=
 
-mv src/xsane src/xsane-gimp
+# needed for off-root building
+%define _configure ../configure
 
-sed -e 's|@BINDIR@|%{_bindir}|g' < "%{SOURCE2}" > xsane.conf
+pushd build-with-gimp
+%configure --enable-gimp
+make %{?_smp_mflags}
+popd
 
-make clean
+pushd build-without-gimp
 %configure --disable-gimp
-make LDFLAGS=
+make
+popd
 
 %install
 rm -rf %{buildroot}
+
+pushd build-without-gimp
 make DESTDIR=%{buildroot} install
+popd
 
-install src/xsane-gimp %{buildroot}%{_bindir}
+# 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,10 @@ fi
 %{_datadir}/sane/xsane
 
 %changelog
+* Wed Jun 23 2010 Nils Philippsen <nils at redhat.com> 0.997-5
+- don't use gimp-plugin-mgr anymore
+- use off-root builds
+
 * Thu Feb 25 2010 Nils Philippsen <nils at redhat.com> 0.997-4
 - quote RPM macros in changelog
 



More information about the scm-commits mailing list