]>
Commit | Line | Data |
---|---|---|
c2ceee5d WF |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static library | |
4 | ||
4dd016f3 JB |
5 | Summary: Utility functions for NetSurf |
6 | Summary(pl.UTF-8): Biblioteka funkcji narzędziowych dla NetSurfa | |
c2ceee5d | 7 | Name: libnsutils |
defd208b | 8 | Version: 0.0.3 |
c2ceee5d WF |
9 | Release: 1 |
10 | License: MIT | |
11 | Group: Libraries | |
12 | Source0: http://download.netsurf-browser.org/libs/releases/%{name}-%{version}-src.tar.gz | |
defd208b | 13 | # Source0-md5: a6c86655cf6bffe5bb49e5d346679f3e |
c2ceee5d | 14 | URL: http://www.netsurf-browser.org/projects/libnsutils/ |
57867e4a | 15 | BuildRequires: netsurf-buildsystem >= 1.5 |
c2ceee5d WF |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %description | |
22f48962 JB |
19 | Libnsutils provides a small number of useful utility routines which |
20 | require platform-specific implementations. | |
c2ceee5d WF |
21 | |
22 | %description -l pl.UTF-8 | |
22f48962 JB |
23 | Biblioteka libnsutils dostarcza trochę przydatnych funkcji |
24 | narzędziowych, wymagających implementacji zależnych od platformy. | |
c2ceee5d WF |
25 | |
26 | %package devel | |
27 | Summary: libnsutils library headers | |
28 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnsutils | |
29 | Group: Development/Libraries | |
30 | Requires: %{name} = %{version}-%{release} | |
31 | ||
32 | %description devel | |
33 | This package contains the include files and other resources you can | |
34 | use to incorporate libnsutils into applications. | |
35 | ||
36 | %description devel -l pl.UTF-8 | |
4dd016f3 JB |
37 | Pliki nagłówkowe pozwalające na używanie biblioteki libnsutils w |
38 | swoich programach. | |
c2ceee5d WF |
39 | |
40 | %package static | |
41 | Summary: libnsutils static library | |
42 | Summary(pl.UTF-8): Statyczna biblioteka libnsutils | |
43 | Group: Development/Libraries | |
44 | Requires: %{name}-devel = %{version}-%{release} | |
45 | ||
46 | %description static | |
47 | This is package with static libnsutils library. | |
48 | ||
49 | %description static -l pl.UTF-8 | |
50 | Statyczna biblioteka libnsutils. | |
51 | ||
52 | %prep | |
53 | %setup -q | |
54 | ||
55 | %build | |
57867e4a | 56 | export AR="%{__ar}" |
c2ceee5d WF |
57 | export CC="%{__cc}" |
58 | export CFLAGS="%{rpmcflags}" | |
59 | export LDFLAGS="%{rpmldflags}" | |
60 | ||
61 | %{__make} \ | |
62 | Q= \ | |
63 | PREFIX=%{_prefix} \ | |
64 | COMPONENT_TYPE=lib-shared | |
65 | ||
66 | %if %{with static_libs} | |
67 | %{__make} \ | |
68 | Q= \ | |
69 | PREFIX=%{_prefix} \ | |
70 | COMPONENT_TYPE=lib-static | |
71 | %endif | |
72 | ||
73 | %install | |
7e6b288a JB |
74 | rm -rf $RPM_BUILD_ROOT |
75 | ||
57867e4a WF |
76 | export AR="%{__ar}" |
77 | export CC="%{__cc}" | |
78 | export CFLAGS="%{rpmcflags}" | |
79 | export LDFLAGS="%{rpmldflags}" | |
80 | ||
c2ceee5d WF |
81 | %{__make} install \ |
82 | PREFIX=%{_prefix} \ | |
83 | LIBDIR=%{_lib} \ | |
84 | COMPONENT_TYPE=lib-shared \ | |
85 | DESTDIR=$RPM_BUILD_ROOT | |
86 | ||
87 | %if %{with static_libs} | |
88 | %{__make} install \ | |
89 | PREFIX=%{_prefix} \ | |
90 | LIBDIR=%{_lib} \ | |
91 | COMPONENT_TYPE=lib-static \ | |
92 | DESTDIR=$RPM_BUILD_ROOT | |
93 | %endif | |
94 | ||
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %post -p /sbin/ldconfig | |
99 | %postun -p /sbin/ldconfig | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
22f48962 | 103 | %doc COPYING README |
c2ceee5d WF |
104 | %attr(755,root,root) %{_libdir}/libnsutils.so.*.*.* |
105 | %attr(755,root,root) %ghost %{_libdir}/libnsutils.so.0 | |
106 | ||
107 | %files devel | |
108 | %defattr(644,root,root,755) | |
109 | %attr(755,root,root) %{_libdir}/libnsutils.so | |
110 | %{_includedir}/nsutils | |
111 | %{_pkgconfigdir}/libnsutils.pc | |
112 | ||
113 | %if %{with static_libs} | |
114 | %files static | |
115 | %defattr(644,root,root,755) | |
116 | %{_libdir}/libnsutils.a | |
117 | %endif |