SHARE
TWEET

qownnotes-18.12.4-2.el7.spec

a guest Dec 14th, 2018 168 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %define app_name QOwnNotes
  2. %define app_exec qownnotes
  3. %define app_id org.qownnotes.QOwnNotes
  4.  
  5. %define dir_appdata metainfo
  6.  
  7. %if 0%{?rhel}%{?fedora}
  8.   %if 0%{?rhel}
  9.     %if 0%{?rhel} <= 7
  10.       %define dir_appdata appdata
  11.     %endif
  12.   %endif
  13. %endif
  14.  
  15. %if 0%{!?_metainfodir:1}
  16.   %define _metainfodir %{_datadir}/%{dir_appdata}
  17. %endif
  18.  
  19. %{!?_licensedir:%global license %doc}
  20.  
  21.  
  22. Name:           qownnotes
  23. Version:        18.12.4
  24. Release:        2%{?dist}
  25. Group:          Applications/Productivity
  26. License:        GPLv2
  27. URL:            https://www.qownnotes.org
  28. Summary:        Note-taking app and todo list manager with ownCloud/Nextcloud integration
  29.  
  30. Source0:        https://download.tuxfamily.org/%{name}/src/%{name}-%{version}.tar.xz
  31. Source1:        https://raw.githubusercontent.com/pbek/%{app_name}/4897d4c34885f22f326824033a1fca5adf72d8a6/build-systems/flatpak/%{app_id}.appdata.xml
  32.  
  33. # Because of the cpuid.h
  34. ExclusiveArch:  %{arm} aarch64 %{ix86} x86_64
  35.  
  36. BuildRequires:  gcc gcc-c++
  37. BuildRequires:  desktop-file-utils
  38. BuildRequires:  libappstream-glib
  39. BuildRequires:  pkgconfig(Qt5Core)
  40. BuildRequires:  pkgconfig(Qt5Gui)
  41. BuildRequires:  pkgconfig(Qt5Network)
  42. BuildRequires:  pkgconfig(Qt5PrintSupport)
  43. BuildRequires:  pkgconfig(Qt5Qml)
  44. BuildRequires:  pkgconfig(Qt5Svg)
  45. BuildRequires:  pkgconfig(Qt5Sql)
  46. BuildRequires:  pkgconfig(Qt5Widgets)
  47. BuildRequires:  pkgconfig(Qt5Xml)
  48. BuildRequires:  pkgconfig(Qt5XmlPatterns)
  49.  
  50. Requires:       git
  51.  
  52. # gtk-update-icon-cache
  53. Requires(postun):       gtk-update-icon-cache
  54. Requires(posttrans):    gtk-update-icon-cache
  55. # update-desktop-database
  56. Requires(post):         desktop-file-utils
  57. Requires(postun):       desktop-file-utils
  58.  
  59.  
  60. %description
  61. QOwnNotes is the open source plain-text file markdown note taking application,
  62. that works together with the notes application of ownCloud or Nextcloud.
  63.  
  64.  
  65. %prep
  66. %{autosetup}
  67.  
  68. desktop-file-edit --set-key="Icon" --set-value="%{app_id}" "PBE.%{app_name}.desktop"
  69.  
  70.  
  71. %build
  72. %{qmake_qt5} PREFIX="%{_prefix}"
  73. %{make_build}
  74.  
  75.  
  76. %install
  77. %{make_install} INSTALL_ROOT="%{buildroot}"
  78.  
  79. %{__ln_s} "%{app_name}" "%{buildroot}%{_bindir}/%{app_exec}"
  80.  
  81. for file in languages/%{app_name}_*.qm; do
  82.   %{__install} -p -D -m 0644 "${file}" -t "%{buildroot}%{_datadir}/%{app_name}/languages/"
  83. done
  84.  
  85. find images/icons/*/apps/ -xtype f \( -name "%{app_name}.png" -o -name "%{app_name}.svg" \) -print0 | sort -zuV | while IFS= read -rd '' file; do
  86.   s="$( dirname -z "${file}" | xargs -0 dirname -z | xargs -0 basename -z )"
  87.   %{__install} -p -D -m 0644 "${file}" "%{buildroot}%{_datadir}/icons/hicolor/${s}/apps/%{app_id}.${file##*.}"
  88. done
  89.  
  90. %{__mv} "%{buildroot}%{_datadir}/applications/PBE.%{app_name}.desktop" "%{buildroot}%{_datadir}/applications/%{app_id}.desktop"
  91.  
  92. %{__install} -p -D -m 0644 "%{SOURCE1}" "%{buildroot}%{_metainfodir}/%{app_id}.appdata.xml"
  93.  
  94.  
  95. %check
  96. /usr/bin/desktop-file-validate "%{buildroot}/%{_datadir}/applications/%{app_id}.desktop"
  97.  
  98. /usr/bin/appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{app_id}.appdata.xml"
  99.  
  100.  
  101. %post
  102. /bin/touch --no-create "%{_datadir}/icons/hicolor" &> /dev/null || :
  103. /usr/bin/update-desktop-database &> /dev/null || :
  104.  
  105.  
  106. %postun
  107. /usr/bin/update-desktop-database &> /dev/null || :
  108. if [[ "${1}" -eq "0" ]] ; then
  109.   /bin/touch --no-create "%{_datadir}/icons/hicolor" &> /dev/null || :
  110.   /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || :
  111. fi
  112.  
  113.  
  114. %posttrans
  115. /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || :
  116.  
  117.  
  118. %files
  119. %doc *.md
  120. %license LICENSE
  121. %{_bindir}/%{app_name}
  122. %{_bindir}/%{app_exec}
  123. %{_datadir}/%{app_name}/languages/%{app_name}_*.qm
  124. %{_datadir}/icons/hicolor/*/apps/%{app_name}.*
  125. %{_datadir}/icons/hicolor/*/apps/%{app_id}.*
  126. %{_datadir}/applications/%{app_id}.desktop
  127. %{_metainfodir}/%{app_id}.appdata.xml
  128.  
  129.  
  130. %changelog
  131. * Sat Dec 15 2018 Tomasz Tomasik <scx.mail@gmail.com> - 18.12.4-2
  132. - Updata AppData file
  133.  
  134. * Sat Dec 15 2018 Tomasz Tomasik <scx.mail@gmail.com> - 18.12.4-1
  135. - Initial package
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top