Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
178 rindas
6.1 KiB
178 rindas
6.1 KiB
## |
|
## lyx.spec -- OpenPKG RPM Specification |
|
## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/> |
|
## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com> |
|
## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package versions |
|
%define V_lyx 1.3.3 |
|
%define V_xforms 1.0 |
|
|
|
# package information |
|
Name: lyx |
|
Summary: Graphical frontend for LaTeX (nearly WYSIWYG) |
|
URL: http://www.lyx.org/ |
|
Vendor: The LyX Team |
|
Packager: The OpenPKG Project |
|
Distribution: OpenPKG [EVAL] |
|
Group: Print |
|
License: GPL |
|
Version: %{V_lyx} |
|
Release: 20030929 |
|
|
|
# package options |
|
%option with_xforms no |
|
|
|
# list of sources |
|
Source0: ftp://ftp.lyx.org/pub/lyx/stable/lyx-%{V_lyx}.tar.gz |
|
Source1: http://savannah.nongnu.org/download/xforms/stable.pkg/%{V_xforms}/xforms-%{V_xforms}.tar.gz |
|
Patch0: lyx.patch.xforms |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20030103, X11, tetex, make, gcc, perl |
|
PreReq: OpenPKG, openpkg >= 20030103, X11, tetex, tetex::with_x11 = yes |
|
BuildPreReq: gettext, libiconv |
|
PreReq: gettext, libiconv |
|
%if "%{with_xforms}" == "yes" |
|
BuildPreReq: jpeg, tiff, xpm |
|
PreReq: jpeg, tiff, xpm |
|
%else |
|
BuildPreReq: qt, pkgconfig |
|
PreReq: qt |
|
%endif |
|
PreReq: gv, ghostscript, ghostscript::with_x11 = yes |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
LyX is an advanced open source document processor that encourages |
|
an approach to writing based on the structure of your documents, |
|
not their appearance. LyX lets you concentrate on writing, leaving |
|
details of visual layout to the software. |
|
|
|
%prep |
|
%setup -q |
|
%if "%{with_xforms}" == "yes" |
|
%setup -q -T -D -a 1 |
|
( cd xforms-%{V_xforms} |
|
%patch0 -p0 |
|
) || exit 1 |
|
%endif |
|
%{l_shtool} subst \ |
|
-e 's;\(LyXLength::\)\(PC[^_a-zA-Z0-9]\);\1LYX_\2;g' \ |
|
-e 's;\(LyXLength::\)\(SP[^_a-zA-Z0-9]\);\1LYX_\2;g' \ |
|
src/lyxlength.C |
|
%{l_shtool} subst \ |
|
-e 's;\([ \t]*\)PC[ \t]*,;\1LYX_PC,;g' \ |
|
-e 's;\([ \t]*\)SP[ \t]*,;\1LYX_SP,;g' \ |
|
src/lyxlength.h |
|
%{l_shtool} subst \ |
|
-e 's;\(test -f xfonts/PSres.upr.*\);\1 || true;g' \ |
|
lib/Makefile.in |
|
|
|
%build |
|
x11_bin=`%{l_prefix}/etc/rc --query x11_bindir` |
|
x11_inc=`%{l_prefix}/etc/rc --query x11_incdir` |
|
x11_lib=`%{l_prefix}/etc/rc --query x11_libdir` |
|
%if "%{with_xforms}" == "yes" |
|
( cd xforms-%{V_xforms} |
|
%{l_shtool} subst %{l_value -s -a} \ |
|
Imakefile */Imakefile |
|
PATH=$x11_bin:$PATH |
|
imake -DHasGcc2 -UHasSunC -DUseInstalled -I$x11_lib/X11/config |
|
%{l_make} Makefiles |
|
%{l_make} includes |
|
%{l_make} depend |
|
%{l_make} %{l_mflags} |
|
) || exit 1 |
|
%endif |
|
echo "qt_cv_libname=qt" >config.cache |
|
CC="%{l_cc}" \ |
|
CXX="%{l_cxx}" \ |
|
%if "%{with_xforms}" == "yes" |
|
CFLAGS="%{l_cflags -O}" \ |
|
CXXFLAGS="%{l_cxxflags -O}" \ |
|
CPPFLAGS="%{l_cppflags}" \ |
|
LDFLAGS="%{l_ldflags}" \ |
|
%else |
|
CFLAGS="%{l_cflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \ |
|
CXXFLAGS="%{l_cxxflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \ |
|
CPPFLAGS="%{l_cppflags} `%{l_prefix}/bin/pkg-config --cflags-only-I qt`" \ |
|
LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/pkg-config --libs-only-L qt`" \ |
|
LIBS="`%{l_prefix}/bin/pkg-config --libs-only-l --libs-only-other qt`" \ |
|
%endif |
|
./configure \ |
|
--cache-file=./config.cache \ |
|
--prefix=%{l_prefix} \ |
|
--with-libiconv-prefix=%{l_prefix} \ |
|
--with-x \ |
|
--x-includes=$x11_inc \ |
|
--x-libraries=$x11_lib \ |
|
--disable-shared \ |
|
%if "%{with_xforms}" == "yes" |
|
--with-frontend=xforms \ |
|
--with-extra-lib=$RPM_BUILD_ROOT%{l_prefix}/lib \ |
|
--with-extra-inc=$RPM_BUILD_ROOT%{l_prefix}/include/X11 \ |
|
%else |
|
--with-frontend=qt \ |
|
--with-qt-dir=%{l_prefix} \ |
|
--with-qt-libraries="%{l_prefix}/lib" \ |
|
--with-qt-includes="%{l_prefix}/include/qt" \ |
|
%endif |
|
--without-aiksaurus |
|
%{l_make} %{l_mflags -O} |
|
|
|
%install |
|
( cd lyx-%{V_lyx} |
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
) || exit 1 |
|
|
|
%if "%{with_xforms}" == "yes" |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/include |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib |
|
( cd xforms-%{V_xforms} |
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
|
) || exit 1 |
|
%endif |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale |
|
|
|
# preset known helper applications |
|
%{l_shtool} subst \ |
|
-e 's;^\(\\converter latex lyx \).*;\1 "reLyx -f $$i" "";' \ |
|
-e 's;^\(\\converter literate lyx \).*;\1 "noweb2lyx $$i $$o" "";' \ |
|
-e 's;^\(\\viewer dvi \).*;\1 "xdvi";' \ |
|
-e 's;^\(\\viewer pdf \).*;\1 "gv";' \ |
|
-e 's;^\(\\viewer ps \).*;\1 "gv -swap";' \ |
|
-e 's;^\(\\viewer eps \).*;\1 "gv";' \ |
|
-e 's;^\(\\pscommand \).*;\1 "gs";' \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/lyx/lyxrc.defaults |
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|