]>
Commit | Line | Data |
---|---|---|
d600c9c7 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static library | |
1a8afbbd | 4 | |
d600c9c7 | 5 | Summary: Decoding library for the GIF format |
6 | Name: libnsgif | |
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: f3d4295be77db30da1f4167b270bb4d9 | |
c1cc6538 | 13 | Patch0: lib.patch |
d600c9c7 | 14 | URL: http://www.netsurf-browser.org/projects/libnsgif/ |
15 | BuildRequires: netsurf-buildsystem | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
19 | Libnsgif is a decoding library for the GIF image file format, written | |
20 | in C. It was developed as part of the NetSurf project and is available | |
21 | for use by other software under the MIT licence. | |
22 | ||
23 | %package devel | |
24 | Summary: libsgif library headers | |
25 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnsgif | |
26 | Group: Development/Libraries | |
27 | Requires: %{name} = %{version}-%{release} | |
28 | ||
29 | %description devel | |
30 | This is the libraries, include files and other resources you can use | |
31 | to incorporate libnsgif into applications. | |
32 | ||
33 | %description devel -l pl.UTF-8 | |
34 | Pliki nagłówkowe pozwalające na używanie biblioteki libnsgif w swoich | |
35 | programach. | |
36 | ||
37 | %package static | |
38 | Summary: libnsgif static libraries | |
39 | Summary(pl.UTF-8): Statyczne biblioteki libnsgif | |
40 | Group: Development/Libraries | |
41 | Requires: %{name}-devel = %{version}-%{release} | |
42 | ||
43 | %description static | |
44 | This is package with static libnsgif libraries. | |
45 | ||
46 | %description static -l pl.UTF-8 | |
47 | Statyczna biblioteka libnsgif. | |
48 | ||
49 | %prep | |
50 | %setup -q | |
c1cc6538 | 51 | %patch0 -p1 |
d600c9c7 | 52 | |
53 | %build | |
1a8afbbd ER |
54 | CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" \ |
55 | %{__make} PREFIX=%{_prefix} COMPONENT_TYPE=lib-shared Q='' | |
56 | ||
d600c9c7 | 57 | %if %{with static_libs} |
1a8afbbd ER |
58 | CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" \ |
59 | %{__make} PREFIX=%{_prefix} COMPONENT_TYPE=lib-static Q='' | |
d600c9c7 | 60 | %endif |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
d600c9c7 | 64 | %{__make} install \ |
c1cc6538 | 65 | lib=%{_lib} \ |
d600c9c7 | 66 | PREFIX=%{_prefix} \ |
1a8afbbd ER |
67 | COMPONENT_TYPE=lib-shared \ |
68 | DESTDIR=$RPM_BUILD_ROOT | |
d600c9c7 | 69 | |
70 | %if %{with static_libs} | |
71 | %{__make} install \ | |
c1cc6538 | 72 | lib=%{_lib} \ |
d600c9c7 | 73 | PREFIX=%{_prefix} \ |
1a8afbbd ER |
74 | COMPONENT_TYPE=lib-static \ |
75 | DESTDIR=$RPM_BUILD_ROOT | |
d600c9c7 | 76 | %endif |
77 | ||
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %post -p /sbin/ldconfig | |
82 | %postun -p /sbin/ldconfig | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
1a8afbbd ER |
86 | %attr(755,root,root) %{_libdir}/libnsgif.so.*.*.* |
87 | %ghost %{_libdir}/libnsgif.so.0 | |
d600c9c7 | 88 | |
89 | %files devel | |
90 | %defattr(644,root,root,755) | |
1a8afbbd ER |
91 | %{_libdir}/libnsgif.so |
92 | %{_includedir}/libnsgif.h | |
93 | %{_pkgconfigdir}/libnsgif.pc | |
d600c9c7 | 94 | |
95 | %if %{with static_libs} | |
96 | %files static | |
97 | %defattr(644,root,root,755) | |
1a8afbbd | 98 | %{_libdir}/libnsgif.a |
d600c9c7 | 99 | %endif |