Build rpm packages with the rpmbuild command

From Linuxintro
Revision as of 15:11, 6 February 2011 by imported>ThorstenStaerk

This article is about how to build rpm packages with the rpmbuild command and a SPEC file.

First, create a SPEC file:

Summary: krep allows you to filter text
Name: krep
Version: 1.0
Release: 1
License: GPL
Group: Applications/Sound
Source: http://www.staerk.de/files/krep.tar.gz
URL: http://www.staerk.de/thorsten/krep
Distribution: SUSE Linux
Vendor: -
Packager: Thorsten Staerk

%description
krep lets you filter text by regular expressions

%prep
%setup

%build
make 

%install
make install
mkdir -p /usr/src/packages/BUILDROOT/krep-1.0-1.i386/usr/local/bin
cp /usr/local/bin/krep /usr/src/packages/BUILDROOT/krep-1.0-1.i386/usr/local/bin/krep

%files 
%doc README
%defattr(-, root, root)
/usr/local/bin/krep

todo