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