Bug 1524133 (deepin-calculator)

Summary: Review Request: deepin-calculator - an easy to use calculator
Product: [Fedora] Fedora Reporter: sensor.wen
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jan.public, package-review, sensor.wen, zebob.m
Target Milestone: ---Flags: zebob.m: fedora-review+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-22 13:32:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1465889    

Comment 1 Robert-André Mauchin 🐧 2017-12-10 16:12:40 UTC
 - update-desktop-database is not needed in %post and %postun since Fedora 25. See https://fedoraproject.org/w/index.php?title=Packaging:Scriptlets&oldid=481889#desktop-database

 - I've got a build error:

src/main.cpp:3:10: fatal error: DHiDPIHelper: No such file or directory
 #include <DHiDPIHelper>
          ^~~~~~~~~~~~~~
compilation terminated.


    It seems DHiDPIHelper was added in a recent version of dtkwidget, at least 2.0.2
    See https://github.com/linuxdeepin/dtkwidget/commit/0fdbcf605243bdc13a84abd08bf30639665f897f#diff-694e4721164b162e1134839539bc385f

    Thus you need to add a correct minimum version to the BR:

BuildRequires:  pkgconfig(dtkwidget) >= 2.0.2

    And you need to update the version of dtkwidget available in Fedora. The latest version you packaged is 2.0.1.

Comment 2 sensor.wen 2018-03-17 15:36:56 UTC
http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/d/dtkwidget-devel-2.0.6.1-1.fc29.x86_64.rpm

Updated the latest version of dtkwidget. Please review again.

Comment 3 Robert-André Mauchin 🐧 2018-03-18 00:22:03 UTC
 - Bump to 1.0.2.

 - This:

sed -i 's|=lupdate|=lupdate-qt5|;s|=lrelease|=lrelease-qt5|' %{name}.pro

   doesn't work as there is no lupdate/lrelease in the pro file. Thus translation fails. There's a script here: translations/translate_generation.sh which contains lrelease that you could replace:

sed -i 's|lrelease|lrelease-qt5|' translations/translate_generation.sh


 - This scriplet is not needed anymore, it has been automated:

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null ||:
/usr/bin/update-desktop-database -q ||:

%postun
if [ $1 -eq 0 ]; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null ||:
    /usr/bin/gtk-update-icon-cache -f -t -q %{_datadir}/icons/hicolor ||:
fi
/usr/bin/update-desktop-database -q ||:

%posttrans
/usr/bin/gtk-update-icon-cache -f -t -q %{_datadir}/icons/hicolor ||:

Comment 5 Robert-André Mauchin 🐧 2018-03-20 13:51:41 UTC
 - You need to add: Requires:       hicolor-icon-theme
   to own these directories:

[!]: Package must own all directories that it creates.
     Note: Directories without known owners:
     /usr/share/icons/hicolor/scalable/apps, /usr/share/icons/hicolor,
     /usr/share/dman, /usr/share/icons/hicolor/scalable

 - There are source files with incorrect obsolete FSF address, patch them in %prep with the new address and notify upstream about it:

deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatcommon.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatcommon.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatconst.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatconst.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatconvert.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatconvert.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floaterf.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floaterf.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatexp.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatexp.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatgamma.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatgamma.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floathmath.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floathmath.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatincgamma.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatio.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatio.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatipower.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatipower.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatlog.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatlog.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatlogic.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatlogic.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatlong.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatlong.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatnum.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatnum.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatpower.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatpower.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatseries.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floatseries.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floattrig.c
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/floattrig.h
deepin-calculator-debugsource.x86_64: E: incorrect-fsf-address deepin-calculator-1.0.2-1.fc29.x86_64/math/number.c

sed -i "s|59 Temple Place, Suite 330|51 Franklin Street, Fifth Floor|;s|Boston, MA 02111-1307 USA.|Boston, MA 02110-1335, USA.|" math/*.{c,h}

Comment 7 Robert-André Mauchin 🐧 2018-03-23 19:41:52 UTC
Package approved.

Comment 8 Gwyn Ciesla 2018-03-26 12:41:11 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/deepin-calculator

Comment 9 Zamir SUN 2018-07-22 13:32:23 UTC
This is already in Rawhide. Closing on behalf of the Deepin Desktop packaging effort.

Comment 10 Zamir SUN 2018-07-22 13:33:13 UTC
This is already in Rawhide. Closing on behalf of the Deepin Desktop packaging effort.