source: projects/specs/trunk/s/sigil/sigil-vl.spec @ 4109

Revision 4109, 4.0 KB checked in by shaolin, 13 years ago (diff)
  • sigil: updated to 0.3.4-2
    • add Patch2 to fix build failure on ppc
Line 
1%define pkgname Sigil
2
3%define _qt4_qmake              %{_libdir}/qt4/bin/qmake
4
5Name:           sigil
6Version:        0.3.4
7Release:        2%{?_dist_release}
8Summary:        A WYSIWYG ebook editor
9Summary(ja):    WYSIWYG 電子書籍エディタ
10License:        GPLv3
11Group:          Applications/Publishing
12Url:            http://sigil.googlecode.com/
13Source0:        http://sigil.googlecode.com/files/%{pkgname}-%{version}-Code.zip
14
15## Vine
16Source10:       sigil.desktop
17
18Patch0:         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.
21Patch1:         sigil-0.3.4-use-system-libs-vine.patch
22Patch2:         sigil-0.3.4-add-msse2-only-on-x86-archs.patch
23
24BuildRequires:  desktop-file-utils
25BuildRequires:  unzip
26BuildRequires:  zlib-devel
27BuildRequires:  bzip2-devel
28BuildRequires:  cmake >= 2.6.0
29BuildRequires:  qt4-devel >= 4.7.0
30BuildRequires:  libboost-devel
31BuildRequires:  libboost-thread
32BuildRequires:  libboost-date-time
33BuildRequires:  libboost-filesystem
34BuildRequires:  libboost-regex
35#BuildRequires: xerces-c-devel
36
37BuildRoot:      %{_tmppath}/%{name}-%{version}-root
38
39Distribution:   Vine
40Vendor:         Project Vine
41Packager:       munepi
42
43%description
44Sigil is a free, open source WYSIWYG ebook editor.
45It is designed to edit books in ePub format.
46
47%description -l ja
48Sigil はオープンソース WYSIWYG 電子書籍エディタです。
49ePub 形式の電子書籍を編集するように設計されています。
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
63unset 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
90for 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
94done
95
96# create a .desktop file:
97%__mkdir_p %{buildroot}%{_datadir}/applications
98
99desktop-file-install --vendor="vine" \
100    --dir=%{buildroot}%{_datadir}/applications \
101    %{SOURCE10}
102
103%clean
104%__rm -rf %buildroot
105
106%post
107touch --no-create %{_datadir}/icons/hicolor
108if [ -x %{_bindir}/gtk-update-icon-cache ]; then
109  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
110fi
111update-desktop-database &> /dev/null || :
112
113%postun
114touch --no-create %{_datadir}/icons/hicolor
115if [ -x %{_bindir}/gtk-update-icon-cache ]; then
116  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
117fi
118update-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
Note: See TracBrowser for help on using the repository browser.