Sophie

Sophie

distrib > Fedora > 20 > x86_64 > by-pkgid > fe9ade477a9545ee3ed416cc32b79c03 > files > 5

QsLog-0-4.54hg.fc20.src.rpm

%global hgrel 54

Name:           QsLog
Version:        0
Release:        4.%{hgrel}hg%{?dist}
Summary:        An easy to use logger that is based on Qt's QDebug class
License:        BSD
URL:            https://bitbucket.org/razvanpetru/qt-components/wiki/QsLog

# Generated using attached script
Source0:        QsLog-%{hgrel}hg.tar.xz
# Script to generate tarball
Source1:        QsLog-tarball.sh

# Don't install docs
Patch0:         QsLog-nodoc.patch
# Install libraries in correct directory
Patch1:         QsLog-libdir.patch

BuildRequires:  qt4-devel

%description
QsLog is an easy to use logger that is based on Qt's QDebug class.
Features:
* Six logging levels (from trace to fatal)
* Logging level threshold configurable at runtime.
* Minimum overhead when logging is turned off.
* Supports multiple destinations, comes with file and debug destinations.
* Thread-safe
* Supports logging of common Qt types out of the box.
 
%package devel
Summary:         Development headers and library for QsLog
Requires:        %{name}%{?_isa} = %{version}-%{release}

%description devel
This package contains the development headers and libraries necessary
for compiling against QsLog.

%prep
%setup -q -n QsLog
%patch0 -p1 -b .nodoc
%patch1 -p1 -b .libdir
# Prepare LICENSE
head -n 25 QsLog.cpp | sed "s|// ||g" > LICENSE
touch -r QsLog.cpp LICENSE

# Fix EOL encoding
for f in QsLog.h QsLogDestConsole.h QsLogLevel.h QsLogDest.h LICENSE; do
    sed 's|\r||g' $f > $f.new && \
    touch -r $f $f.new && \
    mv $f.new $f
done

%build
%_qt4_qmake QsLogSharedLibrary.pro
make %{?_smp_mflags}

%install
make install INSTALL_ROOT=%{buildroot}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%doc LICENSE QsLogReadme.txt
%{_libdir}/libQsLog.so.*

%files devel
%{_includedir}/QsLog/
%{_libdir}/libQsLog.so

%changelog
* Tue Jan 21 2014 Dan Horák <dan[at]danny.cz> - 0-4.54hg
- Bump rev and rebuild, fixes build on secondary arches

* Thu Jan 02 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0-3.54hg
- Review fixes.

* Thu Jan 02 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0-2.54hg
- Generate LICENSE from source.

* Wed Dec 18 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0-1.54hg
- First release.