-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME-specfiles.txt
54 lines (39 loc) · 2.19 KB
/
README-specfiles.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Copyright (c) 2003 The Trustees of Princeton University (Trustees).
$Id$
Here are some general guidelines for writing spec files.
* RPM does not allow you to use dashes in version or release
numbers. Use dots, or nothing.
* Most versions of RPM poorly handle version and release numbers that
do not begin with a number. Start your version and release number with
at least one number. Append as many minor numbers as you want, but
leave alphabetic characters at the end of the string.
* Always define BuildRoot based in %{_tmppath}.
* In the %install step, always install files based in $RPM_BUILD_ROOT.
* Don't be overly restrictive with Requires or BuildRequires tags. RPM
is already pretty smart about analyzing your package for necessary
dependencies. Usually, you only need to specify Requires tags to make
sure a set of packages get installed in the right order (if there is
one). Otherwise, it's likely your users will end up in awful
situations requiring manual bootstrap.
Here are some specific guidelines for writing spec files for this setup.
* Write your spec file as you would normally. It should be an
operational spec file on its own.
* Explicitly %define %{name}, %{version}, %{release}, or don't use
them. You should do this anyway to support older versions of RPM. This
Makefile does not implicitly define these variables (based on the
Name:, Version:, and Release: tags) as RPM does.
* Run cvsps(1) manually on your repository, and synchronize the PatchSet
numbers with any Patch: tags in your spec file that you would like
explicitly named.
* This Makefile assumes that the build directory (as specified by the -n
option to %setup, or the RPM default %{name}-%{version}) is the
basename of the Source file (i.e. without .tar[.gz|.bz2]).
* Add %{?date:.%{date}} to your %{release} tag. When executed, this
Makefile will define the variable to be the current date in YYYY.MM.DD
form. This will help automated nightly upgrades. Tagged releases will
not define this variable.
* Unless you have a very good reason not to, use the following tags:
Vendor: PlanetLab
Packager: PlanetLab Central <[email protected]>
Distribution: PlanetLab 2.0
URL: http://www.planet-lab.org