[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Converting shell script to RPM



On Mon, 9 Jul 2001, Timur Tabi wrote:

>I'm trying to convert a shell script into an RPM, but I'm having a
>hard time understanding some parts of the RPM documentation.
>
>Basically, I need to create a very simple RPM file, one that just
>copies some binaries into particular directories.  I have two
>questions:
>
>1) The installer needs to locate the current /lib/modules directory.
>The shell script uses this code to set a variable called LIBMODDIR:
>
>LIBMODDIR=/lib/modules/`uname -r`
>
>And then copies files like this:
>
>(cd physalloc; make && cp physalloc.o $LIBMODDIR)
>(cd zeng_anvil/tdmcddk.sys; make && cp zeng_anvil.o $LIBMODDIR)
>(cd zfc; make && cp zfc.o $LIBMODDIR)
>
>Now, the RPM installer is only supposed to copy the binaries (i.e.
>physalloc.o, etc) to the proper locations.  How can I get my RPM spec
>file to do the same thing?
>
>2) I have a similar problem with the %files section.  Currently, mine
>looks like this:
>
>%files
>$LIBMODDIR/zcache.o
>$LIBMODDIR/physalloc.o
>$LIBMODDIR/zeng_anvil.o
>$LIBMODDIR/zfc.o
>/usr/sbin/zcload
>/usr/sbin/zcunload
>/usr/sbin/gdbloadmod
>
>I know this isn't valid.  How do I fix it?

$RPM_BUILD_ROOT

In your install stage, you should be installing to a buildroot,
not to the actual system in use.


----------------------------------------------------------------------
    Mike A. Harris  -  Linux advocate  -  Open Source advocate
       Opinions and viewpoints expressed are solely my own.
----------------------------------------------------------------------
Looking for Linux software?   http://freshmeat.net  http://www.rpmfind.net
http://filewatcher.org  http://www.coldstorage.org  http://sourceforge.net





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []