Browse Source

updated lyx-vl.spec: new upstream release

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@4218 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 12 years ago
parent
commit
c483864c1d
1 changed files with 48 additions and 66 deletions
  1. 48 66
      l/lyx/lyx-vl.spec

+ 48 - 66
l/lyx/lyx-vl.spec

@@ -2,33 +2,37 @@
 %define build_texmf	%{buildroot}%{texmf}
 
 %define exec_texhash  [ -x %{_bindir}/texhash     ] && PATH=%{_bindir}:$PATH %{_bindir}/texhash 2>/dev/null
-%define exec_updmap   [ -x %{_bindir}/updmap-sys  ] && PATH=%{_bindir}:$PATH %{_bindir}/updmap-sys --nostop 2>/dev/null
-%define exec_fmtutil  [ -x %{_bindir}/fmtutil-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/fmtutil-sys --all >/dev/null
-%define vartexfonts %{_var}/lib/texmf
 
-Summary: A WYSIWYM (What You See Is What You Mean) frontend to LaTeX
-Summary(ja): LaTeX形式で保存できる簡易ワープロ
+Summary: WYSIWYM (What You See Is What You Mean) word processor with LaTeX output
+Summary(ja): LaTeX 形式で保存できるワードプロセッサ
 Name: lyx
-Version: 1.6.8
+Version: 2.0.0
 Release: 1%{?_dist_release}
 License: GPLv2+
 Group: Applications/Editors
 URL: http://www.lyx.org/
-Source: ftp://ftp.lyx.org/pub/lyx/stable/%{name}-%{version}.tar.bz2
-#Source1: http://www.ring.gr.jp/pub/text/CTAN/macros/latex/contrib/koma-script/koma-script.tds.zip
+Source0: ftp://ftp.lyx.org/pub/lyx/stable/lyx-%{version}.tar.xz
 
+Source1: lyxrc.dist
 Source10: lyx.desktop
-Source11: lyxrc.dist
-Patch0: lyx-1.6.5-xdg_open.patch
+
+## upstreamable patches
+# submitted, but upstream rejected it.  we currently agree to disagree.
+Patch50: lyx-2.0.0rc1-xdg_open.patch
+# hunspell pkgconfig support
+Patch51: lyx-2.0.0-hunspell_pkgconfig.patch
 
 # vine
-Patch10: lyx-1.6.3-customize-vine.patch
+
 
 # BuildRequires: aiksaurus-devel
-BuildRequires:   aspell-devel
+# BuildRequires:   aspell-devel
+BuildRequires:   enchant-devel
+BuildRequires:   hunspell-devel
 BuildRequires:   libboost-devel
 BuildRequires:   libboost-filesystem
 BuildRequires:   libboost-signals
+BuildRequires:   libboost-regex
 BuildRequires:   desktop-file-utils
 BuildRequires:   gettext
 BuildRequires:   python
@@ -38,23 +42,15 @@ BuildRequires:   libpng-devel
 BuildRequires:   glib2-devel
 BuildRequires:   zlib-devel
 
-%if %{?_dist_release} == "vl6"
-Requires:        texlive
-Requires(post):  texlive
-%endif
-%if %{?_dist_release} == "vl5"
-Requires:        tetex
-Requires(post):  tetex
-Requires:        dvipdfmx
-Requires:        xdvik
-%endif
+Requires(post):  texlive-common
+Requires(postun): texlive-common
 Requires:        ghostscript
 Requires:        python
 Requires:        qt4
 Requires:        latex-xft-fonts
 
-Requires(hint):  xdg-utils
-Requires(hint):  rcs
+Requires:        xdg-utils
+Requires:        rcs
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
@@ -82,37 +78,36 @@ and let the computer take care of the rest.
 This is LyX built with the Qt frontend.
 
 %description -l ja
-LaTeX形式で出力もできる簡易ワープロです。数式の入力も簡単にできます。
+LaTeX形式で出力もできるワープロセッサです。数式の入力も簡単にできます。
 特別な知識が無くても、最小限の努力でプロ並の出力を得られるように設計
 してあります。
 
 
 %prep
 %setup -q
-%patch0 -p1 -b .xdg_open
 
-%patch10 -p1 -b .vine
+%patch50 -p1 -b .xdg_open
+%patch51 -p1 -b .hunspell_pkgconfig
 
+./autogen.sh
 
-%build
-unset QTDIR || : ; . /etc/profile.d/qt4.sh
-export QT4DIR=$(echo $QTDIR | %__sed -e "s,/lib$,,")
 
+%build
 %configure \
-    --enable-build-type=release \
     --disable-dependency-tracking \
     --disable-rpath \
+    --enable-build-type=release \
     --disable-debug \
     --enable-optimization="%{optflags}" \
+    --without-included-boost \
     --enable-shared \
     --disable-static \
     \
-    --with-qt4-dir=${QT4DIR} \
     --with-frontend=qt4 \
     --without-aiksaurus \
-    --with-aspell \
+    --with-enchant \
+    --with-hunspell \
     ;
-#    --without-included-boost \
 %__make %{?_smp_mflags}
 
 # # make sure all .gmo files are regenerated from .po files
@@ -123,30 +118,15 @@ export QT4DIR=$(echo $QTDIR | %__sed -e "s,/lib$,,")
 %__rm -rf ${RPM_BUILD_ROOT}
 %__make DESTDIR=${RPM_BUILD_ROOT} install
 
-# for pdf: ps2pdf, pdf3: dvipdfmx
-(cd ${RPM_BUILD_ROOT}%{_datadir}/lyx/images
-    ln -sf buffer-update_pdf2.png buffer-update_pdf.png
-    ln -sf buffer-update_pdf2.png buffer-update_pdf3.png
-    ln -sf buffer-view_pdf2.png buffer-view_pdf.png
-    ln -sf buffer-view_pdf2.png buffer-view_pdf3.png
-)
-
 # misc/extras
-%__install -p -m644 -D %{SOURCE11} %{buildroot}%{_datadir}/lyx/lyxrc.dist
+%__install -p -m644 -D %{SOURCE1} %{buildroot}%{_datadir}/lyx/lyxrc.dist
 
-# latex
+# Set up the lyx-specific class files where TeX can see them
 %__mkdir_p %{build_texmf}/tex/latex
-%__mv -f ${RPM_BUILD_ROOT}%{_datadir}/lyx/tex %{build_texmf}/tex/latex/lyx
-
-## it semms the newest Japanese translations already included in the upstream...
-#%__install -m 644 layouts/* ${RPM_BUILD_ROOT}%{_datadir}/lyx/layouts/
-#%__install -m 644 1.3.3/* ${RPM_BUILD_ROOT}%{_datadir}/lyx/doc/
-
-# # it semms the newest Japanese translations already included in the upstream...
-# install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_datadir}/locale/ja/LC_MESSAGES/lyx.mo
+%__mv %{buildroot}%{_datadir}/lyx/tex %{build_texmf}/tex/latex/lyx
 
 # desktop & icon
-desktop-file-install --vendor="Vine" \
+desktop-file-install --vendor="vine" \
   --dir="${RPM_BUILD_ROOT}%{_datadir}/applications" %{SOURCE10}
 %__install -p -D -m644 lib/images/lyx.png \
   %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/lyx.png
@@ -154,10 +134,9 @@ desktop-file-install --vendor="Vine" \
 # ghost'd files
 touch %{buildroot}%{_datadir}/lyx/lyxrc.defaults
 touch %{buildroot}%{_datadir}/lyx/{packages,textclass}.lst
-touch %{buildroot}%{_datadir}/lyx/doc/LaTeXConfig.lyx
 
 # unpackaged files
-rm -rf %{buildroot}%{_datadir}/lyx/fonts
+%__rm -rf %{buildroot}%{_datadir}/lyx/fonts
 
 %find_lang %{name}
 
@@ -167,18 +146,7 @@ rm -rf %{buildroot}%{_datadir}/lyx/fonts
 
 
 %post
-%{exec_texhash} >& /dev/null
-if [ -d %{_datadir}/lyx ]; then
-    cd %{_datadir}/lyx
-    echo -n "  "
-    echo "Configuring LyX for your system..."
-    %__python ./configure.py >& /dev/null || :
-fi
-
-update-desktop-database -q &> /dev/null
 touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
-gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
-
 
 %postun
 if [ $1 -eq 0 ] ; then
@@ -188,6 +156,12 @@ if [ $1 -eq 0 ] ; then
     gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
 fi
 
+%posttrans
+%{exec_texhash} >& /dev/null
+update-desktop-database -q &> /dev/null
+touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
+gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+
 
 %files -f %{name}.lang
 %defattr(-,root,root,-)
@@ -205,6 +179,14 @@ fi
 
 
 %changelog
+* Sat Jun 25 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2.0.0-1
+- new upstream release
+- dropped BuildRequires: aspell-devel
+- added BuildRequires: 
+  - libboost-regex
+  - enchant-devel
+  - hunspell-devel
+
 * Thu Dec 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.8-1
 - new upstream release