Browse Source

NEW sigil

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1632 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
1076d191ba
2 changed files with 134 additions and 0 deletions
  1. 119 0
      s/sigil/sigil-vl.spec
  2. 15 0
      s/sigil/sigil.desktop

+ 119 - 0
s/sigil/sigil-vl.spec

@@ -0,0 +1,119 @@
+%define pkgname Sigil
+
+%define _qt4_qmake		%{_libdir}/qt4/bin/qmake
+
+Name:		sigil
+Version:	0.2.4
+Release:	1%{?_dist_release}
+Summary:	A WYSIWYG ebook editor
+Summary(ja):	WYSIWYG 電子書籍エディタ
+License:	GPLv3
+Group:          Applications/Publishing
+Url:		http://sigil.googlecode.com/
+Source0:	http://sigil.googlecode.com/files/%{pkgname}-%{version}-Code.zip
+
+## Vine
+Source10:	sigil.desktop
+
+Patch0:		sigil-0.2.2-fix-format-string.patch
+# from Anssi: this makes it use system libs instead of bundled ones. Except for
+# libtidy which has some local hacks not present in system-provided libtidy.
+Patch1:		sigil-0.2.4-use-system-libs.patch
+
+BuildRequires:  desktop-file-utils
+BuildRequires:	unzip
+BuildRequires:	zlib-devel
+BuildRequires:	bzip2-devel
+BuildRequires:	cmake >= 2.6.0
+BuildRequires:	qt4-devel >= 4.6.0
+BuildRequires:	libboost-devel
+BuildRequires:	libboost-thread
+BuildRequires:	libboost-date-time
+
+BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
+
+Distribution:	Vine
+Vendor:		Project Vine
+Packager:	munepi
+
+%description
+Sigil is a multi-platform WYSIWYG ebook editor. 
+It is designed to edit books in ePub format.
+
+%description -l ja
+Sigil はマルチプラットフォームに対応した WYSIWYG 電子書籍エディタです。
+ePub 形式の電子書籍を編集するように設計されています。
+
+
+%prep
+%setup -q -n %{pkgname}-%{version}-Code
+%patch0 -p0 -b .format-string
+%patch1 -p1 -b .system-libs
+
+# fix end of line encoding for the docs:
+%__sed -i 's/\r//' ChangeLog.txt README.txt COPYING.txt
+
+%build
+unset QTDIR || : ; . /etc/profile.d/qt4.sh
+
+## from sigil-0.2.4-1mdv2011.0
+# there are only internal helper libs, and they need to be static as build
+# fails otherwise (they contain undefined symbols), and making them shared
+# libs wouldn't make sense anyway (they are not shared by anything else)
+# - Anssi 06/2010
+%__cmake -G "Unix Makefiles" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+    -DLIB_INSTALL_DIR:PATH=%{_libdir} \
+    -DQT_QMAKE_EXECUTABLE=%_qt4_qmake \
+    ;
+
+%__make %{?_smp_mflags}
+
+
+%install
+%__rm -rf %{buildroot}
+%__make install DESTDIR=%{buildroot}
+
+# install icons for the .desktop file
+for i in 16 32 48 128 256 512; do
+    [ -f src/Sigil/Resource_Files/icon/app_icon_${i}.png ] || exit 1
+    %__install -m644 -D src/Sigil/Resource_Files/icon/app_icon_${i}.png \
+	%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/sigil.png
+done
+
+# create a .desktop file:
+%__mkdir_p %{buildroot}%{_datadir}/applications
+
+desktop-file-install --vendor="vine" \
+    --dir=%{buildroot}%{_datadir}/applications \
+    %{SOURCE10}
+
+%clean
+%__rm -rf %buildroot
+
+%post
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
+fi 
+update-desktop-database &> /dev/null || :
+
+%postun
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
+fi 
+update-desktop-database &> /dev/null || :
+
+
+%files
+%defattr(-,root,root)
+%doc ChangeLog.txt README.txt COPYING.txt INSTALL.txt
+%{_bindir}/%{name}
+%{_datadir}/applications/*-%{name}.desktop
+%{_datadir}/icons/hicolor/*/apps/*.png
+
+%changelog
+* Sat Aug 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-1
+- initial build

+ 15 - 0
s/sigil/sigil.desktop

@@ -0,0 +1,15 @@
+[Desktop Entry]
+Name=Sigil
+Name[ja]=Sigil
+GenericName=WYSIWYG ebook editor
+GenericName[ja]=WYSIWYG 電子書籍エディタ
+Comment=Edit books in ePub format
+Comment[ja]=ePub 形式の電子書籍を編集します
+TryExec=sigil
+Exec=sigil %u
+StartupNotify=false
+Terminal=false
+Type=Application
+Icon=sigil
+Categories=Qt;Office;
+MimeType=application/epub+zip;