diff --git a/rpmmacros b/rpmmacros new file mode 100644 index 0000000..f8411f2 --- /dev/null +++ b/rpmmacros @@ -0,0 +1,11 @@ +# use as +# %?strip_all_nondeterminism +# or +# %if 0%?have_strip_nondeterminism > 0 +# strip_nondeterminism path/to/file.zip +# %endif + +%have_strip_nondeterminism 1 +%strip_all_nondeterminism() \ + find '(' -name '*.zip' -o -name '*.jar' -o -name '*.xpi' -o -name '*.pk3' -o -name '*.mo' -o -name '*.html' -o -name '*.gz' -o -name '*.png' ')' -print0 | xargs -0 --no-run-if-empt 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