3 %bcond_without tests # build without tests
5 %define collection_version 0.6.1
6 %define dhash_version 0.4.3
7 %define ini_config_version 0.6.2
8 %define path_utils_version 0.2.1
9 %define ref_array_version 0.1.2
10 Summary: "Ding is not GLib" assorted utility libraries
13 # NOTE: do not decrease Release on Version change, unless ALL subpackage versions have been increased too
16 Group: Development/Libraries
17 URL: http://fedorahosted.org/sssd/
18 Source0: http://fedorahosted.org/releases/d/i/ding-libs/%{name}-%{version}.tar.gz
19 # Source0-md5: b4f5e03b0b1bd0ab765902a7a466f749
20 BuildRequires: autoconf
21 BuildRequires: automake
22 BuildRequires: check-devel
23 BuildRequires: doxygen
24 BuildRequires: libtool
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 A set of helpful libraries used by projects such as SSSD.
31 %package -n libcollection
32 Summary: Collection data-type for C
33 Version: %{collection_version}
35 Group: Development/Libraries
37 %description -n libcollection
38 A data-type to collect data in a hierarchical structure for easy
39 iteration and serialization.
41 %package -n libcollection-devel
42 Summary: Development files for libcollection
43 Version: %{collection_version}
45 Group: Development/Libraries
46 Requires: libcollection = %{collection_version}-%{release}
48 %description -n libcollection-devel
49 A data-type to collect data in a hierarchical structure for easy
50 iteration and serialization.
53 Summary: Dynamic hash table
54 Version: %{dhash_version}
56 Group: Development/Libraries
58 %description -n libdhash
59 A hash table which will dynamically resize to achieve optimal storage
60 & access time properties.
62 %package -n libdhash-devel
63 Summary: Development files for libdhash
64 Version: %{dhash_version}
66 Group: Development/Libraries
67 Requires: libdhash = %{dhash_version}-%{release}
69 %description -n libdhash-devel
70 A hash table which will dynamically resize to achieve optimal storage
71 & access time properties.
73 %package -n libini_config
74 Summary: INI file parser for C
75 Version: %{ini_config_version}
77 Group: Development/Libraries
79 %description -n libini_config
80 Library to process config files in INI format into a libcollection
83 %package -n libini_config-devel
84 Summary: Development files for libini_config
85 Version: %{ini_config_version}
87 Group: Development/Libraries
88 Requires: libini_config = %{ini_config_version}-%{release}
90 %description -n libini_config-devel
91 Library to process config files in INI format into a libcollection
94 %package -n libpath_utils
95 Summary: Filesystem Path Utilities
96 Version: %{path_utils_version}
98 Group: Development/Libraries
100 %description -n libpath_utils
101 Utility functions to manipulate filesystem pathnames.
103 %package -n libpath_utils-devel
104 Summary: Development files for libpath_utils
105 Version: %{path_utils_version}
107 Group: Development/Libraries
108 Requires: libpath_utils = %{path_utils_version}-%{release}
110 %description -n libpath_utils-devel
111 Utility functions to manipulate filesystem pathnames.
113 %package -n libref_array
114 Summary: A refcounted array for C
115 Version: %{ref_array_version}
117 Group: Development/Libraries
119 %description -n libref_array
120 A dynamically-growing, reference-counted array.
122 %package -n libref_array-devel
123 Summary: Development files for libref_array
124 Version: %{ref_array_version}
126 Group: Development/Libraries
127 Requires: libref_array = %{ref_array_version}-%{release}
129 %description -n libref_array-devel
130 A dynamically-growing, reference-counted array.
146 rm -rf $RPM_BUILD_ROOT
148 DESTDIR=$RPM_BUILD_ROOT
150 # Remove .la files created by libtool
151 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
153 # Remove the example files from the output directory
154 # We will copy them directly from the source directory
157 $RPM_BUILD_ROOT%{_docdir}/ding-libs/README.* \
158 $RPM_BUILD_ROOT%{_docdir}/ding-libs/examples/dhash_example.c \
159 $RPM_BUILD_ROOT%{_docdir}/ding-libs/examples/dhash_test.c
161 # Remove document install script. RPM is handling this
162 %{__rm} -f */doc/html/installdox
165 rm -rf $RPM_BUILD_ROOT
167 %post -n libcollection -p /sbin/ldconfig
168 %postun -n libcollection -p /sbin/ldconfig
170 %post -n libdhash -p /sbin/ldconfig
171 %postun -n libdhash -p /sbin/ldconfig
173 %post -n libini_config -p /sbin/ldconfig
174 %postun -n libini_config -p /sbin/ldconfig
176 %post -n libpath_utils -p /sbin/ldconfig
177 %postun -n libpath_utils -p /sbin/ldconfig
179 %post -n libref_array -p /sbin/ldconfig
180 %postun -n libref_array -p /sbin/ldconfig
182 %files -n libcollection
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/libcollection.so.*.*.*
185 %ghost %{_libdir}/libcollection.so.2
187 %files -n libcollection-devel
188 %defattr(644,root,root,755)
189 %doc collection/doc/html
190 %{_includedir}/collection.h
191 %{_includedir}/collection_tools.h
192 %{_includedir}/collection_queue.h
193 %{_includedir}/collection_stack.h
194 %{_libdir}/libcollection.so
195 %{_pkgconfigdir}/collection.pc
198 %defattr(644,root,root,755)
199 %attr(755,root,root) %{_libdir}/libdhash.so.*.*.*
200 %{_libdir}/libdhash.so.1
202 %files -n libdhash-devel
203 %defattr(644,root,root,755)
204 %doc dhash/README.dhash
206 %{_includedir}/dhash.h
207 %{_libdir}/libdhash.so
208 %{_pkgconfigdir}/dhash.pc
210 %files -n libini_config
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_libdir}/libini_config.so.*.*.*
213 %ghost %{_libdir}/libini_config.so.2
215 %files -n libini_config-devel
216 %defattr(644,root,root,755)
218 %{_includedir}/ini_config.h
219 %{_libdir}/libini_config.so
220 %{_pkgconfigdir}/ini_config.pc
222 %files -n libpath_utils
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/libpath_utils.so.*.*.*
225 %ghost %{_libdir}/libpath_utils.so.1
227 %files -n libpath_utils-devel
228 %defattr(644,root,root,755)
229 %doc path_utils/README.path_utils
230 %doc path_utils/doc/html
231 %{_includedir}/path_utils.h
232 %{_libdir}/libpath_utils.so
233 %{_pkgconfigdir}/path_utils.pc
235 %files -n libref_array
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libref_array.so.*.*.*
238 %ghost %{_libdir}/libref_array.so.1
240 %files -n libref_array-devel
241 %defattr(644,root,root,755)
242 %doc refarray/README.ref_array
243 %doc refarray/doc/html
244 %{_includedir}/ref_array.h
245 %{_libdir}/libref_array.so
246 %{_pkgconfigdir}/ref_array.pc