2 # TODO: avoid compilation in the install stage
4 %bcond_without static_libs # don't build static library
6 Summary: CSS parser and selection engine
12 Source0: http://download.netsurf-browser.org/libs/releases/libcss-%{version}-src.tar.gz
13 # Source0-md5: e61700e0dce2a122d65b85dba04c4b40
14 URL: http://www.netsurf-browser.org/projects/libcss/
15 BuildRequires: libparserutils-devel >= 0.1.2
16 BuildRequires: libwapcaplet-devel >= 0.2.0
17 BuildRequires: netsurf-buildsystem
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 LibCSS is a CSS (Cascading Style Sheet) parser and selection engine,
22 written in C. It was developed as part of the NetSurf project and is
23 available for use by other software under the MIT licence. For further
24 details, see the readme.
28 - Parses CSS, good and bad
31 - Fast selection engine
36 Summary: libCSS library headers
37 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libCSS
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 This is the libraries, include files and other resources you can use
43 to incorporate libCSS into applications.
45 %description devel -l pl.UTF-8
46 Pliki nagłówkowe pozwalające na używanie biblioteki libCSS w swoich
50 Summary: libCSS static libraries
51 Summary(pl.UTF-8): Statyczne biblioteki libCSS
52 Group: Development/Libraries
53 Requires: %{name}-devel = %{version}-%{release}
56 This is package with static libCSS libraries.
58 %description static -l pl.UTF-8
59 Statyczna biblioteka libCSS.
62 %setup -q -n libcss-%{version}
65 %{__make} PREFIX=%{_prefix} COMPONENT_TYPE=lib-shared Q='' \
66 CFLAGS="%{rpmcflags} -Iinclude -Isrc" LDFLAGS="%{rpmldflags}"
67 %if %{with static_libs}
68 %{__make} PREFIX=%{_prefix} COMPONENT_TYPE=lib-static Q='' \
69 CFLAGS="%{rpmcflags} -Iinclude -Isrc" LDFLAGS="%{rpmldflags}"
73 rm -rf $RPM_BUILD_ROOT
75 %{__make} -j1 install \
76 DESTDIR=$RPM_BUILD_ROOT \
78 COMPONENT_TYPE=lib-shared \
81 %if %{with static_libs}
82 %{__make} -j1 install \
83 DESTDIR=$RPM_BUILD_ROOT \
85 COMPONENT_TYPE=lib-static \
90 rm -rf $RPM_BUILD_ROOT
92 %post -p /sbin/ldconfig
93 %postun -p /sbin/ldconfig
96 %defattr(644,root,root,755)
97 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
100 %defattr(644,root,root,755)
101 %attr(755,root,root) %{_libdir}/lib*.so
102 %{_includedir}/libcss
105 %if %{with static_libs}
107 %defattr(644,root,root,755)