diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-22 08:27:45 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-22 08:27:45 +0000 |
commit | 22779f57c4fe1630dd9e7cf75f6abd2bd4289b73 (patch) | |
tree | 4f68ce6f6c81fbaae1204fcf86f194a003d04cd1 | |
parent | 57697401c6dfabbcae129d10c384ebdf1f6e7896 (diff) |
automatic import of rpkg-macros
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | rpkg-macros.spec | 84 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 86 insertions, 0 deletions
@@ -0,0 +1 @@ +/rpkg-util-macros-28034317.tar.gz diff --git a/rpkg-macros.spec b/rpkg-macros.spec new file mode 100644 index 0000000..8d7ed58 --- /dev/null +++ b/rpkg-macros.spec @@ -0,0 +1,84 @@ +# 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 + +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 + +%check +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 2023 lichaoran <pkwarcraft@hotmail.com> - 2.0-1 +- Init package @@ -0,0 +1 @@ +1ec926247e8821005036c0aab07c5a77 rpkg-util-macros-28034317.tar.gz |