1 | %define pkgname Sigil |
---|
2 | |
---|
3 | %define _qt4_qmake %{_libdir}/qt4/bin/qmake |
---|
4 | |
---|
5 | Name: sigil |
---|
6 | Version: 0.3.4 |
---|
7 | Release: 2%{?_dist_release} |
---|
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.3.4-use-system-libs-vine.patch |
---|
22 | Patch2: sigil-0.3.4-add-msse2-only-on-x86-archs.patch |
---|
23 | |
---|
24 | BuildRequires: desktop-file-utils |
---|
25 | BuildRequires: unzip |
---|
26 | BuildRequires: zlib-devel |
---|
27 | BuildRequires: bzip2-devel |
---|
28 | BuildRequires: cmake >= 2.6.0 |
---|
29 | BuildRequires: qt4-devel >= 4.7.0 |
---|
30 | BuildRequires: libboost-devel |
---|
31 | BuildRequires: libboost-thread |
---|
32 | BuildRequires: libboost-date-time |
---|
33 | BuildRequires: libboost-filesystem |
---|
34 | BuildRequires: libboost-regex |
---|
35 | #BuildRequires: xerces-c-devel |
---|
36 | |
---|
37 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
38 | |
---|
39 | Distribution: Vine |
---|
40 | Vendor: Project Vine |
---|
41 | Packager: munepi |
---|
42 | |
---|
43 | %description |
---|
44 | Sigil is a free, open source WYSIWYG ebook editor. |
---|
45 | It is designed to edit books in ePub format. |
---|
46 | |
---|
47 | %description -l ja |
---|
48 | Sigil はオープンソース WYSIWYG 電子書籍エディタです。 |
---|
49 | ePub 形式の電子書籍を編集するように設計されています。 |
---|
50 | |
---|
51 | |
---|
52 | %prep |
---|
53 | %setup -q -n %{pkgname}-%{version}-Code |
---|
54 | %patch0 -p0 -b .format-string |
---|
55 | %patch1 -p1 -b .system-libs |
---|
56 | %patch2 -p1 -b .x86-archs-only |
---|
57 | |
---|
58 | #%__rm -fr src/BoostParts |
---|
59 | # fix end of line encoding for the docs: |
---|
60 | %__sed -i 's/\r//' ChangeLog.txt README.txt COPYING.txt |
---|
61 | |
---|
62 | %build |
---|
63 | unset QTDIR || : ; . /etc/profile.d/qt4.sh |
---|
64 | |
---|
65 | ## from sigil-0.3.4-1mdv2011.0 |
---|
66 | # there are only internal helper libs, and they need to be static as build |
---|
67 | # fails otherwise (they contain undefined symbols), and making them shared |
---|
68 | # libs wouldn't make sense anyway (they are not shared by anything else) |
---|
69 | # - Anssi 06/2010 |
---|
70 | %__cmake -G "Unix Makefiles" \ |
---|
71 | -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON \ |
---|
72 | -DCMAKE_BUILD_TYPE=Release \ |
---|
73 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ |
---|
74 | -DLIB_INSTALL_DIR:PATH=%{_libdir} \ |
---|
75 | -DQT_QMAKE_EXECUTABLE=%_qt4_qmake \ |
---|
76 | ; |
---|
77 | |
---|
78 | %__make %{?_smp_mflags} |
---|
79 | |
---|
80 | |
---|
81 | %install |
---|
82 | %__rm -rf %{buildroot} |
---|
83 | %__make install DESTDIR=%{buildroot} |
---|
84 | |
---|
85 | # remove unused files |
---|
86 | %__rm %{buildroot}%{_datadir}/pixmaps/sigil.png || exit 1 |
---|
87 | %__rm %{buildroot}%{_datadir}/applications/sigil.desktop || exit 1 |
---|
88 | |
---|
89 | # install icons for the .desktop file |
---|
90 | for i in 16 32 48 128 256 512; do |
---|
91 | [ -f src/Sigil/Resource_Files/icon/app_icon_${i}.png ] || exit 1 |
---|
92 | %__install -m644 -D src/Sigil/Resource_Files/icon/app_icon_${i}.png \ |
---|
93 | %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/sigil.png || exit 1 |
---|
94 | done |
---|
95 | |
---|
96 | # create a .desktop file: |
---|
97 | %__mkdir_p %{buildroot}%{_datadir}/applications |
---|
98 | |
---|
99 | desktop-file-install --vendor="vine" \ |
---|
100 | --dir=%{buildroot}%{_datadir}/applications \ |
---|
101 | %{SOURCE10} |
---|
102 | |
---|
103 | %clean |
---|
104 | %__rm -rf %buildroot |
---|
105 | |
---|
106 | %post |
---|
107 | touch --no-create %{_datadir}/icons/hicolor |
---|
108 | if [ -x %{_bindir}/gtk-update-icon-cache ]; then |
---|
109 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor |
---|
110 | fi |
---|
111 | update-desktop-database &> /dev/null || : |
---|
112 | |
---|
113 | %postun |
---|
114 | touch --no-create %{_datadir}/icons/hicolor |
---|
115 | if [ -x %{_bindir}/gtk-update-icon-cache ]; then |
---|
116 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor |
---|
117 | fi |
---|
118 | update-desktop-database &> /dev/null || : |
---|
119 | |
---|
120 | |
---|
121 | %files |
---|
122 | %defattr(-,root,root) |
---|
123 | %doc ChangeLog.txt README.txt COPYING.txt INSTALL.txt |
---|
124 | %{_bindir}/%{name} |
---|
125 | %{_datadir}/applications/*-%{name}.desktop |
---|
126 | %{_datadir}/icons/hicolor/*/apps/*.png |
---|
127 | |
---|
128 | %changelog |
---|
129 | * Sat Jun 11 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.3.4-2 |
---|
130 | - add Patch2 to fix build failure on ppc |
---|
131 | |
---|
132 | * Sun Feb 20 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.3.4-1 |
---|
133 | - new upstream release |
---|
134 | - added BuildRequires: libboost-filesystem, libboost-regex |
---|
135 | |
---|
136 | * Fri Jan 21 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-2 |
---|
137 | - rebuilt with current libboost |
---|
138 | |
---|
139 | * Sat Aug 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-1 |
---|
140 | - initial build |
---|