File adhan.spec of Package elokab-adhan
# norootforbuild
#BuildRequires: qt-devel
#%if 0%{?centos_version}<=5
#define qmake /usr/bin/qmake-qt4
#BuildRequires: qt4-phonon-devel
#Requires:qt47-sqlite,libphonon
#%endif
#%if 0%{?centos_version}>=6
#%define qmake /usr/bin/qmake-qt5
#BuildRequires: qt5-qtbase-devel
#BuildRequires: qt5-qtmultimedia-devel
#Requires: qt5-gstreamer
#%endif
#%if 0%{?suse_version}
#%define qmake /usr/bin/qmake-qt5
#BuildRequires: libqt5-qtbase-devel
#BuildRequires: libQt5Multimedia-devel
#Requires: qt5-gstreamer
#Requires: libqt5-x11 >= 5.6.2
#%endif
#%if 0%{?fedora_version} || 0%{?rhel_version}
#%define qmake /usr/bin/qmake-qt5
#BuildRequires: qt5-qtbase-devel
#BuildRequires: qt5-qtmultimedia-devel
#Requires: qt5-gstreamer
#%endif
#%if 0%{?fedora_version} >= 21
#BuildRequires: dejavu-serif-fonts
#%endif
# Qt devel packages
%define qmake /usr/bin/qmake-qt5
BuildRequires: pkgconfig(Qt5)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(phonon4qt5)
Requires: phonon-qt5 phonon-qt5-backend-gstreamer
Name: adhan
Version: 0.2
Release: 0
License: GPL3
Group: libriry/office
Summary: Text Extract From sound
URL: https://sourceforge.net/projects/adhan
Source0: elokab-adhan-master.zip
#Source1: reciterInfo
#fix no-return-in-nonvoid-function error
#Patch0: mainwindow.patch
BuildRoot: %{_tmppath}/%{name}_%{version}-build
BuildRequires: gcc-c++
%description
برنامج الاذان.
.
يتيح لك هذا البرنامج معرفة اوقات الصلاة.
.
.
يمكنك الحصول على الدعم من هذا المقع http://adhan.sourceforge.net.
%prep
%setup -q -n elokab-adhan-master
#%patch0 -p1
%build
%{qmake} "elokabAdhan.pro" \
PREFIX=%{_prefix} \
QMAKE_CFLAGS_RELEASE="%optflags"\
QMAKE_CXXFLAGS_RELEASE="%optflags"
make %{?_smp_mflags} CFLAGS+="%optflags" CXXFLAGS="%optflags"
%install
# binary
%{makeinstall} INSTALL_ROOT=%{buildroot}
#install -D -m 644 %{S:1} %{buildroot}%{_datadir}/%{name}/reciterInfo
perl -i -l -wpe 's/^(Name=).*/${1}Discharger lectures/' %{buildroot}%{_datadir}/applications/elokab-%{name}.desktop
perl -i -l -wpe 's/^(GenericName=).*/${1}Lectures and lessons dump/' %{buildroot}%{_datadir}/applications/elokab-%{name}.desktop
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/elokab-%{name}
%{_datadir}/applications/elokab-%{name}.desktop
%{_datadir}/elokab
%{_datadir}/icons/hicolor/scalable/apps/elokab-%{name}.svg
%if 0%{?suse_version}
%{_datadir}/icons/hicolor
%{_datadir}/icons/hicolor/scalable
%{_datadir}/icons/hicolor/scalable/apps
%endif
%changelog