File qsa-x11-free-1.1.5-1mdv.spec of Package qsa-x11-free-1.1.5-1mdv

Summary: Qt Script for Applications
Summary(ru_RU.UTF8): Qt Script for Applications - инструментарий, обеспечивающий поддержку сценариев в приложениях, написанных на С++.
Name: qsaVersion: 1.1.5
Release:  %mkrel 1
License:  GPL v2
Group: System Environment/Libraries
Source0: ftp://ftp.trolltech.com/qsa/source/%{name}-x11-free-%{version}.tar.gz
# Source0-md5:  3d05e0ab9b15ccdce7517d7c9653d623
Source1:  %{name}-doc
Patch0:  %{name}-buildsystem.patch
URL:   http://www.trolltech.com/products/qsa/index.html
Icon: qsa.xpm
#BuildRequires: qmake
BuildRequires:  libqt3-devel
BuildRequires:  sed >= 4.0
Requires:  libqt3-devel
Obsoletes: qsa-examples
Obsoletes:  qsa-lib-devel
Obsoletes: qsa-libs
Obsoletes:  qt-plugin-qsa-quickcustom
Obsoletes:  qt-plugin-qsa-quickide
BuildRoot:  %{_tmppath}/%{name}-%{version}-build

%define   _noautocompressdoc      *.xml
%define   qtdir  %(echo $QTDIR)
%define   qmakespec  %(echo $QTDIR/mkspecs/linux-g++)

%description
QSA is a Qt extension that allows developers to make their C++
applications scriptable using an interpreted scripting language, Qt
Script (based on ECMAScript/JavaScript).

%description -l ru_RU.UTF8
QSA является расширением Qt,
позволяющий создавать для С++\Qt,
программы на JavaScript/ECMAScript.

%package doc
Summary:  Documentation for QSA
Summary(ru_RU.UTF8):    Документация для QSA
Group:   Documentation
Requires:   %{name} = %{version}-%{release}

%description doc
Documentation for Qt Script in HTML format.

%description doc -l ru_RU.UTF8
Документация для Qt Script в формате HTML

%package devel
Summary:  QSA - header files
Summary(ru_RU.UTF8):  QSA - исходные файлы для разработки.
Group:   Development/Libraries
Requires:   %{name} = %{version}-%{release}
Requires:  libqt3-devel

%description devel
Header files for applications using Qt Script.

%description devel -l ru_RU.UTF8
Исходные файлы для разработки Qt Script.

%package examples
Summary:  QSA - examples for developers
Summary(ru_RU.UTF8):  QSA - примеры для разработчиков
Group: Documentation
Requires:  %{name}-devel = %{version}-%{release}
Requires:  libqt3-devel

%description examples
Examples of Qt Script usage for developers.

%description examples -l ru_RU.UTF8
Примеры использования Qt Script для разработчиков.

%package -n qsa-plugin
Summary:   Qt Script for Applications - Qt Designer plugin
Summary(ru_RU.UTF8):  Плагин для Qt Designer
Group:  Development/Tools
Requires:   %{name} = %{version}-%{release}
Requires:  libqt3-devel

%description -n qsa-plugin
A Qt Designer plugin allowing the use of Qt Script while developing
GUI.

%description -n qsa-plugin -l ru_RU.UTF8
Плагин для QT-Дизайнера, позволяющий использовать Qt Script
при разработке GUI.

%prep
%setup -q -n %{name}-x11-free-%{version}
%patch0 -p1

%build
export LD_LIBRARY_PATH="`/bin/pwd`/src/qsa:$LD_LIBRARY_PATH"
find . -name Makefile -exec rm {} \;
export CFLAGS="%{rpmcflags}"
export CXXFLAGS="%{rpmcflags}"
CONF="CONFIG+=xml table sql network thread"
cd src/qsa
rm -rf qsconfig.h
cat >> qsconfig.h << EOF
#ifndef QS_CONFIG_H
#define QS_CONFIG_H
/* Trolltech is good */
#endif
EOF
%{qtdir}/bin/qmake "$CONF"
%{__make}
cd ../plugin
%{qtdir}/bin/qmake "$CONF"
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{qmakespec}
install -d $RPM_BUILD_ROOT{%{qtdir}/include,%{qtdir}/plugins/designer}
install -d $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}/examples
install -d $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}/html
install -d $RPM_BUILD_ROOT%{qtdir}/bin
install -d $RPM_BUILD_ROOT%{qtdir}/lib

