djview-vl.spec 3.1 KB

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