RPM Community Forums

Mailing List Message of <rpm-users>

Project "RPM Spec file creation guidelines"

From: Eric MSP Veith <eveith@wwweb-library.net>
Date: Thu 25 Dec 2008 - 01:24:37 CET
Message-Id: <200812250124.42796.eveith@wwweb-library.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

after the latest thread on rpm-users, I guess there is a lack of some 
guidelines on how to create good, nice-looking spec files. And so I thought 
creating a brainstorming ML thread would be a good first step that could 
ultimately lead to a complete document regarding this.

So I hereby start the brainstorm with the attached spec file skeleton and 
hope to attract alot of commentors. I'd also like to start collecting FAQ 
regarding spec file creation, like:

Q: I've seens some spec files careing for mkdir/rm of %{buildroot}, and 
others don't. How comes this?
A: Current versions of RPM come not only with the ability to 
pre-define %clean and %install, but also automatically take care of 
removing (or re-creating) the buildroot. Have a look at %__spec_clean_body 
and %__spec_install_body


In the hope that this is useful,
		-- Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklS0scACgkQfkUtd7QNU/ts1gCgjZUi4Eoamxjv16d0Zygnncm5
VBUAn2eU09Q4rREsqyG8Lqff/+OhKC+p
=1Tm0
-----END PGP SIGNATURE-----

--Boundary-00=_KLtUJNqjP3WXm+K
Content-Type: text/plain;
  charset="iso 8859-15";
  name="Skel.spec"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="Skel.spec"

Name:
Version:
Release: 1
Summary:
URL:
Group:
License:
Vendor: 
Source:
BuildRequires:

%description


%prep
%setup -q


%build


%install

[[ -e '%{buildroot}/%{_infodir}/dir' ]] \
    && %{__rm} -f '%{buildroot}/%{_infodir}/dir'


%post

%postun


%clean


%files
%defattr(-, root, root)
%doc 

--Boundary-00=_KLtUJNqjP3WXm+K--
Received on Thu Dec 25 01:24:47 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.