RPM Basics

Look here: http://www.ibm.com/developerworks/library/l-rpm1/

Here is my emacs spec file:

%define _topdir         /home/drivet/software_factory/emacs24-rpmbuild
%define name            emacs
%define release         1
%define version     24.3
%define buildroot %{_topdir}/%{name}-%{version}-root
%define BUILD     %{_topdir}/BUILD/%{name}-%{version}

BuildRoot:          %{buildroot}
Name:           %{name}
Summary:        Emacs Text Editor
License:                GPL
Prefix:         /usr/local
Version:        %{version}
Release:        %{release}
Source:         %{name}-%{version}.tar.gz

%description
Emacs 24

%prep
%setup -q


%build
./configure --prefix=/usr/local
make


%install
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
/usr/local/bin/*
/usr/local/libexec/emacs
/usr/local/share/applications/emacs.desktop
/usr/local/share/emacs
/usr/local/share/icons/hicolor/24x24/apps/emacs.png
/usr/local/share/icons/hicolor/32x32/apps/emacs.png
/usr/local/share/icons/hicolor/48x48/apps/emacs.png
/usr/local/share/icons/hicolor/scalable/mimetypes/emacs-document.svg
/usr/local/share/icons/hicolor/scalable/apps/emacs.svg
/usr/local/share/icons/hicolor/128x128/apps/emacs.png
/usr/local/share/icons/hicolor/16x16/apps/emacs.png
/usr/local/share/info/*
/usr/local/share/man/man1/*
/usr/local/var/games/emacs

%changelog

Please note:

rpmbuild -ba --buildroot /home/drivet/software_factory/emacs24-rpmbuild/emacs-24.3-root SPECS/emacs.spec 

rpmbasics (last edited 2013-11-06 15:46:58 by DesmondRivet)