-
Notifications
You must be signed in to change notification settings - Fork 6
/
lpf-pkg-example.spec
96 lines (73 loc) · 2.74 KB
/
lpf-pkg-example.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
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# Example lpf-package spec file
#
# This example is for a hypothetic package containing a
# non-redistributable font called called restricted-fonts.
#
# Prerequisites:
# - The target package spec file i. e., restricted-fonts.spec.
# - If the target package needs user to confirm some eula-kind
# terms the file with these terms, here called eula.txt
# - Any sources or patches the target package uses which does not
# have a download link in their Source: or Patch: tags (i. e.,
# any source or patch which spectool -g can't download).
# %%global will not work here, lazy evaluation needed.
%define target_pkg %(t=%{name}; echo ${t#lpf-})
# The lpf package has the name lpf-<target-package>.spec:
Name: lpf-restricted-fonts
# The lpf package version-release must be the same as the target package:
Version: 2.2
Release: 1%{?dist}
Summary: Bootstrap package building restricted-fonts using lpf
# The license and url of the lpf package are basically void:
License: MIT
URL: https://github.com/leamas/lpf
Group: Development/Tools
# The arch should reflect the target package architecture. A font
# package is noarch. For binary stuff, typically only i386 and
# perhaps also x86_64 use ExclusiveArch: %{ix86} x86_64.
BuildArch: noarch
# The target package spec:
Source0: restricted-fonts.spec.in
# The terms user needs to accept before building package.
Source1: eula.txt
# Add sources and patches used by target spec which can't
# be downloaded:
Source2: restricted-fonts-fontconfig.conf
Source3: README
BuildRequires: desktop-file-utils
BuildRequires: lpf
Requires: lpf
%description
Bootstrap package allowing the lpf system to build the
restricted-fonts non-redistributable package.
target-summary: [Summary form target spec]
target-arch: [If there is Arch/ExclusiveArch: in target, duplicate here]
target-license: [License: from target]
target-url: [Url: from target]
%prep
%setup -cT
%build
%install
# lpf-setup-pkg creates the package structure according to:
# lpf-setup-pkg [-a arch] [-e eula] <topdir> <specfile> [sources...]
# See comment in lpf-setup-pkg for more info.
/usr/share/lpf/scripts/lpf-setup-pkg \
-e %{SOURCE1} %{buildroot} %{SOURCE0} %{SOURCE2}
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
# Check that lpf and target spec have the same version.
%check
%lpf_check %{SOURCE0}
%post
%lpf_post
%postun
%lpf_postun
%lpf_triggerpostun
%files
%doc README
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/lpf/packages/%{target_pkg}
%attr(775,pkg-build,pkg-build) /var/lib/lpf/packages/%{target_pkg}
%changelog
* Sun May 05 2013 Alec Leamas <[email protected]> - 0.9.0.133.gd18ed58.259-2
- Initial release