]> git.lyx.org Git - lyx.git/blob - development/lyx.spec.in
a47d62c98afe97ef4e9cc18d71ff6ca1a3c05a39
[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
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 CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr 
40 make
41
42 %install
43 rm -rf ${RPM_BUILD_ROOT}
44 install -d -m 755 ${RPM_BUILD_ROOT}
45 make prefix=${RPM_BUILD_ROOT}/usr install
46 gzip -f9 ${RPM_BUILD_ROOT}/usr/man/man?/*
47
48 #
49 # Set up the lyx-specific class files where TeX can see then
50 #
51 TEXMF=/usr/share/texmf
52 mkdir -p ${RPM_BUILD_ROOT}${TEXMF}/tex/latex
53 cp -r ${RPM_BUILD_ROOT}/usr/share/lyx/tex \
54       ${RPM_BUILD_ROOT}${TEXMF}/tex/latex/lyx
55
56 #
57 # Miscellaneous files
58 #
59 cp -a images/lyx.xpm ${RPM_BUILD_ROOT}/usr/share/lyx/images/
60 cp lib/reLyX/README README.reLyX
61
62 %clean
63 rm -rf ${RPM_BUILD_ROOT}
64
65 %post
66 # Before configuring lyx for the local system
67 # PATH needs to be imported 
68 if [ -f /etc/profile ]; then 
69     . /etc/profile
70 fi 
71 #
72 # Now configure LyX
73 #
74 echo "Configuring LyX for your system..."
75 cd $RPM_INSTALL_PREFIX/share/lyx
76 ./configure --srcdir
77
78 %post -n tetex-lyx
79 # Fix the TeX file hash
80 #
81 texhash
82
83 # Before configuring lyx for the local system
84 # PATH needs to be imported 
85 if [ -f /etc/profile ]; then 
86 . /etc/profile
87 fi 
88 #
89 # Now configure LyX
90 #
91 echo "Re-configuring LyX for your system..."
92 cd $RPM_INSTALL_PREFIX/share/lyx
93 ./configure --srcdir
94
95 %postun -n tetex-lyx
96 # Fix the TeX file hash
97 #
98 texhash
99
100 # Before configuring lyx for the local system
101 # PATH needs to be imported 
102 if [ -f /etc/profile ]; then 
103 . /etc/profile
104 fi 
105 #
106 # Now configure LyX
107 #
108 echo "Reconfiguring LyX for your system..."
109 cd $RPM_INSTALL_PREFIX/share/lyx
110 ./configure --srcdir
111
112 %files
113 %attr(-,root,root) %doc ABOUT-NLS ANNOUNCE OLD-CHANGES COPYING 
114 %attr(-,root,root) %doc README UPGRADING WHATSNEW ChangeLog
115 %attr(-,root,root) %doc lib/CREDITS README.reLyX
116
117 %attr(-,root,root) /usr/bin/*
118 %attr(-,root,root) /usr/man/*
119 %attr(-,root,root) /usr/share/locale/*/LC_MESSAGES/*
120 %attr(-,root,root) /usr/share/lyx
121
122 %files -n tetex-lyx
123 %attr(-,root,root) /usr/share/texmf/tex/latex/lyx