]>
Commit | Line | Data |
---|---|---|
cec47239 | 1 | # note: for versions >= 3 (with changed library name) see mupnp.spec |
78c26185 JB |
2 | # |
3 | # Conditional build: | |
4 | %bcond_without static_libs # static library | |
5 | %bcond_with libxml2 # libxml2 instead of expat | |
6 | # | |
7 | Summary: CyberLink for C UPnP library | |
8 | Summary(pl.UTF-8): Biblioteka UPnP CyberLink dla C | |
9 | Name: clinkc | |
cec47239 JB |
10 | # keep 2.x here for libclinkc name |
11 | Version: 2.4.1 | |
78c26185 JB |
12 | Release: 1 |
13 | License: BSD | |
14 | Group: Libraries | |
cec47239 JB |
15 | #Source0Download: https://github.com/cybergarage/mupnp/releases |
16 | Source0: https://github.com/cybergarage/mupnp/archive/%{version}/%{name}-%{version}.tar.gz | |
17 | # Source0-md5: 622ba12704305091dbc5978d5a0a49df | |
78c26185 JB |
18 | Patch0: %{name}-libtool.patch |
19 | Patch1: %{name}-iconv.patch | |
20 | Patch2: %{name}-doc.patch | |
cec47239 | 21 | Patch3: %{name}-version.patch |
c3b47f2f | 22 | Patch4: %{name}-av.patch |
78c26185 | 23 | URL: https://sourceforge.net/projects/clinkc/ |
c3b47f2f | 24 | BuildRequires: autoconf >= 2.50 |
78c26185 JB |
25 | BuildRequires: automake |
26 | BuildRequires: curl-devel >= 7.13.0 | |
27 | BuildRequires: doxygen | |
28 | %{!?with_libxml2:BuildRequires: expat-devel >= 1.95} | |
29 | BuildRequires: libtool | |
30 | BuildRequires: libuuid-devel | |
31 | %{?with_libxml2:BuildRequires: libxml2-devel >= 1:2.6.0} | |
32 | BuildRequires: pkgconfig | |
33 | BuildRequires: rpm-build >= 4.6 | |
34 | %{?with_libxml2:Requires: libxml2 >= 1:2.6.0} | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | CyberLink for C is a toolkit for creating UPnP devices and control | |
39 | points. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | CyberLink dla C to biblioteka narzędziowa do tworzenia urządzeń i | |
43 | punktów kontrolnych UPnP. | |
44 | ||
45 | %package devel | |
46 | Summary: Header files for clinkc library | |
47 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki clinkc | |
48 | Group: Development/Libraries | |
49 | Requires: %{name} = %{version}-%{release} | |
50 | %{!?with_libxml2:Requires: expat-devel >= 1.95} | |
51 | Requires: libuuid-devel | |
52 | %{?with_libxml2:Requires: libxml2-devel >= 1:2.6.0} | |
53 | ||
54 | %description devel | |
55 | Header files for clinkc library. | |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Pliki nagłówkowe biblioteki clinkc. | |
59 | ||
60 | %package static | |
61 | Summary: Static clinkc library | |
62 | Summary(pl.UTF-8): Statyczna biblioteka clinkc | |
63 | Group: Development/Libraries | |
64 | Requires: %{name}-devel = %{version}-%{release} | |
65 | ||
66 | %description static | |
67 | Static clinkc library. | |
68 | ||
69 | %description static -l pl.UTF-8 | |
70 | Statyczna biblioteka clinkc. | |
71 | ||
72 | %package apidocs | |
73 | Summary: API documentation for clinkc library | |
74 | Summary(pl.UTF-8): Dokumentacja API biblioteki clinkc | |
75 | Group: Documentation | |
76 | BuildArch: noarch | |
77 | ||
78 | %description apidocs | |
79 | API documentation for clinkc library. | |
80 | ||
81 | %description apidocs -l pl.UTF-8 | |
82 | Dokumentacja API biblioteki clinkc. | |
83 | ||
c3b47f2f JB |
84 | %package av |
85 | Summary: CyberLink for C UPnP library - AV component | |
86 | Summary(pl.UTF-8): Biblioteka UPnP CyberLink dla C - komponent AV | |
87 | Group: Libraries | |
88 | Requires: %{name} = %{version}-%{release} | |
89 | ||
90 | %description av | |
91 | CyberLink for C UPnP library - AV component. | |
92 | ||
93 | %description av -l pl.UTF-8 | |
94 | Biblioteka UPnP CyberLink dla C - komponent AV. | |
95 | ||
96 | %package av-devel | |
97 | Summary: Header files for clinkcav library | |
98 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki clinkcav | |
99 | Group: Development/Libraries | |
100 | Requires: %{name}-av = %{version}-%{release} | |
101 | Requires: %{name}-devel = %{version}-%{release} | |
102 | ||
103 | %description av-devel | |
104 | Header files for clinkcav library. | |
105 | ||
106 | %description av-devel -l pl.UTF-8 | |
107 | Pliki nagłówkowe biblioteki clinkcav. | |
108 | ||
109 | %package av-static | |
110 | Summary: Static clinkcav library | |
111 | Summary(pl.UTF-8): Statyczna biblioteka clinkcav | |
112 | Group: Development/Libraries | |
113 | Requires: %{name}-av-devel = %{version}-%{release} | |
114 | ||
115 | %description av-static | |
116 | Static clinkcav library. | |
117 | ||
118 | %description av-static -l pl.UTF-8 | |
119 | Statyczna biblioteka clinkcav. | |
120 | ||
78c26185 | 121 | %prep |
cec47239 | 122 | %setup -q -n mupnp-%{version} |
78c26185 JB |
123 | %patch0 -p1 |
124 | %patch1 -p1 | |
125 | %patch2 -p1 | |
cec47239 | 126 | %patch3 -p1 |
c3b47f2f | 127 | %patch4 -p1 |
78c26185 JB |
128 | |
129 | %build | |
130 | %{__libtoolize} | |
131 | %{__aclocal} | |
132 | %{__autoconf} | |
133 | %{__autoheader} | |
134 | %{__automake} | |
135 | %configure \ | |
136 | %{!?with_static_libs:--disable-static} | |
137 | %{__make} | |
138 | ||
c3b47f2f JB |
139 | topdir=$(pwd) |
140 | cd std/av | |
141 | %{__libtoolize} | |
142 | %{__aclocal} | |
143 | %{__autoconf} | |
144 | %{__autoheader} | |
145 | %{__automake} | |
146 | %configure \ | |
147 | CPPFLAGS="%{rpmcppflags} -I${topdir}/include" \ | |
148 | %{!?with_static_libs:--disable-static} | |
149 | %{__make} | |
150 | ||
78c26185 JB |
151 | %install |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | ||
154 | %{__make} install \ | |
155 | DESTDIR=$RPM_BUILD_ROOT | |
156 | ||
c3b47f2f JB |
157 | %{__make} -C std/av install \ |
158 | DESTDIR=$RPM_BUILD_ROOT | |
159 | ||
78c26185 | 160 | # obsoleted by pkg-config |
c3b47f2f | 161 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libclinkc*.la |
78c26185 | 162 | # compiled binaries |
cec47239 | 163 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/clinkc-%{version}/samples |
78c26185 JB |
164 | # packaged as %doc |
165 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/{clinkc-dev,clinkc0} | |
166 | ||
167 | %clean | |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
170 | %post -p /sbin/ldconfig | |
171 | %postun -p /sbin/ldconfig | |
172 | ||
173 | %files | |
174 | %defattr(644,root,root,755) | |
175 | %doc COPYING ChangeLog | |
176 | %attr(755,root,root) %{_libdir}/libclinkc.so.*.*.* | |
177 | %attr(755,root,root) %ghost %{_libdir}/libclinkc.so.0 | |
178 | ||
179 | %files devel | |
180 | %defattr(644,root,root,755) | |
181 | %attr(755,root,root) %{_libdir}/libclinkc.so | |
c3b47f2f JB |
182 | %dir %{_includedir}/cybergarage |
183 | %{_includedir}/cybergarage/http | |
184 | %{_includedir}/cybergarage/io | |
185 | %{_includedir}/cybergarage/net | |
186 | %{_includedir}/cybergarage/soap | |
187 | %dir %{_includedir}/cybergarage/upnp | |
188 | %{_includedir}/cybergarage/upnp/control | |
189 | %{_includedir}/cybergarage/upnp/event | |
190 | %{_includedir}/cybergarage/upnp/ssdp | |
191 | %{_includedir}/cybergarage/upnp/*.h | |
192 | %{_includedir}/cybergarage/util | |
193 | %{_includedir}/cybergarage/xml | |
194 | %{_includedir}/cybergarage/typedef.h | |
78c26185 JB |
195 | %{_pkgconfigdir}/clinkc.pc |
196 | ||
197 | %if %{with static_libs} | |
198 | %files static | |
199 | %defattr(644,root,root,755) | |
200 | %{_libdir}/libclinkc.a | |
201 | %endif | |
202 | ||
203 | %if %{with apidocs} | |
204 | %files apidocs | |
205 | %defattr(644,root,root,755) | |
206 | %doc doxygen/html/*.{css,html,js,png} | |
207 | %endif | |
c3b47f2f JB |
208 | |
209 | %files av | |
210 | %defattr(644,root,root,755) | |
211 | %doc std/av/{COPYING,ChangeLog} | |
212 | %attr(755,root,root) %{_libdir}/libclinkcav.so.*.*.* | |
213 | %attr(755,root,root) %ghost %{_libdir}/libclinkcav.so.0 | |
214 | ||
215 | %files av-devel | |
216 | %defattr(644,root,root,755) | |
217 | %attr(755,root,root) %{_libdir}/libclinkcav.so | |
218 | %{_includedir}/cybergarage/upnp/std | |
219 | ||
220 | %if %{with static_libs} | |
221 | %files av-static | |
222 | %defattr(644,root,root,755) | |
223 | %{_libdir}/libclinkcav.a | |
224 | %endif |