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

Converting shell script to RPM



Hi,

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?

--
Timur Tabi
Interactive Silicon






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