From 22779f57c4fe1630dd9e7cf75f6abd2bd4289b73 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 22 May 2023 08:27:45 +0000 Subject: automatic import of rpkg-macros --- rpkg-macros.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 rpkg-macros.spec (limited to 'rpkg-macros.spec') 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 | preproc -s /usr/lib/rpkg.macros.d/all.bash -e INPUT_PATH= + +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 - 2.0-1 +- Init package -- cgit v1.2.3