Difference between revisions of "RPM"

From Kiwix
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Fedora RPM =
= Fedora =


First, set a you build enviroment ( never, never, never build a rpm package how root ):
First, set a you build enviroment ( never, never, never build a rpm package how root ):
<source lang="bash">
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
</source>


# mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
Now, create your macro definition to your build path:
<source lang="bash">
echo "%_topdir /home/`echo $USER`/rpmbuild" > ~/.rpmmacros
</source>


Now, create your macro definition for your build path:
To rebuild your own rpm for Fedora, download the last package version to src.rpm from: http://richzendy.org/repo/kiwix/


# echo "%_topdir /home/`echo $USER`/rpmbuild" > ~/.rpmmacros
Also you must have installed the unac package (libunac) package, download and install:
 
<source lang="bash">
For rebuild your own rpm for fedora, download the last version to src.rpm package from:
rpm -ivh http://richzendy.org/repo/kiwix/unac-1.7.0-1.i386.rpm
 
</source>
http://richzendy.org/repo/kiwix/
 
Also you must have installed the unac package ( also know how libunac ) package, download and install:
 
# rpm -ivh http://richzendy.org/repo/kiwix/unac-1.7.0-1.i386.rpm


now try this:
now try this:
<source lang="bash">
rpmbuild --rebuild kiwix-1.9.svn_09122009-1.src.rpm
</source>


# rpmbuild --rebuild kiwix-1.9.svn_09122009-1.src.rpm
Your can find the rpm package built to you in ~/rpmbuild/RPMS
 
Your can find the rpm package built for you in ~/rpmbuild/RPMS


if you can play with a .spec file and built a kiwix rpm with others options, must extrat a rpm package:
== Rebuild from .spec file ==


# rpm2cpio kiwix-1.9.svn_09122009-1.src.rpm | cpio -idmv
If you know how to deal with .spec file and want to built a kiwix rpm with others options, you have to:


put the files and move for your build enviroment:
unpack a RMP package:
<source lang="bash">
rpm2cpio kiwix-1.9.svn_09122009-1.src.rpm | cpio -idmv
</source>


# mv kiwix-1.9.svn_09122009.tar.gz ~/rpmbuild/SOURCES/
move the extracted files in your build enviroment like following:
# mv kiwix.spec ~/rpmbuild/SPECS/
<source lang="bash">
mv kiwix-1.9.svn_09122009.tar.gz ~/rpmbuild/SOURCES/
mv kiwix.spec ~/rpmbuild/SPECS/
</source>


Edit and modify to.spec file, and rebuild from .spec with:
edit and modify the .spec file, and rebuild the RPM:
<source lang="bash">
# rpmbuild -ba ~/rpmbuild/SPECS/kiwix.spec
rpmbuild -ba ~/rpmbuild/SPECS/kiwix.spec
</source>

Latest revision as of 10:27, 12 December 2009

Fedora

First, set a you build enviroment ( never, never, never build a rpm package how root ):

mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

Now, create your macro definition to your build path:

echo "%_topdir /home/`echo $USER`/rpmbuild" > ~/.rpmmacros

To rebuild your own rpm for Fedora, download the last package version to src.rpm from: http://richzendy.org/repo/kiwix/

Also you must have installed the unac package (libunac) package, download and install:

rpm -ivh http://richzendy.org/repo/kiwix/unac-1.7.0-1.i386.rpm

now try this:

rpmbuild --rebuild kiwix-1.9.svn_09122009-1.src.rpm

Your can find the rpm package built to you in ~/rpmbuild/RPMS

Rebuild from .spec file

If you know how to deal with .spec file and want to built a kiwix rpm with others options, you have to:

unpack a RMP package:

rpm2cpio kiwix-1.9.svn_09122009-1.src.rpm | cpio -idmv

move the extracted files in your build enviroment like following:

mv kiwix-1.9.svn_09122009.tar.gz ~/rpmbuild/SOURCES/
mv kiwix.spec ~/rpmbuild/SPECS/

edit and modify the .spec file, and rebuild the RPM:

rpmbuild -ba ~/rpmbuild/SPECS/kiwix.spec