Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > b0a2834dd6e3a81e2fc6874fb8bf6707 > files > 3

lyx-1.6.5-5mdv2010.1.src.rpm

Name:		lyx
Summary:	A word processor for the Desktop Environment
Version:	1.6.5
Release:	%mkrel 5
Source:		ftp://ftp.lyx.org/pub/lyx/stable/1.6.x/%name-%version.tar.bz2
# use xdg-open instead of hard coded applications to open files
# sent to upstream developers by fhimpe on 4 Jun 2009
Patch0:		lyx-1.6.4-xdg_open.patch
URL:		http://www.lyx.org/
Group:		Office

BuildRequires:	qt4-devel xpm-devel libjpeg-devel
#BuildRequires:	chrpath
BuildRequires:	gcc-c++
BuildRequires:	gettext
BuildRequires:	ghostscript groff-for-man sgml-tools
BuildRequires:	tetex-dvips tetex-latex texinfo
BuildRequires:	libboost-devel
BuildRequires:	aspell-devel
BuildRequires:	python
BuildRequires:	imagemagick
Obsoletes:      lyx-gtk

Requires:	tetex tetex-latex tetex-dvips tetex-cmsuper fonts-ttf-latex 
Requires:	xdg-utils

BuildRoot:	%_tmppath/%name-%version-%release-root
License:	GPLv2+

%description
LyX is a modern approach of writing documents with a computer
which breaks with the tradition of the obsolete typewriter
concept.  It is designed for people who want a professional
output with a minimum of time effort, without becoming specia-
lists in typesetting.  Compared to common word processors LyX
will increase the productivity a lot, since most of the type-
setting will be done by the computer, not the author.  With LyX
the author can concentrate on the contents of his writing,
since the computer will take care of the look.

%prep
%setup -q
%patch0 -p1 -b .xdg-open

%build

%define common_opt --without-aiksaurus --enable-compression-support --without-included-boost
mkdir qt-build
pushd qt-build
CONFIGURE_TOP=.. %configure2_5x --with-frontend=qt4 --with-qt-dir=%{qt4dir} --with-qt-libraries=%{qt4lib} --disable-rpath %common_opt
make
popd

%install
rm -rf %{buildroot}
pushd qt-build
%makeinstall_std
mv %buildroot/%_bindir/%name %buildroot/%name
popd
mv %buildroot/%name %buildroot/%_bindir/%name

mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/mandriva-lyx.desktop << EOF
[Desktop Entry]
Name=LyX
Comment=TeX document processor - especially good at scientific documents
Exec=%{_bindir}/lyx
Icon=lyx
Terminal=false
Type=Application
Categories=Qt;Office;WordProcessor;X-MandrivaLinux-CrossDesktop;
MimeType=application/x-lyx;
EOF


## icons
mkdir -p %{buildroot}/%_liconsdir
convert -size 48x48 development/Win32/packaging/icons/lyx_32x32.png %{buildroot}/%_liconsdir/%name.png
mkdir -p %{buildroot}/%_iconsdir
cp development/Win32/packaging/icons/lyx_32x32.png %{buildroot}/%_iconsdir/%name.png
mkdir -p %{buildroot}/%_miconsdir
convert -size 16x16 development/Win32/packaging/icons/lyx_32x32.png %{buildroot}/%_miconsdir/%name.png

## Set up the lyx-specific class files where TeX can see then
TEXMF=%{_datadir}/texmf
mkdir -p %{buildroot}${TEXMF}/tex/latex
cp -r %{buildroot}%_datadir/lyx/tex %{buildroot}${TEXMF}/tex/latex/lyx
chmod +x %{buildroot}%_datadir/lyx/configure.py
rm -f %{buildroot}%_bindir/listerrors

%find_lang %name
find %{buildroot}%_datadir/%name -type f | sed -e "s@%{buildroot}@@g" \
	-e "s@%_datadir/%name/doc/\(..\)_@%lang(\1) %_datadir/%name/doc/\1_@g" \
	-e "s@\(%_datadir/%name/configure.py\)\$@%attr(755,root,root) \1@g" \
	-e "s@\(%_datadir/%name/scripts/\)@%attr(755,root,root) \1@g" \
	-e "s@\(%_datadir/%name/lyx2lyx/\)@%attr(755,root,root) \1@g" \
	>> %name.lang
