qcustomplot/qcustomplot.spec
2014-12-28 19:21:49 +01:00

104 lines
2.5 KiB
RPMSpec

# Bump this as appropriate when doing release updates, check i.e. with abi_compliance_checker
# First digit: major, bump when incompatible changes were performed
# Second digit: minor, bump when interface was extended
%global so_ver 1.0.0
Name: qcustomplot
Version: 1.3.0
Release: 1%{?dist}
Summary: Qt widget for plotting and data visualization
License: GPLv3+
URL: http://www.qcustomplot.com/
Source0: http://www.qcustomplot.com/release/%{version}/QCustomPlot.tar.gz
Source1: %{name}.pro
BuildRequires: qt4-devel
%description
QCustomPlot is a Qt C++ widget for plotting and data visualization.
This plotting library focuses on making good looking, publication quality 2D
plots, graphs and charts, as well as offering high performance for realtime
visualization applications.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation and examples for %{name}
BuildArch: noarch
%description doc
The %{name}-doc package contains the documentation and examples for
%{name}.
%prep
%setup -q -n %{name}
cp -a %{SOURCE1} .
%build
LDFLAGS="-Wl,--as-needed" %qmake_qt4 SOVERSION=%{so_ver} .
make %{?_smp_mflags}
%install
# Install header and library
install -Dpm 0644 qcustomplot.h %{buildroot}%{_includedir}/qcustomplot.h
install -d %{buildroot}%{_libdir}
chmod 0755 libqcustomplot.so.%{so_ver}
cp -a libqcustomplot.so* %{buildroot}%{_libdir}
# pkg-config file
install -d %{buildroot}%{_libdir}/pkgconfig/
cat > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc <<EOF
libdir=%{_libdir}
includedir=%{_includedir}
Name: %{name}
Description: %{summary}
Version: %{version}
Cflags: -I\${includedir}
Libs: -L\${libdir} -lqcustomplot
EOF
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license GPL.txt
%doc changelog.txt
%{_libdir}/*.so.*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%files doc
%license GPL.txt
%doc documentation examples
%changelog
* Sun Dec 28 2014 Sandro Mani <manisandro@gmail.com> - 1.3.0-1
- Update to 1.3.0
* Fri Dec 19 2014 Sandro Mani <manisandro@gmail.com> - 1.2.1-2
- BuildRequires: qt-devel -> qt4-devel
- Use %%license
- Don't abuse version as so version
- Use -Wl,--as-needed
* Sat Aug 09 2014 Sandro Mani <manisandro@gmail.com> - 1.2.1-1
- Initial package