%define int_ver v1.30.b.00-98-g %define pname Sankore-Sankore %define gitversion f7a2d46 %define destdir %{_datadir}/%{name} Name: sankore Version: 3.1 Release: %mkrel 1 Summary: The open-source software suite for digital teachers License: GPLv3+ or LGPLv3+ Group: Education URL: https://github.com/Sankore/ Source0: %{pname}-%{version}-%{int_ver}%{gitversion}.tar.bz2 Patch0: Sankore_3.1.pro.patch BuildRequires: qt4-devel BuildRequires: zlib-devel BuildRequires: xpdf-devel BuildRequires: quazip-devel BuildRequires: qtsingleapplication-devel BuildRequires: libgomp-devel BuildRequires: freetype2-devel BuildRequires: desktop-file-utils %description %{name} can be considered as three integrated functions in one outstanding tool: - uniboard universal interactive white board software - the sankore teaching designer - the sankore editor %prep %setup -q -n %{pname}-%{version}-%{gitversion} %patch0 -p1 -b .fix_deps %build %{qmake_qt4} PREFIX=%{destdir} DESTDIR=%{destdir} %make %install rm -rf %{buildroot} #%make INSTALL="install -p" INSTALL_ROOT=%{buildroot} PREFIX=%{destdir} DESTDIR=%{destdir} release-install %make INSTALL="install -p" release-install mkdir -p %{buildroot}%{_datadir}/icons/ #missed icon, taking one install -D -m 0644 resources/images/uniboard.png %{buildroot}%{_datadir}/icons/%{name}.png #missed desktop file, writing one cat > %{name}.desktop <<EOF [Desktop Entry] Name=Sankore Comment=The open-source software suite for digital teachers Exec=%{destdir}/sankore Icon=%{name} Terminal=false Type=Application StartupNotify=true Categories=Education EOF desktop-file-install --mode=0644 --dir=%{buildroot}%{_datadir}/applications %{name}.desktop mkdir -p %{buildroot}/%_bindir/ cat > %{buildroot}/%_bindir/%{name} <<EOF #!/bin/sh %{destdir}/sankore EOF chmod 755 %{buildroot}/%_bindir/%{name} mkdir -p %{buildroot}/%{destdir} #Following line copies qt.conf and brakes icons #cp -R resources/linux/qtlinux/* %{buildroot}/%{destdir} cp -r build/linux/release/product/* %{buildroot}/%{destdir} mv %{buildroot}/%{destdir}/Sankore\ %{version} %{buildroot}/%{destdir}/sankore %files %defattr(-,root,root,-) %doc *gpl.txt README.txt %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/%{name}.png %{destdir} %changelog * Sun Nov 27 2011 anaselli <anaselli> 3.1-1.mga2 + Revision: 173009 - imported package sankore