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