sane-project-website/old-archive/2000-02/0313.html

445 wiersze
16 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: RPM build file</TITLE>
<META NAME="Author" CONTENT="Dave Hill (dave@minnie.demon.co.uk)">
<META NAME="Subject" CONTENT="Re: RPM build file">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: RPM build file</H1>
<!-- received="Wed Feb 23 12:21:34 2000" -->
<!-- isoreceived="20000223202134" -->
<!-- sent="Wed, 23 Feb 2000 11:30:01 +0000" -->
<!-- isosent="20000223113001" -->
<!-- name="Dave Hill" -->
<!-- email="dave@minnie.demon.co.uk" -->
<!-- subject="Re: RPM build file" -->
<!-- id="38B3C4B9.79CC4B46@minnie.demon.co.uk" -->
<!-- inreplyto="200002230228.KAA28727@xena.ee.uwa.edu.au" -->
<STRONG>From:</STRONG> Dave Hill (<A HREF="mailto:dave@minnie.demon.co.uk?Subject=Re:%20RPM%20build%20file&In-Reply-To=&lt;38B3C4B9.79CC4B46@minnie.demon.co.uk&gt;"><EM>dave@minnie.demon.co.uk</EM></A>)<BR>
<STRONG>Date:</STRONG> Wed Feb 23 2000 - 03:30:01 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0314.html">Peter Kirchgessner: "Re: HP ScanJet 3C...it's working now"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0312.html">Mike Bhola: "Re: WinSane (sortof)"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0295.html">Petter Reinholdtsen: "Re: RPM build file"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0318.html">Petter Reinholdtsen: "Re: RPM build file"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#313">[ date ]</A>
<A HREF="index.html#313">[ thread ]</A>
<A HREF="subject.html#313">[ subject ]</A>
<A HREF="author.html#313">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Petter Reinholdtsen wrote:
<BR>
<EM>&gt;
</EM><BR>
<EM>&gt; [Dave Hill]
</EM><BR>
<EM>&gt; &gt; I have an RPM build file to build sane if anyone is interested in
</EM><BR>
<EM>&gt; &gt; adding it to the CVS for me.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Sounds good to me. Post the file and the patch to the list so we can
</EM><BR>
<EM>&gt; have a look at it.
</EM><BR>
<P>attached
<BR>
<P><EM>&gt; Will you be building RPMs when the new release is done?
</EM><BR>
<P>Can do (for i386 only!). They should then be transferred to the
<BR>
ftp site.
<BR>
<P><EM>&gt; &gt; It requires a simple patch to the Makefile.in files to allow a
</EM><BR>
<EM>&gt; &gt; variable $(DESTDIR) to be prepended to all the install paths whilst
</EM><BR>
<EM>&gt; &gt; building the binary RPM.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; I believe the normal GNU autoconf name for this variable is $(prefix).
</EM><BR>
<P>It's not quite the same as $(prefix). $(prefix) says where the s/w
<BR>
is to be installed so that, for example, the correct paths can be
<BR>
included in executables. The RPM build process requires that the
<BR>
software be &quot;dummy installed&quot; into (normally) /var/tmp/&lt;package&gt;
<BR>
and then the RPM file is built from that for later installation.
<BR>
<P>So, as is in the rpm file attached, configure is run with the options
<BR>
<P>--prefix=/usr --sysconfdir=/etc --datadir=/usr/share/sane
<BR>
<P>but then needs to be &quot;installed&quot; in /var/tmp/sane/...
<BR>
<P>This is normally done in RPM packages by setting a $(DESTDIR)
<BR>
variable which is picked up by the install Makefile.
<BR>
<P>The RPM spec file attached is the one I used to build from my
<BR>
CVS tree dated 2000/02/20, hence the odd version number!
<BR>
<P>Dave
<BR>
<P><PRE>
--
Dave Hill, Kempston, Bedford UK <A HREF="mailto:dave@minnie.demon.co.uk?Subject=Re:%20RPM%20build%20file&In-Reply-To=&lt;38B3C4B9.79CC4B46@minnie.demon.co.uk&gt;">dave@minnie.demon.co.uk</A>
Sicth munce ago, I cutn't evun spel enjuneer, and now I are one!
</PRE>
<P>
Summary: Scanner Access Now Easy
%define name sane
%define version 1.0.1.20000220
Name: %{name}
Version: %{version}
Release: 1
Group: Applications/Multimedia
Source: <A HREF="ftp://ftp.mostang.com/pub/sane/%{name}-%{version}.tar.gz">ftp://ftp.mostang.com/pub/sane/%{name}-%{version}.tar.gz</A>
Patch1: %{name}-rhmakefile.patch
Copyright: GPL
BuildRoot: /var/tmp/%{name}-%{version}-root
Packager: Dave Hill &lt;<A HREF="mailto:dave@minnie.demon.co.uk?Subject=Re:%20RPM%20build%20file&In-Reply-To=&lt;38B3C4B9.79CC4B46@minnie.demon.co.uk&gt;">dave@minnie.demon.co.uk</A>&gt;
URL: <A HREF="http://www.mostang.com/sane">http://www.mostang.com/sane</A>
<P>%description
SANE - Scanner Access Now Easy.
<P>SANE stands for &quot;Scanner Access Now Easy&quot; and is an application
programming interface (API) that provides standardized access to any
raster image scanner hardware (flatbed scanner, hand-held scanner,
video- and still-cameras, frame-grabbers, etc.).
<P>This package contains the SANE backends (drivers for scanners etc), the
API itself and some frontends (user programs) for using SANE.
<P>If you want to build additional applications against SANE, you will also
need to install the sane-devel package.
<P>%package devel
Summary: Development files for applications which use SANE.
Group: Development/Libraries
Requires: sane = %{version}
<P>%description devel
This package contains the SANE C libraries and header files. These
development files will simplify the process of writing programs which
use SANE.
<P>This package should be installed if you want to develop or build
programs that need the SANE C libraries and header files.
<P>%prep
%setup -q
%patch1 -p 1 -b .rhmakefile
<P>%build
# Debug version
#CFLAGS=&quot;-g $RPM_OPT_FLAGS&quot; ./configure --prefix=/usr --sysconfdir=/etc --datadir=/usr/share/sane
# non-debug version
CFLAGS=&quot;$RPM_OPT_FLAGS&quot; ./configure --prefix=/usr --sysconfdir=/etc --datadir=/usr/share/sane
make
<P>%install
rm -rf $RPM_BUILD_ROOT
<P>make DESTDIR=&quot;$RPM_BUILD_ROOT&quot; install
<P># Build documentation for the %doc directive so that we don't end up
# with everything in one directory.
<P>rm -rf .doc
mkdir .doc
mkdir .doc/frontend
cp frontend/xcam.README .doc/frontend
mkdir .doc/tools
cp tools/README .doc/tools
mkdir .doc/backend
cp backend/*.desc .doc/backend
cp backend/GUIDE .doc/backend
cp backend/djpeg.README .doc/backend
cp backend/hp.README .doc/backend
cp backend/hp.TODO .doc/backend
cp backend/umax.BUGS .doc/backend
cp backend/umax.CHANGES .doc/backend
cp backend/umax.FAQ backend/umax.TODO .doc/backend
cp -r doc .doc/doc
rm -f .doc/doc/*.man
rm -f .doc/doc/*.5
rm -f .doc/doc/*.1
rm -f .doc/doc/Makefile*
rm -rf .doc/doc/CVS
<P>%clean
rm -rf $RPM_BUILD_ROOT
<P>%post
ldconfig
<P>%postun
ldconfig
<P>%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog LEVEL2 LICENSE NEWS PROBLEMS PROJECTS
%doc README TODO
# Copy our prepared doc directories.
%doc .doc/frontend
%doc .doc/backend
%doc .doc/doc
<P>/usr/bin/find-scanner
/usr/bin/scanimage
/usr/bin/xcam
/usr/bin/xscanimage
/usr/sbin/saned
%dir /usr/lib/sane
/usr/lib/*.so*
/usr/lib/sane/*.so*
/usr/man/man1/*
/usr/man/man5/*
%dir /usr/share/sane
/usr/share/sane/sane-style.rc
%dir /etc/sane.d
%config /etc/sane.d/*
<P>%files devel
%defattr(-,root,root)
/usr/bin/sane-config
%dir /usr/include/sane
/usr/include/sane/*
/usr/lib/*.a
/usr/lib/sane/*.a
# Are these needed?
#/usr/lib/*.la
#/usr/lib/sane/*.la
<P>
<P>
diff -ur sane-devel-20000123.orig/Makefile.in sane-devel-20000123/Makefile.in
--- sane-devel-20000123.orig/Makefile.in Mon Aug 9 19:05:39 1999
+++ sane-devel-20000123/Makefile.in Wed Jan 26 13:49:43 2000
@@ -20,6 +20,8 @@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
MKDIR = $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -38,10 +40,10 @@
install: install-recursive
- $(MKDIR) $(includedir)/sane
+ $(MKDIR) $(DESTDIR)$(includedir)/sane
@list=&quot;$(INSTALLED_INCLUDES)&quot;; for file in $$list; do \
- echo installing $${file} in $(includedir)/sane...; \
- $(INSTALL_DATA) $${file} $(includedir)/sane || exit 1; \
+ echo installing $${file} in $(DESTDIR)$(includedir)/sane...; \
+ $(INSTALL_DATA) $${file} $(DESTDIR)$(includedir)/sane || exit 1; \
done
clean: clean-recursive
diff -ur sane-devel-20000123.orig/backend/Makefile.in sane-devel-20000123/backend/Makefile.in
--- sane-devel-20000123.orig/backend/Makefile.in Sun Jan 23 14:50:48 2000
+++ sane-devel-20000123/backend/Makefile.in Wed Jan 26 14:01:11 2000
@@ -22,6 +22,8 @@
oldincludedir = /usr/include
configdir = ${sysconfdir}/sane.d
+DESTDIR =
+
V_MAJOR = @V_MAJOR@
V_MINOR = @V_MINOR@
V_REV = @V_REV@
@@ -87,16 +89,16 @@
all: $(LIBS) libsane.la
install:
- $(MKDIR) $(libdir) $(libsanedir) $(configdir)
+ $(MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(libsanedir) $(DESTDIR)$(configdir)
@list=&quot;$(LIBS)&quot;; for be in $$list; do \
- echo installing $${be} in $(libsanedir)...; \
- $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${be} $(libsanedir)/$${be} \
+ echo installing $${be} in $(DESTDIR)$(libsanedir)...; \
+ $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${be} $(DESTDIR)$(libsanedir)/$${be} \
|| exit 1; \
done
- @$(LIBTOOL) $(MINST) --finish $(libsanedir)
+ @$(LIBTOOL) $(MINST) --finish $(DESTDIR)$(libsanedir)
@# Assume the dll name without any versions is last
@dllend=`grep library_names= libsane-dll.la |rev|cut -d&quot; &quot; -f1|rev|sed 's/libsane-dll.//'|cut -d\' -f1`; \
- list=&quot;$(ALL_BACKENDS)&quot;; cd $(libsanedir) &amp;&amp; for be in $$list; do \
+ list=&quot;$(ALL_BACKENDS)&quot;; cd $(DESTDIR)$(libsanedir) &amp;&amp; for be in $$list; do \
file=libsane-$${be}.$$dllend.$(V_MAJOR); \
lib=`grep dlname= libsane-$${be}.la | cut -f2 -d&quot;'&quot;`; \
if test ! -f $${file} -a -n &quot;$${lib}&quot;; then \
@@ -105,22 +107,22 @@
done
@# Assume the dll name without any versions is last
@dllend=`grep library_names= libsane-dll.la |rev|cut -f1 -d&quot; &quot;|rev|sed 's/libsane-dll.//'|cut -f1 -d\'`; \
- rm -f $(libdir)/libsane.a $(libdir)/libsane.$$dllend \
- $(libdir)/libsane.$$dllend.$(V_MAJOR)*; \
- $(LN_S) sane/libsane-dll.a $(libdir)/libsane.a; \
- $(LN_S) sane/libsane-dll.$$dllend $(libdir)/libsane.$$dllend ; \
- cd $(libsanedir) &amp;&amp; for n in libsane-dll.$$dllend.$(V_MAJOR)*; do \
+ rm -f $(DESTDIR)$(libdir)/libsane.a $(DESTDIR)$(libdir)/libsane.$$dllend \
+ $(DESTDIR)$(libdir)/libsane.$$dllend.$(V_MAJOR)*; \
+ $(LN_S) sane/libsane-dll.a $(DESTDIR)$(libdir)/libsane.a; \
+ $(LN_S) sane/libsane-dll.$$dllend $(DESTDIR)$(libdir)/libsane.$$dllend ; \
+ cd $(DESTDIR)$(libsanedir) &amp;&amp; for n in libsane-dll.$$dllend.$(V_MAJOR)*; do \
nn=`echo $$n | sed 's,^libsane-dll,libsane,'`; \
(cd ..; $(LN_S) sane/$$n $$nn); \
done || exit 1
- $(INSTALL_PROGRAM) libsane.la $(libdir)/libsane.la
+ $(INSTALL_PROGRAM) libsane.la $(DESTDIR)$(libdir)/libsane.la
@list=&quot;$(CONFIGS)&quot;; for cfg in $$list; do \
if test ! -r $(srcdir)/$${cfg}; then continue; fi; \
- if test -f $(configdir)/$${cfg}; then \
- echo NOT overwriting $${cfg} in $(configdir)...; \
+ if test -f $(DESTDIR)$(configdir)/$${cfg}; then \
+ echo NOT overwriting $${cfg} in $(DESTDIR)$(configdir)...; \
else \
- echo installing $${cfg} in $(configdir)...; \
- $(INSTALL_DATA) $(srcdir)/$${cfg} $(configdir)/$${cfg} || exit 1; \
+ echo installing $${cfg} in $(DESTDIR)$(configdir)...; \
+ $(INSTALL_DATA) $(srcdir)/$${cfg} $(DESTDIR)$(configdir)/$${cfg} || exit 1; \
fi; \
done
diff -ur sane-devel-20000123.orig/doc/Makefile.in sane-devel-20000123/doc/Makefile.in
--- sane-devel-20000123.orig/doc/Makefile.in Sun Nov 14 02:31:57 1999
+++ sane-devel-20000123/doc/Makefile.in Wed Jan 26 13:59:24 2000
@@ -21,6 +21,8 @@
oldincludedir = /usr/include
configdir = ${sysconfdir}/sane.d
+DESTDIR =
+
MKDIR = $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -51,14 +53,14 @@
-e 's|@SBINDIR@|$(sbindir)|g' $^ &gt;$@
install: $(MANPAGES)
- $(MKDIR) $(mandir)/man1 $(mandir)/man5
+ $(MKDIR) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5
@for page in $(SECT1); do \
- echo installing $${page} in $(mandir)/man1/$${page}...; \
- $(INSTALL_DATA) $${page} $(mandir)/man1/$${page} || exit 1; \
+ echo installing $${page} in $(DESTDIR)$(mandir)/man1/$${page}...; \
+ $(INSTALL_DATA) $${page} $(DESTDIR)$(mandir)/man1/$${page} || exit 1; \
done
@for page in $(SECT5); do \
- echo installing $${page} in $(mandir)/man5/$${page}...; \
- $(INSTALL_DATA) $${page} $(mandir)/man5/$${page} || exit 1; \
+ echo installing $${page} in $(DESTDIR)$(mandir)/man5/$${page}...; \
+ $(INSTALL_DATA) $${page} $(DESTDIR)$(mandir)/man5/$${page} || exit 1; \
done
docs: ps html
diff -ur sane-devel-20000123.orig/frontend/Makefile.in sane-devel-20000123/frontend/Makefile.in
--- sane-devel-20000123.orig/frontend/Makefile.in Mon Aug 9 19:05:40 1999
+++ sane-devel-20000123/frontend/Makefile.in Wed Jan 26 13:57:32 2000
@@ -66,16 +66,16 @@
all: $(PROGRAMS)
install: $(PROGRAMS)
- $(MKDIR) $(bindir) $(sbindir) $(datadir)
+ $(MKDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(datadir)
@for program in $(BINPROGS); do \
$(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} \
- $(bindir)/$${program}; \
+ $(DESTDIR)$(bindir)/$${program}; \
done
@for program in $(SBINPROGS); do \
$(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} \
- $(sbindir)/$${program}; \
+ $(DESTDIR)$(sbindir)/$${program}; \
done
- $(INSTALL_DATA) $(srcdir)/sane-style.rc $(datadir)/sane-style.rc
+ $(INSTALL_DATA) $(srcdir)/sane-style.rc $(DESTDIR)$(datadir)/sane-style.rc
test: test.o $(LIBSANE) $(LIBLIB)
@$(LIBTOOL) $(MLINK) $(LINK) test.o $(LIBSANE) $(LIBLIB) $(LIBS)
diff -ur sane-devel-20000123.orig/japi/Makefile.in sane-devel-20000123/japi/Makefile.in
--- sane-devel-20000123.orig/japi/Makefile.in Mon Aug 9 19:06:00 1999
+++ sane-devel-20000123/japi/Makefile.in Wed Jan 26 14:01:25 2000
@@ -25,6 +25,8 @@
oldincludedir = /usr/include
configdir = ${sysconfdir}/sane.d
+DESTDIR =
+
V_MAJOR = @V_MAJOR@
V_MINOR = @V_MINOR@
DLL_PRELOAD = @DLL_PRELOAD@
@@ -90,10 +92,10 @@
# Install library. Don't know where to install .class files yet.
install:
- $(MKDIR) $(libdir) $(configdir)
+ $(MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(configdir)
$(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) libsanej.la \
- $(libdir)/libsanej.la || exit 1;
- @$(LIBTOOL) $(MINST) --finish $(libdir)
+ $(DESTDIR)$(libdir)/libsanej.la || exit 1;
+ @$(LIBTOOL) $(MINST) --finish $(DESTDIR)$(libdir)
Sane.c: Sane.h
--- sane-devel-20000123.orig/tools/Makefile.in Fri Jan 7 13:44:28 2000
+++ sane-devel-20000123/tools/Makefile.in Wed Jan 26 15:37:20 2000
@@ -22,6 +22,8 @@
oldincludedir = /usr/include
configdir = ${sysconfdir}/sane.d
+DESTDIR =
+
MKDIR = $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -64,8 +66,9 @@
all: $(DESTINATIONS)
-install: sane-config
- $(INSTALL_PROGRAM) sane-config $(bindir)/sane-config
+install: all
+ $(INSTALL_PROGRAM) sane-config $(DESTDIR)$(bindir)/sane-config
+ $(INSTALL_PROGRAM) find-scanner $(DESTDIR)$(bindir)/find-scanner
sane-config: sane-config.in $(top_builddir)/config.status
cd $(top_builddir) \
<P><P><P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20RPM%20build%20file&In-Reply-To=&lt;38B3C4B9.79CC4B46@minnie.demon.co.uk&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0314.html">Peter Kirchgessner: "Re: HP ScanJet 3C...it's working now"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0312.html">Mike Bhola: "Re: WinSane (sortof)"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0295.html">Petter Reinholdtsen: "Re: RPM build file"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0318.html">Petter Reinholdtsen: "Re: RPM build file"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#313">[ date ]</A>
<A HREF="index.html#313">[ thread ]</A>
<A HREF="subject.html#313">[ subject ]</A>
<A HREF="author.html#313">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Wed Feb 23 2000 - 12:22:47 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>