This repository has been archived by the owner on Aug 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.spec
83 lines (72 loc) · 1.9 KB
/
template.spec
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# template spec file
# Refer to the following for more info on .spec file syntax:
# http://www.rpm.org/max-rpm/
# http://www.rpm.org/max-rpm-snapshot/ (Updated version of above)
# http://docs.fedoraproject.org/drafts/rpm-guide-en/
# More links may be available from http://www.rpm.org
# A collection of magic to set the release "number" such that dist upgrades will, erm, upgrade.
# NB: This really only applies to packages built with debbuild.
%if %{?debdist:0}%{?!debdist:1}
%define debdist etch
%endif
%if "%{debdist}" == "sarge"
%define errata 0
%endif
%if "%{debdist}" == "dapper"
%define errata 1
%endif
%if "%{debdist}" == "etch"
%define errata 2
%endif
%if "%{debdist}" == "lenny"
%define errata 3
%endif
%if "%{debdist}" == "squeeze"
%define errata 4
%endif
%if "%{debdist}" == "wheezy"
%define errata 5
%endif
%if %{?relnum:0}%{?!relnum:1}
%define relnum 1
%endif
# %{_vendor} is only set to "redhat" on Red Hat (Enterprise) Linux and direct
# derivatives/ancestors (eg Fedora Core). Upstream rpm (as packaged in Debian,
# for instance) sets it to "rpm". debbuild sets it to "debbuild".
%if %{_vendor} == "redhat"
%define errata el4
%define release %{relnum}.%{errata}
%else
%define release %{relnum}.%{errata}%{debdist}
%endif
Summary: one-line description
Name: package
Version: 0.0.0.1
Release: %{release}
Source: http://site/tarball
Group: Applications/System
License: GPL
Packager: Name <email@site>
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
Multi-line
description
%prep
# Steps to unpack and patch source as needed
%setup -q
%build
# Steps to compile the source
%configure
make
%install
# Steps to install to a temporary location for packaging
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%makeinstall
# Fill in the pathnames to be packaged here
%files
%{_bindir}/*
%{_mandir}/man1/*
%doc README
%changelog
* Mon Jan 01 1900 Name <email@site> -relnum
- Packaging comment