File iTest.spec of Package iTest
#
# spec file for package iTest
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# norootforbuild
Name: iTest
Summary: Computerised examination
License: GPL
Group: Productivity/Scientific/Other
Version: 1.4.1
Release: 0
Url: http://itest.sourceforge.net/
Vendor: openSUSE-Education
BuildRequires: update-desktop-files
BuildRequires: libqt4-devel
Source: %{name}-%{version}-src.tar.bz2
Source1: iTestServer.desktop
Source2: iTestClient.desktop
Source3: iTestClient-German.ts
#Patch1: iTest-german.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
iTest is a Qt application consisting of a Server and a Client which allows you
to take advantage of the best of computerised examination.
%package server
Summary: Server for iTest
Group: Productivity/Scientific/Other
%description server
iTest is a Qt application consisting of a Server and a Client which allows you
to take advantage of the best of computerised examination.
This package contains the server part.
%package client
Summary: Client for iTest
Group: Productivity/Scientific/Other
%description client
iTest is a Qt application consisting of a Server and a Client which allows you
to take advantage of the best of computerised examination.
This package contains the client part.
%prep
%setup -q -n %name-%version-src
#patch1 -p1
install -m 644 %{SOURCE3} iTestClient/i18n/iTestClient-German.ts
%build
export QTDIR=/usr/lib/qt3
cd iTestServer
qmake -config release QMAKE_CXXFLAGS=-fpermissive
lrelease iTestServer.pro
cd ..
cd iTestClient
qmake -config release QMAKE_CXXFLAGS=-fpermissive
lrelease iTestClient.pro
cd ..
qmake -config release QMAKE_CXXFLAGS=-fpermissive
make %{?_smp_mflags}
%install
install -Dm755 bin/iTestServer %buildroot/%_bindir/iTestServer
install -Dm755 bin/iTestClient %buildroot/%_bindir/iTestClient
mkdir -p %buildroot/%_datadir/{iTestServer,iTestClient}
cp -r iTestServer/images %buildroot/%_datadir/iTestServer/
cp -r iTestClient/images %buildroot/%_datadir/iTestClient/
mkdir -p %buildroot/%_datadir/pixmaps/
ln -s %_datadir/iTestServer/images/itestserver32.png %buildroot/%_datadir/pixmaps/
ln -s %_datadir/iTestClient/images/itestwri48.png %buildroot/%_datadir/pixmaps/
mkdir -p %buildroot/%_datadir/applications
install -m644 %{S:1} %buildroot/%_datadir/applications/
install -m644 %{S:2} %buildroot/%_datadir/applications/
%suse_update_desktop_file -n iTestServer Edutainment
%suse_update_desktop_file -n iTestClient Edutainment
%clean
rm -rf %buildroot
%files server
%defattr(644,root,root,755)
%doc readme.txt
%defattr(-,root,root)
%_bindir/iTestServer
%_datadir/iTestServer
%_datadir/pixmaps/itestserver32.png
%_datadir/applications/iTestServer.desktop
%files client
%defattr(-,root,root)
%_bindir/iTestClient
%_datadir/iTestClient
%_datadir/pixmaps/itestwri48.png
%_datadir/applications/iTestClient.desktop
%changelog