From 7ad528c53fd25ed01601bd4eda62ef407f459ed384d0fdd8b32973a8c5eff9ad Mon Sep 17 00:00:00 2001 From: Bernhard Wiedemann Date: Sun, 7 May 2017 12:29:28 +0000 Subject: [PATCH] add rpm macro to use in spec files OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/strip-nondeterminism?expand=0&rev=6 --- rpmmacros | 9 +++++++++ strip-nondeterminism.changes | 5 +++++ strip-nondeterminism.spec | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 rpmmacros diff --git a/rpmmacros b/rpmmacros new file mode 100644 index 0000000..fea28d7 --- /dev/null +++ b/rpmmacros @@ -0,0 +1,9 @@ +# use as +# %if 0%?have_strip_nondeterminism > 0 +# %strip_nondeterminism path/to/file.zip +# %endif + +%have_strip_nondeterminism 1 +%strip_nondeterminism() \ + strip-nondeterminism %{?*} \ + %{nil} diff --git a/strip-nondeterminism.changes b/strip-nondeterminism.changes index 37f9552..34a2762 100644 --- a/strip-nondeterminism.changes +++ b/strip-nondeterminism.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun May 7 09:47:22 UTC 2017 - bwiedemann@suse.com + +- add rpm macro to use in spec files + ------------------------------------------------------------------- Sun Jan 1 00:00:51 UTC 2017 - bwiedemann@suse.com diff --git a/strip-nondeterminism.spec b/strip-nondeterminism.spec index 7dfee2a..6069d1a 100644 --- a/strip-nondeterminism.spec +++ b/strip-nondeterminism.spec @@ -24,6 +24,7 @@ License: GPL-3.0+ Group: Development/Libraries/Perl Url: https://anonscm.debian.org/git/reproducible/strip-nondeterminism.git Source: http://http.debian.net/debian/pool/main/s/strip-nondeterminism/strip-nondeterminism_%{version}.orig.tar.gz +Source2: rpmmacros # PATCH-FIX-OPENSUSE - apk files misdetected as OOXML Patch0: strip-nondeterminism-0.029-fix-apk.patch BuildArch: noarch @@ -58,6 +59,8 @@ and the strip-nondeterminism command line utility. %{__make} test %install +mkdir -p %buildroot/etc/rpm/ +install -p %{SOURCE2} %buildroot/etc/rpm/macros.strip-nondeterminism %perl_make_install %perl_process_packlist %perl_gen_filelist @@ -65,5 +68,6 @@ and the strip-nondeterminism command line utility. %files -f %{name}.files %defattr(-,root,root,755) %doc README TODO COPYING +/etc/rpm/macros.strip-nondeterminism %changelog