]> git.lyx.org Git - lyx.git/blob - development/lyx.spec.in
d9f6a1dd64a46b9a0ef8436075c656af4e5af188
[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: /var/tmp/rpm/lyx-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=/usr --without-warnings --with-included-string
40 # The following check is to ensure that lyx RPMs generated on RH 6.X machines
41 # with gcc-2.95 still run against older Redhat OS/compiler combinations.
42 # It will eventually be ripped out.
43 if [ -r /usr/lib/libstdc++-libc6.1-1.so.2 ]
44 then
45         make CXX=gcc LYX_LIBS='/usr/lib/libstdc++-libc6.1-1.so.2 -lforms -lXpm'
46 else
47         make
48 fi
49
50
51 %install
52 unset LINGUAS || true
53 rm -rf ${RPM_BUILD_ROOT}
54 install -d -m 755 ${RPM_BUILD_ROOT}
55 make prefix=${RPM_BUILD_ROOT}/usr install
56 gzip -f9 ${RPM_BUILD_ROOT}/usr/man/man?/*
57
58 #
59 # Set up the lyx-specific class files where TeX can see then
60 #
61 TEXMF=/usr/share/texmf
62 mkdir -p ${RPM_BUILD_ROOT}${TEXMF}/tex/latex
63 mv ${RPM_BUILD_ROOT}/usr/share/lyx/tex \
64       ${RPM_BUILD_ROOT}/${TEXMF}/tex/latex/lyx
65
66 #
67 # Miscellaneous files
68 #
69 cp -a lib/images/lyx.xpm ${RPM_BUILD_ROOT}/usr/share/lyx/images/
70 cp lib/reLyX/README README.reLyX
71
72 %clean
73 rm -rf ${RPM_BUILD_ROOT}
74
75 %post
76 # Make TeX understand where LyX-specific packages are
77 texhash
78
79 # Before configuring lyx for the local system
80 # PATH needs to be imported 
81 if [ -f /etc/profile ]; then 
82     . /etc/profile
83 fi 
84 #
85 # Now configure LyX
86 #
87 echo "Configuring LyX for your system..."
88 cd $RPM_INSTALL_PREFIX/share/lyx
89 ./configure --srcdir
90
91 # Fix reLyX perl program if the prefix is non-standard
92 if [ "$RPM_INSTALL_PREFIX" != "/usr" ]
93 then
94     perl -pi -e "s!/usr/share/lyx!$RPM_INSTALL_PREFIX/share/lyx!" \
95         ${RPM_INSTALL_PREFIX}/bin/reLyX
96 fi
97
98 %postun
99 # Fix the TeX file hash
100 #
101 texhash
102
103 %files
104 %attr(-,root,root) %doc ABOUT-NLS ANNOUNCE COPYING 
105 %attr(-,root,root) %doc README UPGRADING ChangeLog NEWS
106 %attr(-,root,root) %doc lib/CREDITS README.reLyX
107 %attr(-,root,root) /usr/bin/*
108 %attr(-,root,root) /usr/man/*
109 %attr(-,root,root) /usr/share/locale/*/LC_MESSAGES/*
110 %attr(-,root,root) /usr/share/lyx
111 %attr(-,root,root) /usr/share/texmf/tex/latex/lyx