]> git.lyx.org Git - lyx.git/blob - lyx.spec.in
aede6edc0211d70fec7e7c1a6c0657470e8c8336
[lyx.git] / lyx.spec.in
1 Summary: A WYSYWIG 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
15 %description
16 LyX is a modern approach of writing documents with a computer
17 which breaks with the tradition of the obsolete typewriter
18 concept.  It is designed for people who want a professional
19 output with a minimum of time and effort, without becoming specia-
20 lists in typesetting.  Compared to common word processors LyX
21 will increase the productivity a lot, since most of the type-
22 setting will be done by the computer, not the author.  With LyX
23 the author can concentrate on the contents of his writing,
24 since the computer will take care of the look.
25
26 %package -n tetex-lyx
27 Summary: Files for LyX packaged for tetex
28 Requires: lyx
29 Group: Applications/Publishing
30
31 %description -n tetex-lyx
32 This package contains the LaTeX files for LyX installed in the normal
33 place that the Redhat tetex package is installed and would see it.
34
35 %prep
36 %setup
37
38 %build
39 unset LINGUAS || true
40 CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" \
41 ./configure --prefix=/usr --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=gcc 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 prefix=${RPM_BUILD_ROOT}/usr install
58 gzip -f9 ${RPM_BUILD_ROOT}/usr/man/man?/*
59
60 #
61 # Set up the lyx-specific class files where TeX can see then
62 #
63 TEXMF=/usr/share/texmf
64 mkdir -p ${RPM_BUILD_ROOT}${TEXMF}/tex/latex
65 cp -r ${RPM_BUILD_ROOT}/usr/share/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}/usr/share/lyx/images/
72 cp lib/reLyX/README README.reLyX
73
74 %clean
75 rm -rf ${RPM_BUILD_ROOT}
76
77 %post
78 # Before configuring lyx for the local system
79 # PATH needs to be imported 
80 if [ -f /etc/profile ]; then 
81     . /etc/profile
82 fi 
83 #
84 # Now configure LyX
85 #
86 echo "Configuring LyX for your system..."
87 cd $RPM_INSTALL_PREFIX/share/lyx
88 ./configure --srcdir
89
90 %post -n tetex-lyx
91 # Fix the TeX file hash
92 #
93 texhash
94
95 # Before configuring lyx for the local system
96 # PATH needs to be imported 
97 if [ -f /etc/profile ]; then 
98 . /etc/profile
99 fi 
100 #
101 # Now configure LyX
102 #
103 echo "Re-configuring LyX for your system..."
104 cd $RPM_INSTALL_PREFIX/share/lyx
105 ./configure --srcdir
106
107 %postun -n tetex-lyx
108 # Fix the TeX file hash
109 #
110 texhash
111
112 # Before configuring lyx for the local system
113 # PATH needs to be imported 
114 if [ -f /etc/profile ]; then 
115 . /etc/profile
116 fi 
117 #
118 # Now configure LyX
119 #
120 echo "Reconfiguring LyX for your system..."
121 cd $RPM_INSTALL_PREFIX/share/lyx
122 ./configure --srcdir
123
124 %files
125 %attr(-,root,root) %doc ABOUT-NLS ANNOUNCE OLD-CHANGES COPYING 
126 %attr(-,root,root) %doc README UPGRADING ChangeLog NEWS
127 %attr(-,root,root) %doc lib/CREDITS README.reLyX
128
129 %attr(-,root,root) /usr/bin/*
130 %attr(-,root,root) /usr/man/*
131 %attr(-,root,root) /usr/share/locale/*/LC_MESSAGES/*
132 %attr(-,root,root) /usr/share/lyx
133
134 %files -n tetex-lyx
135 %attr(-,root,root) /usr/share/texmf/tex/latex/lyx