]>
Commit | Line | Data |
---|---|---|
de7f9f03 JB |
1 | # TODO: PLDify init script |
2 | # | |
3 | # Conditonal build: | |
4 | %bcond_with db # BerkeleyDB backend [slightly outdated] | |
5 | %bcond_with gconf # GConf backend [same as above] | |
6 | %bcond_with python # Python binding [same as above] | |
7 | # | |
b511c548 | 8 | Summary: A key/value pair database to store software configurations |
3afb30a1 | 9 | Summary(pl.UTF-8): Baza kluczy/wartości do przechowywania konfiguracji oprogramowania |
08a1423c | 10 | Name: elektra |
de7f9f03 | 11 | Version: 0.7.2 |
b511c548 | 12 | Release: 0.1 |
08a1423c | 13 | License: BSD |
b511c548 | 14 | Group: Applications/System |
de7f9f03 JB |
15 | Source0: http://www.libelektra.org/ftp/elektra/releases/%{name}-%{version}.tar.gz |
16 | # Source0-md5: 29f14be7693ae627fb8cc30a079b10c9 | |
17 | Patch0: %{name}-elektraenv.patch | |
18 | Patch1: %{name}-am.patch | |
19 | URL: http://www.libelektra.org/ | |
20 | %{?with_gconf:BuildRequires: GConf2-devel} | |
21 | BuildRequires: autoconf >= 2.59 | |
22 | BuildRequires: automake | |
23 | %{?with_db:BuildRequires: db-devel} | |
24 | BuildRequires: doxygen | |
25 | BuildRequires: gettext-devel | |
26 | BuildRequires: libstdc++-devel | |
27 | BuildRequires: libltdl-devel | |
28 | BuildRequires: libtool | |
731cdbee | 29 | BuildRequires: libxml2-devel |
b0fec8fa | 30 | BuildRequires: libxslt-progs |
de7f9f03 JB |
31 | BuildRequires: pkgconfig |
32 | %{?with_python:BuildRequires: python-devel} | |
33 | Requires: %{name}-libs = %{version}-%{release} | |
731cdbee | 34 | Requires: mktemp |
ff4dd69b JB |
35 | # for /usr/share/sgml dir |
36 | Requires: sgml-common | |
08a1423c | 37 | Obsoletes: registry |
a1ae6c6c | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
de7f9f03 JB |
40 | %define _bindir /bin |
41 | %define _sbindir /sbin | |
42 | ||
a1ae6c6c | 43 | %description |
b511c548 | 44 | The Elektra Project provides a framework to store generic |
45 | configuration data in an hierarchical key-value pair database, instead | |
46 | of a human-readable only text file. | |
a1ae6c6c | 47 | |
48 | This way any software can read/save his configuration using a | |
49 | consistent API. Also, applications can be aware of other applications | |
50 | configurations, leveraging easy application integration. | |
51 | ||
9b93ecfb | 52 | %description -l pl.UTF-8 |
ff4dd69b | 53 | Projekt Elektra dostarcza szkielet do przechowywania typowych danych |
9b93ecfb JR |
54 | konfiguracyjnych w postaci klucz-wartość w hierarchicznej bazie |
55 | danych, zamiast w pliku tekstowym czytelnym tylko dla człowieka. | |
85fe0e6b | 56 | |
9b93ecfb JR |
57 | W ten sposób oprogramowanie może odczytywać/zapisywać konfigurację za |
58 | pomocą spójnego API. Dodatkowo aplikacje mogą być zorientowane w | |
59 | konfiguracji innych aplikacji, ułatwiając ich integrację. | |
a1ae6c6c | 60 | |
de7f9f03 JB |
61 | %package libs |
62 | Summary: Elektra Project libraries | |
63 | Summary(pl.UTF-8): Biblioteki projektu Elektra | |
64 | Group: Libraries | |
65 | Conflicts: elektra < 0.7 | |
a1ae6c6c | 66 | |
de7f9f03 | 67 | %description libs |
b511c548 | 68 | The Elektra Project provides a framework to store generic |
69 | configuration data in an hierarchical key-value pair database, instead | |
70 | of a human-readable only text file. | |
a1ae6c6c | 71 | |
72 | This way any software can read/save his configuration using a | |
73 | consistent API. Also, applications can be aware of other applications | |
74 | configurations, leveraging easy application integration. | |
75 | ||
de7f9f03 | 76 | This package contains Elektra shared libraries. |
a1ae6c6c | 77 | |
de7f9f03 | 78 | %description libs -l pl.UTF-8 |
ff4dd69b | 79 | Projekt Elektra dostarcza szkielet do przechowywania typowych danych |
9b93ecfb JR |
80 | konfiguracyjnych w postaci klucz-wartość w hierarchicznej bazie |
81 | danych, zamiast w pliku tekstowym czytelnym tylko dla człowieka. | |
85fe0e6b | 82 | |
9b93ecfb JR |
83 | W ten sposób oprogramowanie może odczytywać/zapisywać konfigurację za |
84 | pomocą spójnego API. Dodatkowo aplikacje mogą być zorientowane w | |
85 | konfiguracji innych aplikacji, ułatwiając ich integrację. | |
85fe0e6b | 86 | |
de7f9f03 JB |
87 | Ten pakiet zawiera biblioteki współdzielone Elektry. |
88 | ||
89 | %package devel | |
90 | Summary: Include files and API documentation for Elektra Project | |
91 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja API projektu Elektra | |
92 | Group: Development/Libraries | |
93 | Requires: %{name}-libs = %{version}-%{release} | |
94 | ||
95 | %description devel | |
96 | This package contains the include files and API manual pages to use | |
97 | the Elektra API in C. | |
98 | ||
99 | %description devel -l pl.UTF-8 | |
9b93ecfb JR |
100 | Ten pakiet zawiera pliki nagłówkowe oraz strony podręcznika |
101 | systemowego opisującego sposób użycia API Elektry w C. | |
a1ae6c6c | 102 | |
b511c548 | 103 | %package static |
de7f9f03 JB |
104 | Summary: Static libraries for Elektra Project |
105 | Summary(pl.UTF-8): Statyczne biblioteki projektu Elektra | |
85fe0e6b | 106 | Group: Development/Libraries |
de7f9f03 | 107 | Requires: %{name}-devel = %{version}-%{release} |
a1ae6c6c | 108 | |
b511c548 | 109 | %description static |
de7f9f03 | 110 | This package contains static libraries for Elektra Project. |
a1ae6c6c | 111 | |
de7f9f03 JB |
112 | %description static -l pl.UTF-8 |
113 | Ten pakiet zawiera statyczne biblioteki projektu Elektra. | |
a1ae6c6c | 114 | |
de7f9f03 JB |
115 | %package cpp |
116 | Summary: C++ interface for Elektra library | |
117 | Summary(pl.UTF-8): Interfejs C++ do biblioteki Elektra | |
118 | Group: Libraries | |
119 | Requires: %{name}-libs = %{version}-%{release} | |
a1ae6c6c | 120 | |
de7f9f03 JB |
121 | %description cpp |
122 | C++ interface for Elektra library. | |
85fe0e6b | 123 | |
de7f9f03 JB |
124 | %description cpp -l pl.UTF-8 |
125 | Interfejs C++ do biblioteki Elektra. | |
126 | ||
127 | %package cpp-devel | |
128 | Summary: Header files of C++ interface for Elektra library | |
129 | Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki Elektra | |
130 | Group: Development/Libraries | |
131 | Requires: %{name}-cpp = %{version}-%{release} | |
132 | Requires: %{name}-libs = %{version}-%{release} | |
133 | Requires: libstdc++-devel | |
134 | ||
135 | %description cpp-devel | |
136 | Header files of C++ interface for Elektra library. | |
137 | ||
138 | %description cpp-devel -l pl.UTF-8 | |
139 | Pliki nagłówkowe interfejsu C++ do biblioteki Elektra. | |
140 | ||
141 | %package cpp-static | |
142 | Summary: Static library of C++ interface for Elektra library | |
143 | Summary(pl.UTF-8): Biblioteka statyczna interfejsu C++ do biblioteki Elektra | |
144 | Group: Development/Libraries | |
145 | Requires: %{name}-cpp-devel = %{version}-%{release} | |
85fe0e6b | 146 | |
de7f9f03 JB |
147 | %description cpp-static |
148 | Static library of C++ interface for Elektra library. | |
149 | ||
150 | %description cpp-static -l pl.UTF-8 | |
151 | Biblioteka statyczna interfejsu C++ do biblioteki Elektra. | |
a1ae6c6c | 152 | |
153 | %prep | |
de7f9f03 | 154 | %setup -q |
b511c548 | 155 | %patch0 -p1 |
01799f2a | 156 | %patch1 -p1 |
a1ae6c6c | 157 | |
158 | %build | |
de7f9f03 JB |
159 | cp -f /usr/share/gettext/config.rpath . |
160 | %{__libtoolize} | |
161 | %{__aclocal} -I m4 | |
162 | %{__autoconf} | |
163 | %{__autoheader} | |
164 | %{__automake} | |
165 | %configure \ | |
166 | --libdir=/%{_lib} \ | |
167 | %{?with_db:--enable-berkeleydb} \ | |
168 | %{?with_gconf:--enable-gconf} \ | |
169 | --enable-passwd \ | |
170 | %{?with_python:--enable-python} | |
171 | # also outdated (as of 0.7.2): daemon, fstab | |
172 | %{__make} | |
a1ae6c6c | 173 | |
174 | %install | |
175 | rm -rf $RPM_BUILD_ROOT | |
eeac539a | 176 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
ff4dd69b | 177 | |
85fe0e6b | 178 | %{__make} install \ |
de7f9f03 JB |
179 | DESTDIR=$RPM_BUILD_ROOT \ |
180 | elektrainitdir=/etc/rc.d/init.d | |
181 | ||
182 | %{!?with_berkeleydb:%{__rm} $RPM_BUILD_ROOT/%{_lib}/elektra/libelektra-ddefault.so} | |
a1ae6c6c | 183 | |
de7f9f03 JB |
184 | # prepare docs |
185 | rm -rf installed-doc | |
186 | install -d installed-doc | |
187 | mv $RPM_BUILD_ROOT%{_docdir}/%{name}-devel installed-doc/elektra-api | |
188 | mv $RPM_BUILD_ROOT%{_docdir}/%{name}/scripts installed-doc/scripts | |
189 | rmdir $RPM_BUILD_ROOT%{_docdir}/%{name} | |
a1ae6c6c | 190 | |
eeac539a | 191 | echo 'RUN="no"' > $RPM_BUILD_ROOT/etc/sysconfig/elektra |
ff4dd69b | 192 | |
de7f9f03 JB |
193 | # move devel files to /usr |
194 | %{__mv} $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT%{_libdir} | |
195 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelektra.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libelektra.so | |
196 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/libelektra.so | |
197 | ||
198 | # dlopened modules | |
199 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/elektra/*.{la,a} | |
200 | # obsoleted by pkg-config | |
201 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/lib*.la \ | |
202 | $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
203 | ||
a1ae6c6c | 204 | %clean |
205 | rm -rf $RPM_BUILD_ROOT | |
206 | ||
207 | %post | |
b511c548 | 208 | # Create basic key structure for apps |
731cdbee | 209 | kdb set -t dir system/sw || : |
de7f9f03 | 210 | kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra-0.7.1/elektra.xsd" |
a1ae6c6c | 211 | |
de7f9f03 JB |
212 | %post libs -p /sbin/ldconfig |
213 | %postun libs -p /sbin/ldconfig | |
214 | ||
215 | %post cpp -p /sbin/ldconfig | |
216 | %postun cpp -p /sbin/ldconfig | |
a1ae6c6c | 217 | |
218 | %files | |
219 | %defattr(644,root,root,755) | |
de7f9f03 JB |
220 | %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/standards installed-doc/scripts |
221 | %attr(755,root,root) /bin/kdb | |
222 | %attr(755,root,root) /bin/kdb_static | |
223 | %attr(755,root,root) /bin/preload | |
224 | %attr(755,root,root) /bin/preload_static | |
225 | %dir /%{_lib}/elektra | |
226 | %attr(755,root,root) /%{_lib}/elektra/libelektra-default.so | |
227 | %attr(755,root,root) /%{_lib}/elektra/libelektra-filesys.so* | |
228 | %attr(755,root,root) /%{_lib}/elektra/libelektra-hosts.so* | |
229 | %attr(755,root,root) /%{_lib}/elektra/libelektra-passwd.so* | |
230 | %if %{with db} | |
231 | %attr(755,root,root) /%{_lib}/elektra/libelektra-berkeleydb.so* | |
232 | %attr(755,root,root) /%{_lib}/elektra/libelektra-ddefault.so | |
233 | %endif | |
234 | %if %{with gconf} | |
235 | %attr(755,root,root) /%{_lib}/elektra/libelektra-gconf.so* | |
236 | %endif | |
237 | %attr(754,root,root) /etc/rc.d/init.d/kdbd | |
238 | %attr(755,root,root) /etc/profile.d/elektraenv.sh | |
239 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/elektra | |
240 | %{_datadir}/sgml/elektra-0.7.1 | |
241 | %{_mandir}/man1/kdb.1* | |
242 | %{_mandir}/man5/elektra.5* | |
243 | %{_mandir}/man7/elektra.7* | |
244 | ||
245 | %files libs | |
246 | %defattr(644,root,root,755) | |
247 | %attr(755,root,root) /%{_lib}/libelektra.so.*.*.* | |
248 | %attr(755,root,root) %ghost /%{_lib}/libelektra.so.3 | |
249 | %attr(755,root,root) %{_libdir}/libelektratools.so.*.*.* | |
250 | %attr(755,root,root) %ghost %{_libdir}/libelektratools.so.2 | |
a1ae6c6c | 251 | |
252 | %files devel | |
253 | %defattr(644,root,root,755) | |
de7f9f03 JB |
254 | %doc installed-doc/elektra-api/* |
255 | %attr(755,root,root) %{_libdir}/libelektra.so | |
256 | %attr(755,root,root) %{_libdir}/libelektratools.so | |
257 | %{_includedir}/kdb*.h | |
258 | %{_pkgconfigdir}/elektra.pc | |
259 | %{_pkgconfigdir}/elektratools.pc | |
260 | %{_mandir}/man3/kdb*.3* | |
261 | %{_mandir}/man3/key*.3* | |
a1ae6c6c | 262 | |
b511c548 | 263 | %files static |
85fe0e6b | 264 | %defattr(644,root,root,755) |
de7f9f03 JB |
265 | %{_libdir}/libelektra.a |
266 | %{_libdir}/libelektratools.a | |
267 | ||
268 | %files cpp | |
269 | %defattr(644,root,root,755) | |
270 | %attr(755,root,root) %{_libdir}/libelektra-cpp.so.*.*.* | |
271 | %attr(755,root,root) %ghost %{_libdir}/libelektra-cpp.so.0 | |
272 | ||
273 | %files cpp-devel | |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{_libdir}/libelektra-cpp.so | |
276 | %{_includedir}/kdb | |
277 | %{_includedir}/key | |
278 | %{_includedir}/keyset | |
279 | %{_pkgconfigdir}/elektracpp.pc | |
280 | ||
281 | %files cpp-static | |
282 | %defattr(644,root,root,755) | |
283 | %{_libdir}/libelektra-cpp.a |