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:  qt5-devel pkgconfig(phonon4qt5)
Requires:       qt5-gstreamer phonon-qt5

Name:	adhan
Version:	0.1
Release:	0
License:	GPL3
Group:	libriry/office
Summary: Text Extract From sound
URL: https://sourceforge.net/projects/adhan
Source0: %{name}_%{version}.tar.gz
#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 %{name}_%{version}
#%patch0 -p1

%build
%{qmake} QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%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