Sophie

Sophie

distrib > Fedora > 17 > x86_64 > by-pkgid > 5a80ab3ab6ea58f892a8bb2b02e1da56 > files > 1

qupzilla-1.4.3-1.fc17.src.rpm

# Review request: https://bugzilla.redhat.com/show_bug.cgi?id=819184

%global __provides_exclude_from %{_libdir}/%{name}/.*\.so$
%global __provides_exclude_from %{_libdir}/libQupZilla.so.*
%global __requires_exclude_from %{_libdir}/libQupZilla.so.*
# Old version (Fedora <= 14 and RHEL 6)
#%{?filter_setup:
#%filter_provides_in %{_libdir}/%{name}/.*\.so$
#%filter_from_provides /libQupZilla.so.*/d
#%filter_from_requires /libQupZilla.so.*/d
#%filter_setup
#}


Name:           qupzilla
Version:        1.4.3
Release:        1%{?dist}
Summary:        Modern web browser

Group:          Applications/Internet
# Files in src/lib/opensearch and src/lib/3rdparty are GPLv2+
# Files in src/plugins/MouseGestures/3rdparty are BSD (2 clause)
License:        GPLv3+ and BSD
URL:            http://www.qupzilla.com/
#VCS            git:git://github.com/QupZilla/qupzilla.git
Source0:        https://github.com/QupZilla/qupzilla/archive/v%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  qt-devel >= 4.7
BuildRequires:  qtwebkit-devel
BuildRequires:  desktop-file-utils

%description
QupZilla is modern web browser based on WebKit core and Qt Framework. It is 
designed to be lightweight and fast and offers advanced functions such as
- an integrated advertisement blocker,
- a search engine manager,
- a SSL certificate manager,
- speed dial
- theming support, and
- seamless integration into your desktop environment.


%prep
%setup -q

# remove BUILDTIME usage from build
sed '/static const QString BUILDTIME/d' -i src/lib/app/qupzilla.h
sed '/QupZilla::BUILDTIME/d' -i \
    src/lib/app/commandlineoptions.cpp \
    src/lib/app/qupzilla.cpp \
    src/lib/network/schemehandlers/qupzillaschemehandler.cpp \
    src/lib/other/aboutdialog.cpp

# convert DOS line endings to Unix
for file in COPYRIGHT README.md; do
    sed "s|\r||g" $file > $file.new && \
    touch -r $file $file.new && \
    mv $file.new $file
done


%build

# set proper paths
export QUPZILLA_PREFIX="%{_prefix}/" # beware, trailing slash required!
export USE_LIBPATH="%{_libdir}"

# enable better oxygen icons in Preferences
# FIXME: "KDE=true" will probably add a dependency on nepomuk in the future,
# not sure if we really want that
export KDE="true"

# enable WebGL
export USE_WEBGL="true"

# enable geolocalization 
export USE_QTWEBKIT_2_2="true"

# debug option is needed for -debuginfo
qmake-qt4 CONFIG+=debug QMAKE_CXXFLAGS="%{optflags}" QMAKE_LFLAGS+="-Wl,--as-needed"

make %{?_smp_mflags}


%install
make install INSTALL_ROOT=%{buildroot} INSTALL='install -p'

%find_lang %{name} --all-name --with-qt

desktop-file-install \
    --add-mime-type="x-scheme-handler/http;x-scheme-handler/https;" \
    --dir=%{buildroot}%{_datadir}/applications \
    %{buildroot}/%{_datadir}/applications/%{name}.desktop

# remove useless plugin
rm -f %{buildroot}%{_libdir}/qupzilla/libTestPlugin.so

# as long as we have no -devel package, we remove this one, too
rm -f %{buildroot}%{_libdir}/libQupZilla.so


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :


%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi


%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files -f %{name}.lang
%doc AUTHORS CHANGELOG COPYRIGHT FAQ GPLv3 README.md
%{_bindir}/%{name}
%{_libdir}/libQupZilla.so.*
%{_libdir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/bash-completion/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/icons/hicolor/*/*/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/themes


%changelog
* Sun May 19 2013 Christoph Wickert <cwickert@fedoraproject.org> - 1.4.3-1
- Update to 1.4.3
- Include new bash-completion file

* Mon Apr 01 2013 Christoph Wickert <cwickert@fedoraproject.org> - 1.4.1-1
- Update to 1.4.1

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Oct 20 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.3.5-2
- Use new filter setup
- Build with --as-needed
- Preserve timestamps during install
- Add comment about license of the source files

* Sat Oct 06 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.3.5-1
- Update to 1.3.5
- Enable WebGL (USE_WEBGL)
- Enable geolocation and notifications API (USE_QTWEBKIT_2_2)
- Change icense tag to "GPLv3+ and BSD" (some plugins are BSD licensed)
- Add x-scheme-handlers so qupzilla can be set as default browser
- Filter out private requires and provides
- Include README.md in %%doc

* Mon Apr 30 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.2.0-1
- Initial package