1# https://github.com/gbm19/qwt5-qt5/commit/d07100202ab7d67560ba2c540b49a4972bb1b682
2%global commit0 d07100202ab7d67560ba2c540b49a4972bb1b682
3%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
4%global commitdate 20180916
5
6Name:    qwt5-qt5
7Version: 5.2.3a
8Release: 1.%{commitdate}git%{shortcommit0}%{?dist}
9Summary: Qt Widgets for Technical Applications adapted to Qt5
10
11License: LGPLv2 with exceptions
12URL:     https://github.com/gbm19/qwt5-qt5
13
14# To get the source code's archive:
15# $ curl -OL https://github.com/gbm19/qwt5-qt5/archive/%%{commit0}.zip
16#   unzip %%{commit0}.zip
17#   mv qwt5-qt5-%%{commit0} qwt5-qt5
18#   tar -czvf  qwt5-qt5-%%{commitdate}git%%{shortcommit0}.tar.gz qwt5-qt5
19# Alternative method to get the source code
20# $ git clone https://github.com/gbm19/qwt5-qt5.git
21#   tar -czvf  qwt5-qt5-%%{commitdate}git%%{shortcommit0}.tar.gz qwt5-qt5
22Source:  qwt5-qt5-%%{commitdate}git%%{shortcommit0}.tar.gz
23
24BuildRequires: pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets) pkgconfig(Qt5PrintSupport)
25BuildRequires: pkgconfig(Qt5Svg) pkgconfig(Qt5Designer)
26
27%description
28The Qwt library contains GUI Components and utility classes which are primarily
29useful for programs with a technical background.
30Besides a 2D plot widget it provides scales, sliders, dials, compasses,
31thermometers, wheels and knobs to control or display values, arrays
32or ranges of type double.
33
34%package        devel
35Summary:        Development files for %{name}
36Requires:       %{name}%{?_isa} = %{version}-%{release}
37
38%description    devel
39The %{name}-devel package contains qt5 libraries and header files for
40developing applications that use %{name}.
41
42%package doc
43Summary: Extra Developer documentation for %{name}
44BuildArch: noarch
45
46%description doc
47%{summary}.
48
49%prep
50%setup -qc -n qwt5-qt5
51
52pushd qwt5-qt5
53# avoid conflicts with qwt5-qt4 man files
54for f in doc/man/man3/*.3; do mv $f ${f/%.3/.qt5.3}; done
55
56%build
57pushd qwt5-qt5
58%{qmake_qt5}
59make %{?_smp_mflags}
60
61
62%install
63pushd qwt5-qt5
64make install INSTALL_ROOT=%{buildroot}
65
66%ldconfig_scriptlets
67
68%files
69%license qwt5-qt5/COPYING
70%doc qwt5-qt5/CHANGES
71%doc qwt5-qt5/README
72%{_qt5_libdir}/lib%{name}.so.*
73%{?_qt5_plugindir}/designer/libqwt5_designer_plugin.so
74
75%files devel
76%{_mandir}/man3/*
77%{_qt5_headerdir}/%{name}/
78%{_qt5_libdir}/lib%{name}.so
79%{_qt5_libdir}/pkgconfig/%{name}.pc
80
81%files doc
82%dir %{_qt5_docdir}
83%dir %{_qt5_docdir}/html/
84%{_qt5_docdir}/html/%{name}/
85
86%changelog
87* Sat Sep 15 2018 Miquel Garriga https://github.com/gbm19 - 5.2.3a-1.20180916gitd071002
88- First version using Qt5
89