File dooble.spec of Package dooble
#
# spec file for package dooble
#
# Copyright (c) 2014 openSUSE_user1
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: dooble
Version: 1.48
Release: 0
Summary: Secure Web Browser
License: BSD-3-Clause
Group: Productivity/Networking/Web/Browsers
Url: http://dooble.sourceforge.net
Source0: http://sourceforge.net/projects/dooble/files/Version%20%{version}/Dooble.d.tar.gz
Source1: %{name}.sh
# patch to fix .desktop file
Patch0: %{name}-desktop-file.patch
BuildRequires: chrpath
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libQtWebKit-devel
BuildRequires: libgcrypt-devel
BuildRequires: libgpg-error-devel
BuildRequires: libqt4-devel >= 4.7.4
BuildRequires: sqlite3-devel
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A light Qt-based focused on security browser for a beautiful world.
%package devel
Summary: Header files for developing dooble plugins
Group: Development/Libraries/C and C++
Url: http://dooble.sourceforge.net
Requires: %{name}
%description devel
Header files for dooble browser plugin development.
%prep
%setup -q -n %{name}.d/trunk/browser
# set default prefix to /usr instead of /usr/local
sed -i -e 's|usr/local|usr|' -e 's|-Werror||' %{name}.pro
sed -i 's@-mtune=generic@@' *.pro
# add rpm opt flags
find . -type f -name '*.pro' | while read FILE; do
sed -i 's|QMAKE_CXXFLAGS_RELEASE += |QMAKE_CXXFLAGS_RELEASE += %{optflags} |' "$FILE"; done
%patch0
%build
# set LD_LIBRARY_PATH
export LD_LIBRARY_PATH=%{_libdir}/%{name}
# we choose the Qt4 version, because Qt5 have compilation issues
qmake -o Makefile %{name}.pro
make %{?_smp_mflags}
# update translations
lrelease Translations/*.ts
%install
make INSTALL_ROOT=%{buildroot} install
# create folder structure
install -dm 755 %{buildroot}{%{_bindir},%{_libdir}/%{name}}
# install binaries
install -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
# install data
mv %{buildroot}%{_prefix}/%{name} %{buildroot}%{_libdir}
# install libraries
install -m 755 libSpotOn/libspoton.so %{buildroot}/%{_libdir}/%{name}
# remove unneeded script
rm -f %{buildroot}/%{_libdir}/%{name}/%{name}.sh
# fix rpath
chrpath -d %{buildroot}%{_libdir}/%{name}/Dooble
%suse_update_desktop_file %{name}
%fdupes %{buildroot}%{_libdir}/%{name}
%files
%defattr(-,root,root,-)
%{_libdir}/%{name}
%{_bindir}/%{name}
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/48x48
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/48x48/%{name}.png
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}
%changelog