]> git.lyx.org Git - lyx.git/blob - development/lyx.spec.in
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / development / lyx.spec.in
1 %define frontend @RPM_FRONTEND@
2 %define version_suffix @RPM_VERSION_SUFFIX@
3
4 Summary: A WYSIWYM (What You See Is What You Mean) frontend to LaTeX
5 Name: @PACKAGE@
6 Version: @VERSION@
7 Release: 1_%{frontend}
8 Copyright: see COPYING file
9 Group: Applications/Publishing
10 URL: http://www.lyx.org/
11 Packager: Kayvan A. Sylvan <kayvan@sylvan.com>
12 Source: ftp://ftp.lyx.org/pub/lyx/stable/%{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-root
14 Icon: %{name}.xpm
15 Prefix: %{_prefix}
16 Obsoletes: tetex-lyx
17
18 %description
19 LyX is a modern approach to writing documents which breaks with the
20 obsolete "typewriter paradigm" of most other document preparation
21 systems.
22
23 It is designed for people who want professional quality output
24 with a minimum of time and effort, without becoming specialists in
25 typesetting.
26
27 The major innovation in LyX is WYSIWYM (What You See Is What You Mean).
28 That is, the author focuses on content, not on the details of formatting.
29 This allows for greater productivity, and leaves the final typesetting
30 to the backends (like LaTeX) that are specifically designed for the task.
31
32 With LyX, the author can concentrate on the contents of his writing,
33 and let the computer take care of the rest.
34
35 This is LyX built with the %{frontend} frontend.
36
37 %prep
38 %setup
39
40 %build
41 unset LINGUAS || true
42 ./configure --with-frontend=%{frontend} --prefix=%{_prefix} \
43         --mandir=%{_mandir} --bindir=%{_bindir} --datadir=%{_datadir} \
44         --without-warnings --disable-debug --enable-optimization=-O2 \
45         %{version_suffix}
46 make
47
48 %install
49 unset LINGUAS || true
50 rm -rf ${RPM_BUILD_ROOT}
51 install -d -m 755 ${RPM_BUILD_ROOT}
52 make DESTDIR=${RPM_BUILD_ROOT} install
53 gzip -f9 ${RPM_BUILD_ROOT}%{_mandir}/man?/*
54
55 #
56 # Set up the lyx-specific class files where TeX can see them
57 #
58 TEXMF=%{_datadir}/texmf
59 mkdir -p ${RPM_BUILD_ROOT}${TEXMF}/tex/latex
60 mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}/tex \
61       ${RPM_BUILD_ROOT}/${TEXMF}/tex/latex/%{name}
62
63 #
64 # Miscellaneous files
65 #
66 # Don't use %{name}.xpm, this will not work with --version-suffix
67 cp -a lib/images/lyx.xpm ${RPM_BUILD_ROOT}%{_datadir}/%{name}/images/
68 cp lib/reLyX/README README.reLyX
69
70 %clean
71 rm -rf ${RPM_BUILD_ROOT}
72
73 %post
74 # Make TeX understand where LyX-specific packages are
75 texhash
76
77 # Before configuring lyx for the local system
78 # PATH needs to be imported
79 if [ -f /etc/profile ]; then
80     . /etc/profile
81 fi
82 #
83 # Now configure LyX
84 #
85 echo "Configuring LyX for your system..."
86 cd %{_datadir}/%{name}
87 ./configure --srcdir
88
89 # Fix reLyX perl program if the prefix is non-standard
90 if [ "%{_prefix}" != "/usr" ]
91 then
92     perl -pi -e "s!/usr/share/%{name}!%{_datadir}/%{name}!" %{_bindir}/reLyX
93 fi
94
95 %postun
96 # Fix the TeX file hash
97 #
98 texhash
99
100 %files
101 %defattr(-,root,root)
102 %doc ABOUT-NLS ANNOUNCE COPYING
103 %doc README UPGRADING ChangeLog NEWS
104 %doc lib/CREDITS README.reLyX
105 %{_bindir}/*
106 %{_mandir}/man?/*
107 %{_datadir}/locale/*/LC_MESSAGES/*
108 %{_datadir}/%{name}
109 %{_datadir}/texmf/tex/latex/%{name}