[1632] | 1 | %define pkgname Sigil |
---|
| 2 | |
---|
| 3 | %define _qt4_qmake %{_libdir}/qt4/bin/qmake |
---|
| 4 | |
---|
| 5 | Name: sigil |
---|
| 6 | Version: 0.2.4 |
---|
[2540] | 7 | Release: 2%{?_dist_release} |
---|
[1632] | 8 | Summary: A WYSIWYG ebook editor |
---|
| 9 | Summary(ja): WYSIWYG 電子書籍エディタ |
---|
| 10 | License: GPLv3 |
---|
| 11 | Group: Applications/Publishing |
---|
| 12 | Url: http://sigil.googlecode.com/ |
---|
| 13 | Source0: http://sigil.googlecode.com/files/%{pkgname}-%{version}-Code.zip |
---|
| 14 | |
---|
| 15 | ## Vine |
---|
| 16 | Source10: sigil.desktop |
---|
| 17 | |
---|
| 18 | Patch0: sigil-0.2.2-fix-format-string.patch |
---|
| 19 | # from Anssi: this makes it use system libs instead of bundled ones. Except for |
---|
| 20 | # libtidy which has some local hacks not present in system-provided libtidy. |
---|
| 21 | Patch1: sigil-0.2.4-use-system-libs.patch |
---|
| 22 | |
---|
| 23 | BuildRequires: desktop-file-utils |
---|
| 24 | BuildRequires: unzip |
---|
| 25 | BuildRequires: zlib-devel |
---|
| 26 | BuildRequires: bzip2-devel |
---|
| 27 | BuildRequires: cmake >= 2.6.0 |
---|
| 28 | BuildRequires: qt4-devel >= 4.6.0 |
---|
| 29 | BuildRequires: libboost-devel |
---|
| 30 | BuildRequires: libboost-thread |
---|
| 31 | BuildRequires: libboost-date-time |
---|
| 32 | |
---|
| 33 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 34 | |
---|
| 35 | Distribution: Vine |
---|
| 36 | Vendor: Project Vine |
---|
| 37 | Packager: munepi |
---|
| 38 | |
---|
| 39 | %description |
---|
| 40 | Sigil is a multi-platform WYSIWYG ebook editor. |
---|
| 41 | It is designed to edit books in ePub format. |
---|
| 42 | |
---|
| 43 | %description -l ja |
---|
| 44 | Sigil はマルチプラットフォームに対応した WYSIWYG 電子書籍エディタです。 |
---|
| 45 | ePub 形式の電子書籍を編集するように設計されています。 |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | %prep |
---|
| 49 | %setup -q -n %{pkgname}-%{version}-Code |
---|
| 50 | %patch0 -p0 -b .format-string |
---|
| 51 | %patch1 -p1 -b .system-libs |
---|
| 52 | |
---|
| 53 | # fix end of line encoding for the docs: |
---|
| 54 | %__sed -i 's/\r//' ChangeLog.txt README.txt COPYING.txt |
---|
| 55 | |
---|
| 56 | %build |
---|
| 57 | unset QTDIR || : ; . /etc/profile.d/qt4.sh |
---|
| 58 | |
---|
| 59 | ## from sigil-0.2.4-1mdv2011.0 |
---|
| 60 | # there are only internal helper libs, and they need to be static as build |
---|
| 61 | # fails otherwise (they contain undefined symbols), and making them shared |
---|
| 62 | # libs wouldn't make sense anyway (they are not shared by anything else) |
---|
| 63 | # - Anssi 06/2010 |
---|
| 64 | %__cmake -G "Unix Makefiles" \ |
---|
| 65 | -DCMAKE_BUILD_TYPE=Release \ |
---|
| 66 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ |
---|
| 67 | -DLIB_INSTALL_DIR:PATH=%{_libdir} \ |
---|
| 68 | -DQT_QMAKE_EXECUTABLE=%_qt4_qmake \ |
---|
| 69 | ; |
---|
| 70 | |
---|
| 71 | %__make %{?_smp_mflags} |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | %install |
---|
| 75 | %__rm -rf %{buildroot} |
---|
| 76 | %__make install DESTDIR=%{buildroot} |
---|
| 77 | |
---|
| 78 | # install icons for the .desktop file |
---|
| 79 | for i in 16 32 48 128 256 512; do |
---|
| 80 | [ -f src/Sigil/Resource_Files/icon/app_icon_${i}.png ] || exit 1 |
---|
| 81 | %__install -m644 -D src/Sigil/Resource_Files/icon/app_icon_${i}.png \ |
---|
| 82 | %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/sigil.png |
---|
| 83 | done |
---|
| 84 | |
---|
| 85 | # create a .desktop file: |
---|
| 86 | %__mkdir_p %{buildroot}%{_datadir}/applications |
---|
| 87 | |
---|
| 88 | desktop-file-install --vendor="vine" \ |
---|
| 89 | --dir=%{buildroot}%{_datadir}/applications \ |
---|
| 90 | %{SOURCE10} |
---|
| 91 | |
---|
| 92 | %clean |
---|
| 93 | %__rm -rf %buildroot |
---|
| 94 | |
---|
| 95 | %post |
---|
| 96 | touch --no-create %{_datadir}/icons/hicolor |
---|
| 97 | if [ -x %{_bindir}/gtk-update-icon-cache ]; then |
---|
| 98 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor |
---|
| 99 | fi |
---|
| 100 | update-desktop-database &> /dev/null || : |
---|
| 101 | |
---|
| 102 | %postun |
---|
| 103 | touch --no-create %{_datadir}/icons/hicolor |
---|
| 104 | if [ -x %{_bindir}/gtk-update-icon-cache ]; then |
---|
| 105 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor |
---|
| 106 | fi |
---|
| 107 | update-desktop-database &> /dev/null || : |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | %files |
---|
| 111 | %defattr(-,root,root) |
---|
| 112 | %doc ChangeLog.txt README.txt COPYING.txt INSTALL.txt |
---|
| 113 | %{_bindir}/%{name} |
---|
| 114 | %{_datadir}/applications/*-%{name}.desktop |
---|
| 115 | %{_datadir}/icons/hicolor/*/apps/*.png |
---|
| 116 | |
---|
| 117 | %changelog |
---|
[2540] | 118 | * Fri Jan 21 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-2 |
---|
| 119 | - rebuilt with current libboost |
---|
| 120 | |
---|
[1632] | 121 | * Sat Aug 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-1 |
---|
| 122 | - initial build |
---|