Maneira fácil de compilar o pacote rpm a partir do binário (estas etapas foram testadas com o Fedora 18):
1) Primeiro você precisa instalar o rpmdevtools, portanto, execute estes comandos (atenção: execute como usuário normal)
$ sudo yum install rpmdevtools rpmlint
$ rpmdev-setuptree
2) Na pasta ~ / rpmbuild / SPECS, crie um novo arquivo: package_name.spec
3) Abra-o com um editor (como gedit) e escreva:
Name: package_name
Version: 1.0
Release: 1
Summary: Short description (first char has to be uppercase)
License: GPL
URL: www. your_website/
BuildRequires: package_required >= (or ==, or <=) 1.0.3 (for example)
%description
Description with almost 79 characters (first char has to be uppercase)
#This is a comment (just as example)
%files
/usr/bin/binary_file.bin
/usr/share/applications/package_name.desktop
/usr/share/pixmaps/package_name.png
%changelog
* date Packager's Name <packager's_email> version-revision
- Summary of changes
#For more details see: docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/Packagers_Guide/sect-Packagers_Guide-Creating_a_Basic_Spec_File.html
4) Crie ~ / rpmbuild / BUILDROOT / package_name-version-release.i386 e reproduza os caminhos em que os arquivos serão colocados. Nesse caso, por exemplo, crie:
- ~ / rpmbuild / BUILDROOT / package_name-version-release.i386 / usr / bin /
- ~ / rpmbuild / BUILDROOT / package_name-version-release.i386 / usr / share / applications /
- ~ / rpmbuild / BUILDROOT / package_name-version-release.i386 / usr / share / pixmaps /
5) Coloque nessas pastas os arquivos que você deseja inserir no pacote:
- ~ / rpmbuild / BUILDROOT / package_name-version-release.i386 / usr / bin / binary_file.bin
- ~ / rpmbuild / BUILDROOT / package_name-version-release.i386 / usr / share / applications / package_name.desktop
- ~ / rpmbuild / BUILDROOT / package_name-version-release.i386 / usr / share / pixmaps / package_name.png
usr / share / pixmaps / package_name.png é o ícone binário usr / share / applications / package_name.desktop são as regras para inserir o programa nas entradas do menu
6) package_name.desktop deve ser assim:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=example
GenericName=Short description
Comment=Comment of the application
Exec=package_name
Icon=package_name
Terminal=false
Categories=System;
As categorias são: standards.freedesktop.org/menu-spec/latest/apa.html
7) Corra $ rpmbuild -bb ~/rpmbuild/SPECS/package_name.spec
8) Seu pacote foi incorporado na pasta ~ / rpmbuild / RPMS
Se você instalar este pacote, instale:
- /usr/bin/binary_file.bin
- /usr/share/applications/package_name.desktop
- /usr/share/pixmaps/package_name.png
Obrigado a: losurs.org/docs/tips/redhat/binary-rpms
Para mais detalhes sobre a criação de rpm, dê uma olhada neste link .
Software java da GUI para criar o rpm: https://sourceforge.net/projects/javarpmbuilder/