Wednesday, January 30, 2013

Sample Spec File to Create RPM package

RPM Package Creation:

There are different ways to create rpm package of  your application / tool like using checkinstall, writing app.spec file etc. The Best one is writing rpm specification file. 

Below you can find a sample Specification file gem.spec to create RPM package, which I actually used to create gem-beta-0.1.rpm package.






Author: Reniguntla Sambaiah
File Name : gem.spec
******************************************************************************

Summary: GEM(GEstures with Mouse) is gesture based application which assists physically challenged in accessing Linux Desktops

Name: gem

Version: 0.1

Release: 1

Group: Accessibility

License: GPLv3

Prefix: /usr/local

Source0: %{name}-beta-%{version}.tar.gz

BuildRequires: gtkmm24-devel
BuildRequires: dbus-glib-devel
BuildRequires: boost-devel
BuildRequires: gcc-c++
BuildRequires: intltool

%description
A gesture-recognition application for Physically challenged to access Linux Desktops

%prep
%setup -q -n %{name}-beta-%{version}
sed -i -e 's:/usr/local:%{_prefix}:' Makefile

%build
%{__make}    CXX="g++ %{optflags}" \
            CC="gcc -std=c99 %{optflags}" \
            LDFLAGS="%{ldflags}"

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install

%files
%doc AUTHORS INSTALL LICENSE README
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

No comments:

Post a Comment