source: trunk/template.spec@ 161

Last change on this file since 161 was 161, checked in by kdeugau, 12 years ago

/trunk

Fix handling of long descriptions with blank (or "blank") lines
Thanks to Andreas Itzchak Rehberg for pointing it out

File size: 1.8 KB
Line 
1# template spec file
2# Refer to the following for more info on .spec file syntax:
3# http://www.rpm.org/max-rpm/
4# http://www.rpm.org/max-rpm-snapshot/ (Updated version of above)
5# http://docs.fedoraproject.org/drafts/rpm-guide-en/
6# More links may be available from http://www.rpm.org
7
8# A collection of magic to set the release "number" such that dist upgrades will, erm, upgrade.
9# NB: This really only applies to packages built with debbuild.
10%if %{?debdist:0}%{?!debdist:1}
11%define debdist etch
12%endif
13%if "%{debdist}" == "sarge"
14%define errata 0
15%endif
16%if "%{debdist}" == "dapper"
17%define errata 1
18%endif
19%if "%{debdist}" == "etch"
20%define errata 2
21%endif
22%if "%{debdist}" == "lenny"
23%define errata 3
24%endif
25%if %{?relnum:0}%{?!relnum:1}
26%define relnum 1
27%endif
28
29# %{_vendor} is only set to "redhat" on Red Hat (Enterprise) Linux and direct
30# derivatives/ancestors (eg Fedora Core). Upstream rpm (as packaged in Debian,
31# for instance) sets it to "rpm". debbuild sets it to "debbuild".
32%if %{_vendor} == "redhat"
33%define errata el4
34%define release %{relnum}.%{errata}
35%else
36%define release %{relnum}.%{errata}%{debdist}
37%endif
38
39Summary: one-line description
40Name: package
41Version: 0.0.0.1
42Release: %{release}
43Source: http://site/tarball
44Group: Applications/System
45License: GPL
46Packager: Name <email@site>
47BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
48
49%description
50Multi-line
51
52description
53
54
55%prep
56# Steps to unpack and patch source as needed
57%setup -q
58
59%build
60# Steps to compile the source
61%configure
62make
63
64%install
65# Steps to install to a temporary location for packaging
66[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
67%makeinstall
68
69# Fill in the pathnames to be packaged here
70%files
71%{_bindir}/*
72%{_mandir}/man1/*
73%doc README
74
75%changelog
76* Mon Jan 01 1900 Name <email@site> -relnum
77- Packaging comment
Note: See TracBrowser for help on using the repository browser.