]>
Commit | Line | Data |
---|---|---|
15dd05e4 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static library | |
85695d63 | 4 | |
15dd05e4 | 5 | Summary: Implementation of SVG Tiny |
6 | Name: libsvgtiny | |
7 | Version: 0.1.0 | |
8 | Release: 1 | |
9 | License: MIT | |
10 | Group: Libraries | |
11 | Source0: http://download.netsurf-browser.org/libs/releases/%{name}-%{version}-src.tar.gz | |
12 | # Source0-md5: b1da875a8cfa4e005bb74c6aac62baf1 | |
420228ae | 13 | Patch0: lib.patch |
15dd05e4 | 14 | URL: http://www.netsurf-browser.org/projects/libsvgtiny/ |
15 | BuildRequires: libdom-devel >= 0.0.1 | |
16 | BuildRequires: libwapcaplet-devel >= 0.2.0 | |
17 | BuildRequires: netsurf-buildsystem | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | Libsvgtiny is an implementation of SVG Tiny, written in C. It is | |
22 | currently in development for use with NetSurf and is intended to be | |
23 | suitable for use in other projects too. | |
24 | ||
25 | The overall idea of the library is to take some SVG as input, and | |
26 | return a list of paths and texts which can be rendered easily. The | |
27 | library does not do the actual rendering. | |
28 | ||
29 | %package devel | |
30 | Summary: libsvgtiny library headers | |
31 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libsvgtiny | |
32 | Group: Development/Libraries | |
33 | Requires: %{name} = %{version}-%{release} | |
34 | ||
35 | %description devel | |
36 | This is the libraries, include files and other resources you can use | |
37 | to incorporate libsvgtiny into applications. | |
38 | ||
39 | %description devel -l pl.UTF-8 | |
40 | Pliki nagłówkowe pozwalające na używanie biblioteki libsvgtiny w | |
41 | swoich programach. | |
42 | ||
43 | %package static | |
44 | Summary: libsvgtiny static libraries | |
45 | Summary(pl.UTF-8): Statyczne biblioteki libsvgtiny | |
46 | Group: Development/Libraries | |
47 | Requires: %{name}-devel = %{version}-%{release} | |
48 | ||
49 | %description static | |
50 | This is package with static libsvgtiny libraries. | |
51 | ||
52 | %description static -l pl.UTF-8 | |
53 | Statyczna biblioteka libsvgtiny. | |
54 | ||
55 | %prep | |
56 | %setup -q | |
420228ae | 57 | %patch0 -p1 |
15dd05e4 | 58 | |
59 | %build | |
85695d63 ER |
60 | export CC="%{__cc}" |
61 | export CFLAGS="%{rpmcflags}" | |
62 | export LDFLAGS="%{rpmldflags}" | |
63 | ||
64 | %{__make} Q= \ | |
65 | PREFIX=%{_prefix} \ | |
66 | COMPONENT_TYPE=lib-shared | |
15dd05e4 | 67 | |
15dd05e4 | 68 | %if %{with static_libs} |
85695d63 ER |
69 | %{__make} Q= \ |
70 | PREFIX=%{_prefix} \ | |
71 | COMPONENT_TYPE=lib-static | |
15dd05e4 | 72 | %endif |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
85695d63 | 76 | %{__make} install Q= \ |
420228ae | 77 | lib=%{_lib} \ |
15dd05e4 | 78 | PREFIX=%{_prefix} \ |
79 | COMPONENT_TYPE=lib-shared \ | |
85695d63 | 80 | DESTDIR=$RPM_BUILD_ROOT |
15dd05e4 | 81 | |
82 | %if %{with static_libs} | |
85695d63 | 83 | %{__make} install Q= \ |
420228ae | 84 | lib=%{_lib} \ |
15dd05e4 | 85 | PREFIX=%{_prefix} \ |
86 | COMPONENT_TYPE=lib-static \ | |
85695d63 | 87 | DESTDIR=$RPM_BUILD_ROOT |
15dd05e4 | 88 | %endif |
89 | ||
90 | %clean | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %post -p /sbin/ldconfig | |
94 | %postun -p /sbin/ldconfig | |
95 | ||
96 | %files | |
97 | %defattr(644,root,root,755) | |
0e8c2b5f ER |
98 | %attr(755,root,root) %{_libdir}/libsvgtiny.so.*.*.* |
99 | %ghost %{_libdir}/libsvgtiny.so.0 | |
15dd05e4 | 100 | |
101 | %files devel | |
102 | %defattr(644,root,root,755) | |
0e8c2b5f ER |
103 | %{_libdir}/libsvgtiny.so |
104 | %{_includedir}/svgtiny.h | |
105 | %{_pkgconfigdir}/libsvgtiny.pc | |
15dd05e4 | 106 | |
107 | %if %{with static_libs} | |
108 | %files static | |
109 | %defattr(644,root,root,755) | |
0e8c2b5f | 110 | %{_libdir}/libsvgtiny.a |
15dd05e4 | 111 | %endif |