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

Revision 1632, 3.3 KB checked in by munepi, 14 years ago (diff)

NEW sigil

Line 
1%define pkgname Sigil
2
3%define _qt4_qmake              %{_libdir}/qt4/bin/qmake
4
5Name:           sigil
6Version:        0.2.4
7Release:        1%{?_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.2.4-use-system-libs.patch
22
23BuildRequires:  desktop-file-utils
24BuildRequires:  unzip
25BuildRequires:  zlib-devel
26BuildRequires:  bzip2-devel
27BuildRequires:  cmake >= 2.6.0
28BuildRequires:  qt4-devel >= 4.6.0
29BuildRequires:  libboost-devel
30BuildRequires:  libboost-thread
31BuildRequires:  libboost-date-time
32
33BuildRoot:      %{_tmppath}/%{name}-%{version}-root
34
35Distribution:   Vine
36Vendor:         Project Vine
37Packager:       munepi
38
39%description
40Sigil is a multi-platform WYSIWYG ebook editor.
41It is designed to edit books in ePub format.
42
43%description -l ja
44Sigil はマルチプラットフォームに対応した WYSIWYG 電子書籍エディタです。
45ePub 形式の電子書籍を編集するように設計されています。
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
57unset 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
79for 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
83done
84
85# create a .desktop file:
86%__mkdir_p %{buildroot}%{_datadir}/applications
87
88desktop-file-install --vendor="vine" \
89    --dir=%{buildroot}%{_datadir}/applications \
90    %{SOURCE10}
91
92%clean
93%__rm -rf %buildroot
94
95%post
96touch --no-create %{_datadir}/icons/hicolor
97if [ -x %{_bindir}/gtk-update-icon-cache ]; then
98  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
99fi
100update-desktop-database &> /dev/null || :
101
102%postun
103touch --no-create %{_datadir}/icons/hicolor
104if [ -x %{_bindir}/gtk-update-icon-cache ]; then
105  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
106fi
107update-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
118* Sat Aug 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-1
119- initial build
Note: See TracBrowser for help on using the repository browser.