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