]> git.lyx.org Git - lyx.git/blob - development/lyx.spec.in
Lost files
[lyx.git] / development / 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 Obsoletes: tetex-lyx
15
16 %description
17 LyX is a modern approach of writing documents with a computer
18 which breaks with the tradition of the obsolete typewriter
19 concept.  It is designed for people who want a professional
20 output with a minimum of time and effort, without becoming specia-
21 lists in typesetting.  Compared to common word processors LyX
22 will increase the productivity a lot, since most of the type-
23 setting will be done by the computer, not the author.  With LyX
24 the author can concentrate on the contents of his writing,
25 since the computer will take care of the look.
26
27 %package -n tetex-lyx
28 Summary: Files for LyX packaged for tetex
29 Requires: lyx
30 Group: Applications/Publishing
31
32 %description -n tetex-lyx
33 This package contains the LaTeX files for LyX installed in the normal
34 place that the Redhat tetex package is installed and would see it.
35
36 %prep
37 %setup
38
39 %build
40 unset LINGUAS || true
41 CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" \
42 ./configure --prefix=/usr --without-warnings --with-included-string
43 # The following check is to ensure that lyx RPMs generated on RH 6.X machines
44 # with gcc-2.95 still run against older Redhat OS/compiler combinations.
45 # It will eventually be ripped out.
46 if [ -r /usr/lib/libstdc++-libc6.1-1.so.2 ]
47 then
48         make CXX=gcc LYX_LIBS='/usr/lib/libstdc++-libc6.1-1.so.2 -lforms -lXpm'
49 else
50         make
51 fi
52
53
54 %install
55 unset LINGUAS || true
56 rm -rf ${RPM_BUILD_ROOT}
57 install -d -m 755 ${RPM_BUILD_ROOT}
58 make prefix=${RPM_BUILD_ROOT}/usr install
59 gzip -f9 ${RPM_BUILD_ROOT}/usr/man/man?/*
60
61 #
62 # Set up the lyx-specific class files where TeX can see then
63 #
64 TEXMF=/usr/share/texmf
65 mkdir -p ${RPM_BUILD_ROOT}${TEXMF}/tex/latex
66 mv ${RPM_BUILD_ROOT}/usr/share/lyx/tex \
67       ${RPM_BUILD_ROOT}/${TEXMF}/tex/latex/lyx
68
69 #
70 # Miscellaneous files
71 #
72 cp -a lib/images/lyx.xpm ${RPM_BUILD_ROOT}/usr/share/lyx/images/
73 cp lib/reLyX/README README.reLyX
74
75 %clean
76 rm -rf ${RPM_BUILD_ROOT}
77
78 %post
79 # Make TeX understand where LyX-specific packages are
80 texhash
81
82 # Before configuring lyx for the local system
83 # PATH needs to be imported 
84 if [ -f /etc/profile ]; then 
85     . /etc/profile
86 fi 
87 #
88 # Now configure LyX
89 #
90 echo "Configuring LyX for your system..."
91 cd $RPM_INSTALL_PREFIX/share/lyx
92 ./configure --srcdir
93
94 # Fix reLyX perl program if the prefix is non-standard
95 if [ "$RPM_INSTALL_PREFIX" != "/usr" ]
96 then
97     perl -pi -e "s!/usr/share/lyx!$RPM_INSTALL_PREFIX/share/lyx!" \
98         ${RPM_INSTALL_PREFIX}/bin/reLyX
99 fi
100
101 %postun
102 # Fix the TeX file hash
103 #
104 texhash
105
106 %files
107 %attr(-,root,root) %doc ABOUT-NLS ANNOUNCE COPYING 
108 %attr(-,root,root) %doc README UPGRADING ChangeLog NEWS
109 %attr(-,root,root) %doc lib/CREDITS README.reLyX
110
111 %attr(-,root,root) /usr/bin/*
112 %attr(-,root,root) /usr/man/*
113 %attr(-,root,root) /usr/share/locale/*/LC_MESSAGES/*
114 %attr(-,root,root) /usr/share/lyx
115 %attr(-,root,root) /usr/share/texmf/tex/latex/lyx