]>
Commit | Line | Data |
---|---|---|
406cd463 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation (doxygen generated) | |
4 | %bcond_without static_libs # static library | |
5 | ||
28aed470 JB |
6 | Summary: ZenLib C++ utility library |
7 | Summary(pl.UTF-8): ZenLib - biblioteka narzędziowa C++ | |
78dc5e3d | 8 | Name: libzen |
3c8464e7 | 9 | Version: 0.4.40 |
dd81643d | 10 | Release: 1 |
78dc5e3d AM |
11 | License: BSD |
12 | Group: Libraries | |
406cd463 | 13 | Source0: https://mediaarea.net/download/source/libzen/%{version}/%{name}_%{version}.tar.xz |
3c8464e7 | 14 | # Source0-md5: 44e52daaba43416f15b92dd01ba7aa39 |
cfec36c4 | 15 | Patch0: %{name}-include.patch |
406cd463 | 16 | URL: https://github.com/MediaArea/ZenLib |
28aed470 JB |
17 | BuildRequires: autoconf >= 2.50 |
18 | BuildRequires: automake >= 1:1.11 | |
406cd463 | 19 | %{?with_apidocs:BuildRequires: doxygen} |
78dc5e3d | 20 | BuildRequires: libstdc++-devel |
28aed470 | 21 | BuildRequires: libtool >= 2:1.5 |
cfec36c4 | 22 | BuildRequires: rpmbuild(macros) >= 1.566 |
406cd463 JB |
23 | BuildRequires: tar >= 1:1.22 |
24 | BuildRequires: xz | |
78dc5e3d AM |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28aed470 JB |
28 | ZenLib is a C++ utility library. It includes classes for handling |
29 | strings, configuration, bit streams, threading, translation, and | |
30 | cross-platform operating system functions. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | ZenLib to biblioteka narzędziowa C++. Zawiera klasy do obsługi | |
dd81643d AM |
34 | łańcuchów znaków, konfiguracji, strumieni bitowych, wątków, tłumaczeń |
35 | oraz wieloplatformowe funkcji dotyczące systemu operacyjnego. | |
78dc5e3d | 36 | |
6f42a672 | 37 | %package devel |
28aed470 JB |
38 | Summary: Header files for ZenLib library |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki ZenLib | |
78dc5e3d AM |
40 | Group: Development/Libraries |
41 | Requires: %{name} = %{version}-%{release} | |
28aed470 | 42 | Requires: libstdc++-devel |
78dc5e3d | 43 | |
6f42a672 | 44 | %description devel |
28aed470 JB |
45 | Header files for ZenLib library. |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki ZenLib. | |
78dc5e3d AM |
49 | |
50 | %package static | |
28aed470 JB |
51 | Summary: Static ZenLib library |
52 | Summary(pl.UTF-8): Statyczna biblioteka ZenLib | |
78dc5e3d AM |
53 | Group: Development/Libraries |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
28aed470 JB |
57 | Static ZenLib library. |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka ZenLib. | |
78dc5e3d | 61 | |
406cd463 JB |
62 | %package apidocs |
63 | Summary: API documentation for ZenLib library | |
64 | Summary(pl.UTF-8): Dokumentacja API biblioteki ZenLib | |
65 | Group: Documentation | |
66 | ||
67 | %description apidocs | |
68 | API documentation for ZenLib library. | |
69 | ||
70 | %description apidocs -l pl.UTF-8 | |
71 | Dokumentacja API biblioteki ZenLib. | |
72 | ||
78dc5e3d AM |
73 | %prep |
74 | %setup -q -n ZenLib | |
cfec36c4 KK |
75 | %undos Source/ZenLib/*.h |
76 | %undos *.txt Source/Doc/*.html | |
78dc5e3d | 77 | chmod 644 *.txt Source/Doc/*.html |
cfec36c4 | 78 | %patch0 -p1 |
78dc5e3d AM |
79 | |
80 | %build | |
78dc5e3d | 81 | cd Project/GNU/Library |
28aed470 JB |
82 | %{__libtoolize} |
83 | %{__aclocal} | |
84 | %{__autoconf} | |
85 | %{__automake} | |
86 | %configure \ | |
406cd463 | 87 | %{?with_static_libs:--enable-static} |
28aed470 JB |
88 | %{__make} clean |
89 | %{__make} | |
406cd463 JB |
90 | |
91 | %if %{with apidocs} | |
28aed470 JB |
92 | cd ../../../Source/Doc |
93 | doxygen Doxyfile | |
406cd463 | 94 | %endif |
78dc5e3d AM |
95 | |
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
28aed470 | 99 | %{__make} -C Project/GNU/Library install \ |
78dc5e3d AM |
100 | DESTDIR=$RPM_BUILD_ROOT |
101 | ||
3867d925 JB |
102 | # obsoleted by pkg-config |
103 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libzen.la | |
104 | ||
78dc5e3d AM |
105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
28aed470 JB |
108 | %post -p /sbin/ldconfig |
109 | %postun -p /sbin/ldconfig | |
78dc5e3d AM |
110 | |
111 | %files | |
112 | %defattr(644,root,root,755) | |
406cd463 | 113 | %doc History.txt License.txt README.md |
28aed470 JB |
114 | %attr(755,root,root) %{_libdir}/libzen.so.*.*.* |
115 | %attr(755,root,root) %ghost %{_libdir}/libzen.so.0 | |
78dc5e3d AM |
116 | |
117 | %files devel | |
118 | %defattr(644,root,root,755) | |
78dc5e3d | 119 | %attr(755,root,root) %{_libdir}/libzen.so |
28aed470 JB |
120 | %{_includedir}/ZenLib |
121 | %{_pkgconfigdir}/libzen.pc | |
78dc5e3d | 122 | |
406cd463 | 123 | %if %{with static_libs} |
78dc5e3d AM |
124 | %files static |
125 | %defattr(644,root,root,755) | |
126 | %{_libdir}/libzen.a | |
406cd463 JB |
127 | %endif |
128 | ||
129 | %if %{with apidocs} | |
130 | %files apidocs | |
131 | %defattr(644,root,root,755) | |
132 | # Documentation.html expects Doc/index.html | |
133 | %doc Source/Doc/Documentation.html Doc | |
134 | %endif |