Creation of extra directory within BUILD

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

 



My status is that iam learning to create a spec file 4 rpm.While creating it i account certain problems. First problem is that while running the %prep section there is creation of an extra directory on path usr/src/redhat/BUILD naming Sbull-1.1 untaring within it sbull-1.1({pakagename}-{ver}) (Source file)rather than untaring sbull-1.1 directly on to the BUILD. Second problem is while running the %install section at the time of installing rpm it could not find binary and source files.If it helps iam attaching the spec file,illustrating the list of tared files below,tared within directory sbull-1.1.
GPL
sbull.c
Makefile
sbull.1

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/
%define pkg sbull
%define ver 1.1
%define install_path opt/tahir2/

SUMMARY:A simple ramdisk.
NAME:Sbull
VERSION:1.1
RELEASE:1
URL:Nil
COPYRIGHT:GPL
GROUP:System Environment/kernel
SOURCE:sbull-1.1.tar.gz
PATCH:Nil
BUILDROOT:_/usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1

prefix: usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1
Packager: Muhammad Tahir Saleh <tahirsaleh@xxxxxxxxxxx>

%description
It is a kernel based cache management system, programs a ram in such a way that the ram provides faster acces to memory.

%prep
%setup -c
%build

cd /usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1
make clean
make
#insmod sbull.ko
#rmmod sbull.ko

%install
rm -rf $RPM_BUILD_ROOT
install -D /usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1/sbull.ko ${RPM_BUILD_ROOT}/usr/bin/sbull install -D /usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1/sbull.1 ${RPM_BUILD_ROOT}/usr/share/man/man1/sbull.1 install -D /usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1/GPL ${RPM_BUILD_ROOT}/usr/share/docs/sbull-1.1/GPL

cd /usr/src/redhat/BUILD/Sbull-1.1


cp -a sbull-1.1 /opt/

rpm -ivv --prefix /opt/tahir2 sbull-1.1-1.i386.rpm

rmmod sbull.ko
%files

%dir /usr/src/redhat/BUILD/sbull-1.1/*
%defattr(-,root,root)


%clean

cd /usr/src/redhat/BUILD
rm -rf sbull-1.1

%post


mkdir /tahir2

cd /usr/src/redhat/BUILD
cp -a sbull-1.1 /tahir2
cd /usr/src/redhat/BUILD
rm -rf sbull-1.1
%changelog
* Sat Jan 27 2007 Muhammad Tahir Saleh<tahirsaleh@xxxxxxxxxxx>
 Created RPM spec file



_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux