Re: RPM build file

From: Dave Hill (dave@minnie.demon.co.uk)
Date: Thu Feb 24 2000 - 00:02:33 PST

  • Next message: Peter Hackenberg: "Permissions of /dev/sg* and xsane, xscanimage (was Re: Report on , last CVS snapshot)"

    Petter Reinholdtsen wrote:
    >
    > I don't get it. Why can you not compile it with the normal prefix and
    > install it with your new prefix, like this:
    >
    > make all
    > make install prefix="$RPM_BUILD_ROOT"
    >
    > That way the bineries are compiled with the prefix given by configure,
    > and the programs are installed with prefix=$DESTDIR when copied into
    > place.
    >
    > This way no changes need to be done to the makefiles. If this is the
    > case, please send an updated RPM-spec and I'll put it in the
    > distribution.

    D'oh! You're right (but you need to set sysconfdir and datadir
    as well). What well-written Makefiles sane has!

    In that case, you still need part of the makefile patch, since,
    by default, find-scanner does not get installed.

    Dave

    -- 
    Dave Hill, Kempston, Bedford UK		dave@minnie.demon.co.uk
    Sicth munce ago, I cutn't evun spel enjuneer, and now I are one!
    
    

    Summary: Scanner Access Now Easy %define name sane %define version 1.0.1.20000220 Name: %{name} Version: %{version} Release: 1 Group: Applications/Multimedia Source: ftp://ftp.mostang.com/pub/sane/%{name}-%{version}.tar.gz Copyright: GPL BuildRoot: /var/tmp/%{name}-%{version}-root Packager: Dave Hill <dave@minnie.demon.co.uk> URL: http://www.mostang.com/sane

    %description SANE - Scanner Access Now Easy.

    SANE stands for "Scanner Access Now Easy" 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.).

    This package contains the SANE backends (drivers for scanners etc), the API itself and some frontends (user programs) for using SANE.

    If you want to build additional applications against SANE, you will also need to install the sane-devel package.

    %package devel Summary: Development files for applications which use SANE. Group: Development/Libraries Requires: sane = %{version}

    %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.

    This package should be installed if you want to develop or build programs that need the SANE C libraries and header files.

    %prep %setup -q

    %build # Debug version #CFLAGS="-g $RPM_OPT_FLAGS" ./configure --prefix=/usr --sysconfdir=/etc --datadir=/usr/share/sane # non-debug version CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --sysconfdir=/etc --datadir=/usr/share/sane make

    %install rm -rf $RPM_BUILD_ROOT

    make install prefix=$RPM_BUILD_ROOT/usr datadir=$RPM_BUILD_ROOT/usr/share/sane sysconfdir=$RPM_BUILD_ROOT/etc

    # Build documentation for the %doc directive so that we don't end up # with everything in one directory.

    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

    %clean rm -rf $RPM_BUILD_ROOT

    %post ldconfig

    %postun ldconfig

    %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

    /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/*

    %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

    --- 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 @@ -64,8 +66,9 @@ all: $(DESTINATIONS) -install: sane-config - $(INSTALL_PROGRAM) sane-config $(bindir)/sane-config +install: all + $(INSTALL_PROGRAM) sane-config $(bindir)/sane-config + $(INSTALL_PROGRAM) find-scanner $(bindir)/find-scanner sane-config: sane-config.in $(top_builddir)/config.status cd $(top_builddir) \

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Thu Feb 24 2000 - 00:18:55 PST