blob: 33a96f590b6bcf3b83592cc4eaedcfa1bc2819c8 (
plain)
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
|
# vim: syntax=spec
%global libdir %{_prefix}/lib
Name: rpkg-macros
Version: 2.0
Release: 1
Summary: Set of preproc macros for rpkg utility
License: GPLv2+
URL: https://pagure.io/rpkg-util.git
# Source is created by:
# git clone https://pagure.io/rpkg-util.git
# cd rpkg-util/macros
# git checkout rpkg-macros-2.0-1
# ./rpkg spec --sources
Source0: rpkg-util-macros-28034317.tar.gz
Patch1: allow_protocol_file.patch
BuildArch: noarch
BuildRequires: bash
BuildRequires: preproc
BuildRequires: git
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: rpm-git-tag-sort
Requires: bash
Requires: git
Requires: coreutils
Requires: findutils
Requires: rpm-git-tag-sort
%description
Set of preproc macros to be used by rpkg utility. They
are designed to dynamically generate certain parts
of rpm spec files. You can use those macros also without
rpkg by:
$ cat <file_with_the_macros> | preproc -s /usr/lib/rpkg.macros.d/all.bash -e INPUT_PATH=<file_with_the_macros>
INPUT_PATH env variable is passed to preproc to inform
macros about the input file location. The variable is used
to derive INPUT_DIR_PATH variable which rpkg macros use.
If neither INPUT_PATH nor INPUT_DIR_PATH are specified,
INPUT_PATH will stay empty and INPUT_DIR_PATH will default
to '.' (the current working directory).
Another option to experiment with the macros is to source
/usr/lib/rpkg.macros.d/all.bash into your bash environment
Then you can directly invoke the macros on your command-line
as bash functions. See content in /usr/lib/rpkg.macros.d to
discover available macros.
Please, see man rpkg-macros for more information.
%prep
%setup -T -b 0 -q -n rpkg-util-macros
%autopatch -p1
%check
git config --global protocol.file.allow always
PATH=bin/:$PATH tests/run
%install
install -d %{buildroot}%{libdir}
install -d %{buildroot}%{libdir}/rpkg.macros.d
cp -ar macros.d/* %{buildroot}%{libdir}/rpkg.macros.d
install -d %{buildroot}%{_bindir}
install -p -m 755 bin/pack_sources %{buildroot}%{_bindir}/pack_sources
install -d %{buildroot}%{_mandir}/man1
install -p -m 644 man/rpkg-macros.1 %{buildroot}/%{_mandir}/man1/
%files
%{!?_licensedir:%global license %doc}
%license LICENSE
%{libdir}/rpkg.macros.d
%{_bindir}/pack_sources
%{_mandir}/man1/rpkg-macros.1*
%changelog
* Mon May 22 2023 lichaoran <pkwarcraft@hotmail.com> - 2.0-1
- Init package
|