Add default Smack manifest for elektra.spec
[pkgs/e/elektra.git] / elektra.spec.in
1 %define tempdocdir %{_prefix}/elektra
2
3 Name:          elektra
4 Version:       @VERSION@
5 Release:       9
6 Source:        http://prdownloads.sourceforge.net/elektra/%{name}-%{version}.tar.gz
7 Group:         System Environment/Libraries
8 License:       BSD
9 URL:           http://www.libelektra.org
10 # Requires:      libxml2
11 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
12 BuildRequires: doxygen db4-devel libxml2-devel docbook-style-xsl libxslt
13
14 # Requires section:
15 # libxml2: used only by libkdbtools, to import keys from XML
16 #
17 # BuildRequires section:
18 # doxygen: to build the API documentation
19 # libxslt, docbook-style-xsl: to build man pages from docbook with xsltproc program
20 # db4-devel: for the Berkeley DB backend
21 # libxml2-devel: for the kdbtools library build
22 # gettext-devel: for the autoconf ICONV macro only
23 # automake, autoconf: for the build system
24 # libtool: not sure
25 # GConf2-devel: for the testing GConf2 backend for Elektra
26
27
28 Summary:       A key/value pair database to store software configurations
29
30
31
32 %description
33 Elektra provides a universal and secure framework to store configuration
34 parameters in a hierarchical key-value pair mechanism, instead of each
35 program using its own text configuration files. This allows any program
36 to read and save its configuration with a consistent API, and allows
37 them to be aware of other applications' configurations, permitting
38 easy application integration. While architecturally similar to other OS
39 registries, Elektra does not have most of the problems found in those
40 implementations.
41
42 %package devel
43 Summary:      Include files and API documentation to build elektrified programs
44 Group:        Development/System
45 Requires:     pkgconfig elektra = %{version}-%{release}
46
47 %description devel
48 Elektra provides a universal and secure framework to store configuration
49 parameters in a hierarchical key-value pair tree.
50
51 This package contains development specific things as include files and
52 static libraries to create elektrified programs.
53
54
55 #%package backend-gconf
56 #Summary:      A GConf backend for Elektra
57 #Group:        System Environment/Libraries
58 #Requires:     elektra
59 #add this in the main RPM description: BuildRequires: GConf2-devel
60
61
62 #%description backend-gconf
63 #Elektra provides a universal and secure framework to store configuration
64 #parameters in a hierarchical key-value pair mechanism, instead of each
65 #program using its own text configuration files. This allows any program
66 #to read and save its configuration with a consistent API, and allows
67 #them to be aware of other applications' configurations, permitting
68 #easy application integration. While architecturally similar to other OS
69 #registries, Elektra does not have most of the problems found in those
70 #implementations.
71
72 #This package contains a GConf backend for Elektra, to let Elektra use a GConf
73 #daemon to store its keys.
74
75
76 %package backend-berkeleydb
77 Summary:      Elektra backend that stores key/value pairs in berkeley DB databases
78 Group:        System Environment/Libraries
79 Requires:     elektra
80
81
82 %description backend-berkeleydb
83 Elektra provides a universal and secure framework to store configuration
84 parameters in a hierarchical key-value pair tree.
85
86 This package contains a Berkeley DB backend for Elektra, to let Elektra use
87 Berkeley DB databases to store its keys.
88
89 # Uncomment and join the '%' char to 'debug_package' if you want to build debug RPMs
90 # % debug_package
91
92 %prep
93 %setup -q
94 %build
95
96 #CFLAGS="-g -O0" \
97
98 %configure \
99      --bindir=/bin \
100      --sbindir=/sbin \
101      --libdir=/%{_lib} \
102      --with-docdir=%{tempdocdir}/elektra-%{version} \
103      --with-develdocdir=%{tempdocdir}/elektra-devel-%{version} \
104      --with-docbook=%{_datadir}/sgml/docbook/xsl-stylesheets
105
106 #     --prefix=%{_prefix} \
107 #     --exec-prefix=/ \
108
109
110 # Add these options if using a plain ./configure instead of RPM's % configure macro
111 # --sysconfdir=%{_sysconfdir} \
112 # --mandir=%{_mandir}
113
114 make %{?_smp_mflags} all
115
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119
120 make DESTDIR=$RPM_BUILD_ROOT install
121
122 # Remove statically linked kdb
123 rm $RPM_BUILD_ROOT/bin/kdb_static
124
125 # Move .a files to -devel package
126 mv $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT%{_libdir}
127
128 # Prepare devel files
129 #mv $RPM_BUILD_ROOT/%{_lib}/libelektra.so $RPM_BUILD_ROOT%{_libdir}/
130 rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so
131 ln -sf ../../%{_lib}/libelektra.so.2 $RPM_BUILD_ROOT%{_libdir}/libelektra.so
132 #rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so
133
134 # Remove .la files
135 #rm $RPM_BUILD_ROOT/usr/lib/libelektra-*.a
136 rm $RPM_BUILD_ROOT/%{_lib}/*.la
137 rm $RPM_BUILD_ROOT/%{_lib}/elektra/*.la
138 rm $RPM_BUILD_ROOT%{_libdir}/*.la
139
140 # Remove a file that conflicts with other packages
141 rm $RPM_BUILD_ROOT%{_mandir}/man3/key.3*
142
143 # Remove documentation from 'make install', to let RPM package it alone
144 rm -rf $RPM_BUILD_ROOT%{tempdocdir}
145 rm -rf scripts/Makefile*
146 rm -rf examples/Makefile*
147 rm -rf examples/.deps
148 rm -rf doc/standards/Makefile*
149 mv doc/elektra-api/html doc/elektra-api/api-html
150
151
152
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156 #rm -rf $RPM_BUILD_DIR/%{name}
157
158
159
160
161 %post
162 /sbin/ldconfig
163 # Backwards compatibility, from the Linux Registry days
164 #if [ -d /etc/registry -a ! -d /etc/kdb ]; then
165 #   $MOVE /etc/registry /etc/kdb
166 #   $LINK -s kdb /etc/registry
167 #fi
168
169 # Make the daemon startable
170 # chkconfig --add kdbd
171
172 # Create basic key structure for apps
173 kdb set -t dir system/sw
174 kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra-0.1.1/elektra.xsd"
175
176
177 %preun
178 # Remove the daemon from init tasks
179 # chkconfig --del kdbd
180
181
182 %postun -p /sbin/ldconfig
183
184
185
186 %files
187 %defattr(-,root,root,-)
188 /bin/*
189 #%attr(4755,root,root) /sbin/kdbd
190 /sbin/kdbd
191 /%{_lib}/*elektra.so*
192 %dir /%{_lib}/elektra
193 /%{_lib}/elektra/*elektra-daemon.so*
194 /%{_lib}/elektra/*elektra-filesys.so*
195 /%{_lib}/elektra/*elektra-default.so*
196 /%{_lib}/elektra/*elektra-ddefault.so*
197 /%{_lib}/elektra/*elektra-fstab.so*
198 #/%{_lib}/elektra/*elektra-ini.so*
199 %{_libdir}/*elektratools.so.*
200 %{_libdir}/elektra/*elektratools.so
201 %{_sysconfdir}/profile.d/*
202 %{_sysconfdir}/init.d/*
203 %doc AUTHORS COPYING ChangeLog README INSTALL
204 %doc scripts doc/standards
205 %{_mandir}/man1/*
206 %{_mandir}/man7/*
207 %{_mandir}/man5/*
208 %{_datadir}/sgml/*
209
210
211 %files devel
212 %defattr(-,root,root,-)
213 %{_includedir}/*
214 %{_libdir}/*.a
215 %{_libdir}/libelektra.so
216 %{_libdir}/libelektratools.so
217 %{_libdir}/pkgconfig/*
218 %doc examples doc/elektra-api/api-html
219 %{_mandir}/man3/*
220
221
222
223 #%files backend-gconf
224 #%defattr(-,root,root,-)
225 #%{_libdir}/elektra/*gconf.so*
226
227 %files backend-berkeleydb
228 %defattr(-,root,root,-)
229 /%{_lib}/elektra/*berkeleydb.so*
230
231
232
233 %changelog
234 * Thu Sep 07 2006 Avi Alkalay <avi@unix.sh> 0.6.4-1
235 - Version update
236 * Thu Jun 02 2006 Avi Alkalay <avi@unix.sh> 0.6.2-1
237 - Initial packaging
238