find %{buildroot}%_datadir/%name -type d | sed -e "s@%{buildroot}@%dir @g" >> %name.lang

#chrpath -d %{buildroot}%_bindir/%name

%post
%if %mdkversion < 200900
%update_menus
%endif
## Fix the TeX file hash
texhash
## Before configuring lyx for the local system 
## PATH needs to be imported
if [ -f /etc/profile ]; then
    . /etc/profile
fi
## Now configure LyX
cd %_datadir/lyx
./configure.py > /dev/null

%if %mdkversion < 200900
%postun
%clean_menus
%endif

%clean
rm -rf %{buildroot}

%files -f %name.lang
%defattr (-,root,root)
%doc README ANNOUNCE
%_bindir/%name
%_bindir/lyxclient
%_bindir/tex2lyx
%_mandir/man1/*
#%_datadir/%name
%_datadir/texmf/tex/latex/lyx
%_liconsdir/%name.png
%_iconsdir/%name.png
%_miconsdir/%name.png
%_datadir/applications/mandriva-lyx.desktop


%changelog
* Mon Mar 01 2010 Ahmad Samir <ahmadsamir@mandriva.org> 1.6.5-5mdv2010.1
+ Revision: 513090
- add MimeType entry to .desktop file (fix mdv bug#57941)

* Wed Feb 17 2010 Lev Givon <lev@mandriva.org> 1.6.5-4mdv2010.1
+ Revision: 507054
- Require tetex-cmsuper (#42320).

* Mon Feb 08 2010 Anssi Hannula <anssi@mandriva.org> 1.6.5-3mdv2010.1
+ Revision: 501882
- rebuild for new boost

* Wed Feb 03 2010 Funda Wang <fwang@mandriva.org> 1.6.5-2mdv2010.1
+ Revision: 500056
- rebuild for new boost

* Mon Dec 07 2009 Funda Wang <fwang@mandriva.org> 1.6.5-1mdv2010.1
+ Revision: 474311
- new version 1.6.5

* Mon Aug 24 2009 Frederik Himpe <fhimpe@mandriva.org> 1.6.4-1mdv2010.0
+ Revision: 420589
- Update to new version 1.6.4
- Updated xdg_open patch from Fedora

* Fri Aug 21 2009 Funda Wang <fwang@mandriva.org> 1.6.3-2mdv2010.0
+ Revision: 418799
- rebuild for new boost

* Thu Jun 04 2009 Frederik Himpe <fhimpe@mandriva.org> 1.6.3-1mdv2010.0
+ Revision: 382855
- Update to new version 1.6.3
- Use system boost
- Rediff xdg-open patch

* Mon Mar 16 2009 Frederik Himpe <fhimpe@mandriva.org> 1.6.2-1mdv2009.1
+ Revision: 355584
- Update to new version 1.6.2

* Mon Dec 15 2008 Thierry Vignaud <tv@mandriva.org> 1.6.1-1mdv2009.1
+ Revision: 314457
- new release

  + Oden Eriksson <oeriksson@mandriva.com>
    - lowercase ImageMagick

* Sat Nov 15 2008 Frederik Himpe <fhimpe@mandriva.org> 1.6.0-2mdv2009.1
+ Revision: 303592
- Add patch from upstream svn fixing error when running configure.py
- Use %%{buildroot} instead of $RPM_BUILD_ROOT in SPEC file
- use xdg-open to open files (bug #42866), patch from Fedora

* Tue Nov 11 2008 Frederik Himpe <fhimpe@mandriva.org> 1.6.0-1mdv2009.1
+ Revision: 302104
- update to new version 1.6.0

* Tue Jul 29 2008 Funda Wang <fwang@mandriva.org> 1.5.6-2mdv2009.0
+ Revision: 252453
- should be GPLv2+

* Tue Jul 29 2008 Funda Wang <fwang@mandriva.org> 1.5.6-1mdv2009.0
+ Revision: 252397
- New version 1.5.6

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Sun May 11 2008 Funda Wang <fwang@mandriva.org> 1.5.5-1mdv2009.0
+ Revision: 205569
- use configure2_5x
- Drop merged patch
- New version 1.5.5

  + Nicolas Lécureuil <nlecureuil@mandriva.com>
    - Add patch0 to fix build with qt 4.4

* Fri May 09 2008 Nicolas Lécureuil <nlecureuil@mandriva.com> 1.5.4-2mdv2009.0
+ Revision: 205347
- Rebuild against new Qt 4

* Tue Feb 26 2008 Frederik Himpe <fhimpe@mandriva.org> 1.5.4-1mdv2008.1
+ Revision: 175515
- New upstream release
- Remove some usless and huge doc files
- Make its menu entry CrossDesktop: GNOME users don't have a native
  alternative

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Wed Jan 02 2008 Thierry Vignaud <tv@mandriva.org> 1.5.3-1mdv2008.1
+ Revision: 140663
- further fix build with latest qt4
- fix build with latest qt4
- new release
- kill re-definition of %%buildroot on Pixel's request

* Tue Dec 11 2007 Thierry Vignaud <tv@mandriva.org> 1.5.2-3mdv2008.1
+ Revision: 117292
- release

* Thu Oct 11 2007 Thierry Vignaud <tv@mandriva.org> 1.5.2-2mdv2008.1
+ Revision: 97131
- obsoletes lyx-gtk

* Thu Oct 11 2007 Funda Wang <fwang@mandriva.org> 1.5.2-1mdv2008.1
+ Revision: 97054
- New version 1.5.2

  + Thierry Vignaud <tv@mandriva.org>
    - kill desktop-file-validate's error: string list key "Categories" in group "Desktop Entry" does not have a semicolon (";") as trailing character

* Thu Aug 16 2007 Austin Acton <austin@mandriva.org> 1.5.1-1mdv2008.0
+ Revision: 63983
- new version

* Wed Aug 01 2007 Thierry Vignaud <tv@mandriva.org> 1.5.0-1mdv2008.0
+ Revision: 57762
- new release (using qt4)
- fix build when both qt3 & qt4 are installed
- drop gtk+ backend since it's no more in main sources


* Tue Mar 13 2007 Emmanuel Blindauer <blindauer@mandriva.org> 1.4.4-1mdv2007.1
+ Revision: 143234
- new version (1.4.4 bugfixes)

* Fri Nov 24 2006 Thierry Vignaud <tvignaud@mandriva.com> 1.4.3-1mdv2007.1
+ Revision: 86989
- new release

* Tue Sep 12 2006 Thierry Vignaud <tvignaud@mandriva.com> 1.4.2-2mdv2007.0
+ Revision: 60856
- rebuild for new libcairomm

* Fri Jul 28 2006 Thierry Vignaud <tvignaud@mandriva.com> 1.4.2-1mdv2007.0
+ Revision: 42333
- fix meny entry
- new release
- new release
- XDG menu
- sync with cooker

  + Andreas Hasenack <andreas@mandriva.com>
    - renamed mdv to packages because mdv is too generic and it's hosting only packages anyway

  + Helio Chissini de Castro <helio@mandriva.com>
    - We are Mandriva now
    - Uploading package ./lyx

* Wed Jan 19 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.3.5-2mdk
- remove dependancy on xform (#13097)

* Fri Nov 05 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.3.5-1mdk
- new release
- kill patches 5 & 6

* Fri Aug 06 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.3.4-5mdk
- build release

* Wed Jun 09 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.3.4-4mdk
- patch 6: fix LANGUAGE=lang1:lang2 fallback support (pablo)
  thus enabling to remove lyx wrapper

* Wed Jun 09 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.3.4-3mdk
- rebuild for new g++
- patch 5: fix build with g++-3.4.x

* Fri Apr 16 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.3.4-2mdk
- fix build, hit titi