Accepting request 637101 from Documentation:Tools

OBS-URL: https://build.opensuse.org/request/show/637101
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sigil?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2018-09-24 11:13:23 +00:00 committed by Git OBS Bridge
commit 7676d5aebe
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 21 18:47:29 UTC 2018 - Bernhard Wiedemann <bwiedemann@suse.com>
- 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

View File

@ -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"