SHA256
1
0
forked from pool/sigil

Accepting request 629509 from home:jengelh:branches:Documentation:Tools

- Replace old %__ macros and $RPM_* shell vars.
- Use more "xargs -exec +".

OBS-URL: https://build.opensuse.org/request/show/629509
OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/sigil?expand=0&rev=23
This commit is contained in:
Tomáš Chvátal 2018-08-16 10:18:03 +00:00 committed by Git OBS Bridge
parent 7036bcbc6b
commit beeeabd38a
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 16 09:10:33 UTC 2018 - jengelh@inai.de
- Replace old %__ macros and $RPM_* shell vars.
- Use more "xargs -exec +".
-------------------------------------------------------------------
Wed Aug 15 14:14:36 UTC 2018 - ecsos@opensuse.org

View File

@ -88,12 +88,12 @@ specification and create a hierarchical Table of Contents.
%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} .
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' {} \;
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
@ -104,10 +104,10 @@ find . -type f -exec sed -i -e 's|#!\/usr\/bin\/env python|#!\/usr\/bin\/python3
_date=$(date +"%Y%m%d")
_time=$(date +"%H:%M:%S")
# Change it:
find . -type f -name 'About.cpp' | xargs sed -i "s/@DATE@/$_date/;s/@TIME@/$_time/g"
find . -type f -name About.cpp -exec sed -i "s/@DATE@/$_date/;s/@TIME@/$_time/g" {} +
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
cmake -G "Unix Makefiles" \