From 94f520bea77d5320a63ce5accac1ac56706641d6d15881c65390cbbcd5500f19 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Fri, 21 Sep 2018 19:27:34 +0000 Subject: [PATCH] Accepting request 637097 from home:bmwiedemann:branches:Documentation:Tools - Drop build date from build output (boo#1047218) - Fix % escaping where %H:%M:%S turned into 17:53:56OURCE For Leap/SLE 15.0 and later, the whole sigil-gt-0.9.0-Dialogs-About.cpp.patch could be dropped because OBS+gcc already normalize __DATE__ and __TIME__ to the latest changelog date. sed calls had to be moved down to not update ChangeLog.txt mtime. OBS-URL: https://build.opensuse.org/request/show/637097 OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/sigil?expand=0&rev=25 --- sigil.changes | 6 ++++++ sigil.spec | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sigil.changes b/sigil.changes index 88e30b7..bf4bc47 100644 --- a/sigil.changes +++ b/sigil.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 21 18:47:29 UTC 2018 - Bernhard Wiedemann + +- Drop build date from build output (boo#1047218) +- Fix % escaping where %H:%M:%S turned into 17:53:56OURCE + ------------------------------------------------------------------- Thu Aug 16 09:10:33 UTC 2018 - jengelh@inai.de diff --git a/sigil.spec b/sigil.spec index a627fa7..f9f1536 100644 --- a/sigil.spec +++ b/sigil.spec @@ -86,26 +86,27 @@ specification and create a hierarchical Table of Contents. %prep %setup -q -n Sigil-%{version} -sed -i 's/\r//' ChangeLog.txt README.md COPYING.txt %patch0 -p 1 cp -v %{S:1} . cp -v %{S:2} . # rpmlint -dos2unix src/Resource_Files/python3lib/meta*.py -dos2unix src/Resource_Files/python3lib/opf_*.py -find . -type f -exec sed -i -e 's|#!\/usr\/bin\/env python|#!\/usr\/bin\/python3|g' {} + #FIXME MANUAL UPDATE OF DATE REQUIRED HERE!!!! # Fix "Your file uses __DATE and __TIME__ this causes the package to rebuild # when not needed warning" # http://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314371&group_id=2439 # -# We use the current date -_date=$(date +"%Y%m%d") -_time=$(date +"%H:%M:%S") +# We use the ChangeLog date +_date=$(date -u -r ChangeLog.txt -I) +_time=$(date -u -r ChangeLog.txt +%%T) # Change it: find . -type f -name About.cpp -exec sed -i "s/@DATE@/$_date/;s/@TIME@/$_time/g" {} + +sed -i 's/\r//' ChangeLog.txt README.md COPYING.txt +dos2unix src/Resource_Files/python3lib/meta*.py +dos2unix src/Resource_Files/python3lib/opf_*.py +find . -type f -exec sed -i -e 's|#!\/usr\/bin\/env python|#!\/usr\/bin\/python3|g' {} + + %build export CFLAGS="%{optflags} -fno-strict-aliasing" export CXXFLAGS="$CFLAGS"