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

Revision 2727, 3.8 KB checked in by munepi, 13 years ago (diff)

updted sigil-vl.spec

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