AutoC |
01-29-2008 12:11 AM |
rpm spec file help
here is the rpm spec file i've written so far
Quote:
Version: 1.0
Release: 1
License: GPL
Group: Applications/Office
Source0: mmi-1.0-1.tar.gz
URL: NA
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
The Multi-Modal Interface reads input from a file and feeds it to the tty buffer
which displays it in the current window
#
# Prep Section
#
%prep
%setup -q
#
# Build Section
#
%build
make clean
make
#
# Install Section
#
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/lib/modules/$(shell uname -r)/kernel/drivers/char/
cp mmiModule.ko $RPM_BUILD_ROOT/lib/modules/$(shell uname -r)/kernel/drivers/char/
mkdir -p $RPM_BUILD_ROOT/etc/
echo "rm -rf /dev/char_device &> /dev/null" >> $RPM_BUILD_ROOT/etc/rc.local
echo "/bin/mknod /dev/char_device c 101 0" >>$RPM_BUILD_ROOT/etc/rc.local
echo "chmod 777 /dev/char_device" >>$RPM_BUILD_ROOT/etc/rc.local
echo "modprobe -a mmi" >> $RPM_BUILD_ROOT/etc/rc.local
echo "alias mmi mmiModule" >> $RPM_BUILD_ROOT/etc/modprobe.conf
mkdir -p $RPM_BUILD_ROOT/bin/
mkdir -p $RPM_BUILD_ROOT/dev/
$RPM_BUILD_ROOT/bin/mknod $RPM_BUILD_ROOT/dev/char_device c 101 0
chmod 777 $RPM_BUILD_ROOT/dev/char_device
depmod
modprobe -a mmi
#
# Clean Section
#
%clean
rm -rf $RPM_BUILD_ROOT
|
Usually its not that difficult but this is a character driver rpm.So any help with the install section is appreciated.All the commands to install the driver are in there.
Because it does everything in virtual directories,it created new versions of rc.local and modprobe.conf and says mknod couldnt be found.
|