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