]> git.pld-linux.org Git - packages/libmygpo-qt.git/blob - libmygpo-qt.spec
- updated to 1.0.9
[packages/libmygpo-qt.git] / libmygpo-qt.spec
1 #
2 # Conditional build:
3 %bcond_without  qt4     # Qt4 based library
4 %bcond_without  qt5     # Qt5 based library
5 %bcond_without  tests   # build without tests
6
7 Summary:        Qt4 library that wraps the gpodder.net Web API
8 Summary(pl.UTF-8):      Biblioteka Qt4 obudowująca API WWW gpodder.net
9 Name:           libmygpo-qt
10 Version:        1.0.9
11 Release:        1
12 License:        LGPL v2+
13 Source0:        http://stefan.derkits.at/files/libmygpo-qt/%{name}.%{version}.tar.gz
14 # Source0-md5:  aead5b0c6707f3e2bd2259cb1db2b7cd
15 Patch1:         fix-test.patch
16 Group:          Libraries
17 URL:            http://wiki.gpodder.org/wiki/Libmygpo-qt
18 BuildRequires:  cmake >= 2.8.9
19 BuildRequires:  doxygen
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  pkgconfig
22 %if %{with qt4}
23 BuildRequires:  QtCore-devel >= 4.6
24 BuildRequires:  QtNetwork-devel >= 4.6
25 BuildRequires:  QtTest-devel >= 4.6
26 BuildRequires:  qjson-devel
27 BuildRequires:  qt4-build >= 4.6
28 %endif
29 %if %{with qt5}
30 BuildRequires:  Qt5Core-devel >= 5.2
31 BuildRequires:  Qt5Network-devel >= 5.2
32 BuildRequires:  Qt5Test-devel >= 5.2
33 BuildRequires:  qt5-build >= 5.2
34 %endif
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 libmygpo-qt is a Qt Library that wraps the gpodder.net Web API,
39 <http://gpoddernet.readthedocs.io/>.
40
41 %description -l pl.UTF-8
42 libmygpo-qt to biblioteka Qt obudowująca API WWW gpodder.net:
43 <http://gpoddernet.readthedocs.io/>.
44
45 %package devel
46 Summary:        Development files for Qt4 %{name} library
47 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Qt4 %{name}
48 Group:          Development/Libraries
49 Requires:       %{name} = %{version}-%{release}
50 Requires:       QtCore-devel >= 4.6
51 Requires:       QtNetwork-devel >= 4.6
52 Requires:       libstdc++-devel
53 Requires:       qjson-devel >= 4.6
54
55 %description devel
56 Development files for Qt4 %{name} library.
57
58 %description devel -l pl.UTF-8
59 Pliki nagłówkowe biblioteki Qt4 %{name}.
60
61 %package -n libmygpo-qt5
62 Summary:        Qt5 library that wraps the gpodder.net Web API
63 Summary(pl.UTF-8):      Biblioteka Qt5 obudowująca API WWW gpodder.net
64 Group:          Libraries
65
66 %description -n libmygpo-qt5
67 libmygpo-qt is a Qt Library that wraps the gpodder.net Web API,
68 <http://gpoddernet.readthedocs.io/>.
69
70 %description -n libmygpo-qt5 -l pl.UTF-8
71 libmygpo-qt to biblioteka Qt obudowująca API WWW gpodder.net:
72 <http://gpoddernet.readthedocs.io/>.
73
74 %package -n libmygpo-qt5-devel
75 Summary:        Development files for Qt5 %{name} library
76 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Qt5 %{name}
77 Group:          Development/Libraries
78 Requires:       Qt5Core-devel >= 5.2
79 Requires:       Qt5Network-devel >= 5.2
80 Requires:       libmygpo-qt5 = %{version}-%{release}
81 Requires:       libstdc++-devel
82
83 %description -n libmygpo-qt5-devel
84 Development files for Qt5 %{name} library.
85
86 %description -n libmygpo-qt5-devel -l pl.UTF-8
87 Pliki nagłówkowe biblioteki Qt5 %{name}.
88
89 %prep
90 %setup -q -n %{name}.%{version}
91 %patch1 -p1
92
93 %build
94 %if %{with qt4}
95 install -d build-qt4
96 cd build-qt4
97 %cmake .. \
98         -DBUILD_WITH_QT4=ON
99 %{__make}
100
101 %if %{with tests}
102 export CTEST_OUTPUT_ON_FAILURE=1
103 %{__make} test
104 %endif
105 cd ..
106 %endif
107
108 %if %{with qt5}
109 install -d build-qt5
110 cd build-qt5
111 %cmake .. \
112         -DBUILD_WITH_QT4=OFF
113 %{__make}
114
115 %if %{with tests}
116 export CTEST_OUTPUT_ON_FAILURE=1
117 %{__make} test
118 %endif
119 cd ..
120 %endif
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with qt4}
126 %{__make} -C build-qt4 install/fast \
127         DESTDIR=$RPM_BUILD_ROOT
128 %endif
129
130 %if %{with qt5}
131 %{__make} -C build-qt5 install/fast \
132         DESTDIR=$RPM_BUILD_ROOT
133 %endif
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %post   -p /sbin/ldconfig
139 %postun -p /sbin/ldconfig
140
141 %post   -n libmygpo-qt5 -p /sbin/ldconfig
142 %postun -n libmygpo-qt5 -p /sbin/ldconfig
143
144 %if %{with qt4}
145 %files
146 %defattr(644,root,root,755)
147 %doc AUTHORS README
148 %attr(755,root,root) %{_libdir}/libmygpo-qt.so.*.*.*
149 %attr(755,root,root) %ghost %{_libdir}/libmygpo-qt.so.1
150
151 %files devel
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_libdir}/libmygpo-qt.so
154 %{_includedir}/mygpo-qt
155 %{_pkgconfigdir}/libmygpo-qt.pc
156 %dir %{_libdir}/cmake/mygpo-qt
157 %{_libdir}/cmake/mygpo-qt/Mygpo-qtConfig*.cmake
158 %{_libdir}/cmake/mygpo-qt/Mygpo-qtTargets*.cmake
159 %endif
160
161 %if %{with qt5}
162 %files -n libmygpo-qt5
163 %defattr(644,root,root,755)
164 %doc AUTHORS README
165 %attr(755,root,root) %{_libdir}/libmygpo-qt5.so.*.*.*
166 %attr(755,root,root) %ghost %{_libdir}/libmygpo-qt5.so.1
167
168 %files -n libmygpo-qt5-devel
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libmygpo-qt5.so
171 %{_includedir}/mygpo-qt5
172 %{_pkgconfigdir}/libmygpo-qt5.pc
173 %dir %{_libdir}/cmake/mygpo-qt
174 %{_libdir}/cmake/mygpo-qt/Mygpo-qt5Config*.cmake
175 %{_libdir}/cmake/mygpo-qt/Mygpo-qt5Targets*.cmake
176 %endif
This page took 0.05369 seconds and 4 git commands to generate.