summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-14 07:27:34 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-14 07:27:34 +0000
commite3541210b6f3ae9cd45001819e46ba218c8439f6 (patch)
tree4db2a4fdabd16d920e1f3c8ce9fdafcee6063000
parent57697401c6dfabbcae129d10c384ebdf1f6e7896 (diff)
automatic import of rpkg-macrosopeneuler22.03_LTS_SP4
-rw-r--r--.gitignore1
-rw-r--r--allow_protocol_file.patch12
-rw-r--r--rpkg-macros.spec87
-rw-r--r--sources1
4 files changed, 101 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..c2d1cd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/rpkg-util-macros-28034317.tar.gz
diff --git a/allow_protocol_file.patch b/allow_protocol_file.patch
new file mode 100644
index 0000000..d83f1d3
--- /dev/null
+++ b/allow_protocol_file.patch
@@ -0,0 +1,12 @@
+diff -ur rpkg-util-macros-orig/tests/run rpkg-util-macros/tests/run
+--- rpkg-util-macros-orig/tests/run 2023-05-30 08:51:11.465641122 +0000
++++ rpkg-util-macros/tests/run 2023-05-30 08:51:11.465641122 +0000
+@@ -1,6 +1,8 @@
+ #!/bin/bash
+
+ export testdir="$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
++# workaround for git secure patch which may fail the tests
++git config protocol.file.allow always
+
+ for dir in `ls -d "$testdir"/test_*/`; do
+ echo "====================== $(basename ${dir}) ======================"
diff --git a/rpkg-macros.spec b/rpkg-macros.spec
new file mode 100644
index 0000000..33a96f5
--- /dev/null
+++ b/rpkg-macros.spec
@@ -0,0 +1,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
diff --git a/sources b/sources
new file mode 100644
index 0000000..942a49c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1ec926247e8821005036c0aab07c5a77 rpkg-util-macros-28034317.tar.gz