Loading...
 
Skip to main content

rpm Commands

Install
rpm -ivh

Update/Upgrade
rpm -Uvh

Removel
rpm -e

Rebuild from Source
Download the source rpm
rpmbuild --rebuild package.src.rpm

Roll your own .rpm
http://rpm.rutgers.edu/buildingpackages.html
http://www.linux-mag.com/2004-08/guru_01.html

Create .spec file
Summary: A lightweight DHCP/DNS server
Name: dnsmasq
Version: 2.7
Release: 1
Copyright: GPL
Group: System Environment/Daemons
Source: http://thekelleys.org.uk/dnsmasq/dnsmasq-2.7.tar.gz
Patch0: dnsmasq-patch1.patch
BuildRoot: /var/tmp/%{name}-buildroot
Requires: chkconfig

%description
A lightweight DHCP server, DNS forwarder and DNS server for a local network.
%prep
%tar zxvf
%build
./configure --prefix=/usr/local
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
make install prefix=%{buildroot}
%post
cat << EOF
You need to configure xxx by doing yyy.
EOF
%clean
rm -rf %{buildroot}

Copy sources to /usr/src/redhat/SOURCES
Then run
rpmbuild -ba sample.spec

Created by john. Last Modification: Saturday 26 of February, 2005 05:18:58 MST by john.