djview-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. Summary: DjVu viewer
  2. Summary(ja): DjVu 画像ファイルのビュアー
  3. Name: djview
  4. Version: 4.9
  5. Release: 1%{?_dist_release}
  6. License: GPLv2 and BSD
  7. Group: Applications/Graphics
  8. URL: http://djvu.sourceforge.net/djview4.html
  9. Source: http://downloads.sourceforge.net/djvu/%{name}-%{version}.tar.gz
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  11. BuildRequires: qt4-devel >= 4.2
  12. BuildRequires: djvulibre-devel >= 3.5.19
  13. BuildRequires: desktop-file-utils
  14. Requires(post): desktop-file-utils
  15. Requires(post): shared-mime-info
  16. Requires(postun): desktop-file-utils
  17. Requires(postun): shared-mime-info
  18. Distribution: Project Vine
  19. Vendor: Vine Linux
  20. Packager: owa
  21. %description
  22. DjView4 is a viewer and browser plugin for DjVu documents,
  23. based on the DjVuLibre-3.5 library and the Qt4 toolkit.
  24. %package plugin
  25. Summary: The plug-in files needed for Fx browser.
  26. Summary(ja): Fx ウェブブラウザ用の DjView プラグイン
  27. Group: Applications/Internet
  28. Requires: %{name} = %{version}
  29. Obsoletes: djvulibre-plugin <= 3.5.22
  30. %description plugin
  31. Djview plug-in files for fx browser.
  32. %prep
  33. %setup -q -n djview4-%{version}
  34. %build
  35. %configure QTDIR=`pkg-config --variable=prefix Qt`
  36. make %{?_smp_mflags}
  37. %install
  38. rm -rf %{buildroot}
  39. make DESTDIR=%{buildroot} install
  40. mv %{buildroot}/%{_libdir}/netscape %{buildroot}/%{_libdir}/mozilla
  41. cat > %{name}.desktop <<EOF
  42. [Desktop Entry]
  43. Encoding=UTF-8
  44. Type=Application
  45. Categories=Application;Graphics;
  46. MimeType=image/x-djvu;image/x.djvu;image/vnd.djvu;
  47. Name=DjView
  48. Name[ja]=Djvuビュアー
  49. Exec=%{name} %f
  50. Comment=Standalone Djvu Viewer
  51. Comment[ja]=スタンドアロンでDjvu画像を表示するツールです
  52. Terminal=false
  53. Icon=%{name}
  54. EOF
  55. desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{name}.desktop
  56. mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
  57. mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
  58. install -m644 ./desktopfiles/hi32-djview4.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
  59. install -m644 ./desktopfiles/hi64-djview4.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
  60. %post
  61. touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
  62. %posttrans
  63. update-desktop-database -q &> /dev/null ||:
  64. update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :
  65. if [ -x /usr/bin/gtk-update-icon-cache ]; then
  66. /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
  67. fi
  68. %postun
  69. if [ $1 -eq 0 ] ; then
  70. touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
  71. update-desktop-database -q &> /dev/null ||:
  72. update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :
  73. if [ -x /usr/bin/gtk-update-icon-cache ]; then
  74. /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
  75. fi
  76. fi
  77. %clean
  78. rm -rf %{buildroot}
  79. %files
  80. %defattr(-, root, root)
  81. %doc COPYRIGHT COPYING INSTALL NEWS README*
  82. %{_bindir}
  83. %{_datadir}/djvu/djview4
  84. %{_datadir}/applications/%{name}.desktop
  85. %{_datadir}/icons/hicolor/*/apps/*.png
  86. %{_mandir}/*
  87. %files plugin
  88. %defattr(-, root, root)
  89. %{_libdir}/mozilla/plugins/nsdejavu.so
  90. %changelog
  91. * Mon Feb 09 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.9-1
  92. - updated to 4.9
  93. - built with current VineSeed
  94. - moved to Applications/Graphics
  95. - used 'fx' as browser name at plugin subpackage summary
  96. * Mon May 02 2011 Shu KONNO <owa@bg.wakwak.com> 4.7-2
  97. - install desktop files
  98. * Sun May 01 2011 Shu KONNO <owa@bg.wakwak.com> 4.7-1
  99. - initial build for VineLinux