cp -df lib/* $RPM_BUILD_ROOT%{qtdir}/lib
(cd $RPM_BUILD_ROOT%{_libdir}; ln -sf ../../%{qtdir}/lib/* $RPM_BUILD_ROOT%{_libdir})
install plugins/designer/libqseditorplugin.so $RPM_BUILD_ROOT%{qtdir}/plugins/designer
headers="qsa/qsaglobal.h qsa/qsobjectfactory.h qsa/qswrapperfactory.h \
        qsa/qseditor.h qsa/qsproject.h qsa/qsinterpreter.h qsa/qsargument.h \
        qsa/qsinputdialogfactory.h qsa/qsutilfactory.h qsa/qsscript.h \
        qsa/qsconfig.h ide/qsworkbench.h"
for i in $headers; do
        install src/$i $RPM_BUILD_ROOT%{qtdir}/include
done
install src/qsa/qsa.prf $RPM_BUILD_ROOT%{qmakespec}
cp -rf examples/* $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}/examples

Z=$PWD

cd $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}/examples
rm -rf qsa.prf
%{qtdir}/bin/qmake
for i in console filter game scribblescripter scriptbutton spreadsheet textedit wrappers;
do
        sed -i -e "s,\.\./qsa,qsa," $i/$i.pro;
#       cd $i
#       $QTDIR/bin/qmake
#       cd ..
done
cd $Z
cp -rf doc/html/* $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}/html
install %{SOURCE1} $RPM_BUILD_ROOT%{qtdir}/bin

%clean
rm -rf $RPM_BUILD_ROOT

%post doc
 echo "##############################################"
 echo "# Please run the 'qsa-doc -add' command for  every #"
 echo "# user who wants to have access to QSA documentation #"
 echo "#         from the Qt Assistant.  #"
 echo "##############################################"

%postun doc
if [ "$1" = "0" ]; then
 echo "###############################################"
 echo "# Please run the 'qsa-doc -remove' command for every user #"
 echo "# for whom you ran 'qsa-doc -add' earlier in  order to  #"
 echo "#    remove qsa documentation from the Qt Assistant.  #"
 echo "###############################################"
fi

%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.so*
%attr(755,root,root) %{qtdir}/lib/lib*.so*

%files doc
%defattr(644,root,root,755)
%attr(755,root,root) %{qtdir}/bin/qsa-doc
%dir %{_defaultdocdir}/%{name}-%{version}
%dir %{_defaultdocdir}/%{name}-%{version}/html
%{_defaultdocdir}/%{name}-%{version}/html/*

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.so
%{qmakespec}/*
%{qtdir}/include

%files examples
%defattr(644,root,root,755)
%{_defaultdocdir}/%{name}-%{version}/examples

%files -n qsa-plugin
%defattr(644,root,root,755)
%attr(755,root,root) %{qtdir}/plugins/designer/*

%define date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date}
- build for Mandriva Linux
- add to qsa-doc dir for version 1.1.5
$Log: qsa.spec,v $
Revision 1.19.2.2  2005/09/13 21:23:49  pluto
- log fixes.
Revision 1.19.2.1  2005/09/13 21:13:09  pluto
- updated to 1.1.3.
  with version 1.2.0, QSA now works with qt4, enabling qt developers
  to port existing Qt/QSA applications to qt4.
  QSA 1.1.3 is a maintenance release of QSA for qt3.
Revision 1.19  2005/06/12 08:01:47  koorek
- missing dirs
Revision 1.18  2005/01/17 19:14:27  pluto
- updated to 1.1.2.
Revision 1.17  2004/12/13 17:51:57  pluto
- precompiled makefiles for examples disabled.
- %%files updated.
Revision 1.16  2004/12/13 17:41:17  pluto
- buildsystem patch finished.
- %%prep, %%build, %%install cleaned up.
- examples nfy...
Revision 1.15  2004/12/13 12:21:12  pluto
- icon name fixed.
Revision 1.14  2004/10/31 20:54:09  paladine
- spaces->tabs
- formatting
Revision 1.13  2004/10/24 22:49:23  paladine
- QT->Qt
- spelling fixes
Revision 1.12  2004/05/27 18:28:18  djurban
- postun messages makes sense now
Revision 1.11  2004/05/27 18:16:30  qboosh
- no sense in translating name, but worth to say what it is
- cleanups
Revision 1.10  2004/05/26 21:51:12  djurban
- icon: qsa.xpm
Revision 1.9  2004/05/26 21:38:56  djurban
- it works, finally (big tx for pluto and fixing the copyconstructor)
- rel. 1, usable descriptions, proper req's, support for single-threaded
  designer dropped (we provide only a multi-threadead designer)
- run qsa-doc -add to add qsa docs to your profile in assistant
- have a nice scripting :)
Revision 1.8  2004/05/26 14:01:46  djurban
- update to 1.1.0, for pluto to look at
Revision 1.7  2003/08/12 22:32:52  ankry
- cosmetics
Revision 1.6  2003/05/28 13:01:32  malekith
- massive attack: source-md5
Revision 1.5  2003/05/25 06:26:06  misi3k
- massive attack s/pld.org.pl/pld-linux.org/
Revision 1.4  2003/04/20 15:44:20  djurban
- updated to beta3
- build only mt
- builds&works, STBR quality
- only documentation doesnt work, this will
  requires  quite a big hack in assistant from qt.spec
- two descriptions not finsihed for qt-plugins
  (Ill add them tommorow)
- rel 1
Revision 1.3  2003/03/27 19:58:52  qboosh
- some cleanups, don't create empty packages (but something is still missing?)
Revision 1.2  2003/03/25 16:13:56  djurban
- there is no patch0 or any buildsystem patch, trolltech
  did the buildsystem in c++, so we replace it in this spec.
Revision 1.1  2003/03/25 16:11:12  djurban
- NFY (feel free to finish :))
- I have managed to make it work when building against qt-mt only
  I did some changes to allow building against both -st and -mt, but
  I cant look at this spec now, but it should be easy to finish it.
- trolltech reached a new level of sucking, it is near the bottom of
  the place where all the things that suck, came from.
- This is an extremely important spec if we are to package koffice 1.3alpha1
  (which is due to the end of April) 
openSUSE Build Service is sponsored by