]> git.pld-linux.org Git - packages/ldb.git/blob - ldb.spec
- new, based on fedora spec
[packages/ldb.git] / ldb.spec
1 %define         talloc_version  2.0.5
2 %define         tdb_version             1.2.9
3 %define         tevent_version  0.9.12
4 Summary:        A schema-less, ldap like, API and database
5 Name:           libldb
6 Version:        1.1.0
7 Release:        1
8 License:        LGPL v3+
9 Group:          Development/Libraries
10 URL:            http://ldb.samba.org/
11 Source0:        http://samba.org/ftp/ldb/ldb-%{version}.tar.gz
12 # Source0-md5:  61145ad9cfe017ce4fca5cbc77b9552b
13 BuildRequires:  autoconf
14 BuildRequires:  docbook-style-xsl
15 BuildRequires:  libtalloc-devel >= %{talloc_version}
16 BuildRequires:  libxslt
17 BuildRequires:  popt-devel
18 BuildRequires:  python-devel
19 BuildRequires:  python-talloc-devel
20 BuildRequires:  python-tdb
21 BuildRequires:  tdb-devel >= %{tdb_version}
22 BuildRequires:  tevent-devel >= %{tevent_version}
23 Requires:       libtalloc >= %{talloc_version}
24 Requires:       tdb >= %{tdb_version}
25 Requires:       tevent >= %{tevent_version}
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 An extensible library that implements an LDAP like API to access
30 remote LDAP servers, or use local tdb databases.
31
32 %package -n ldb-tools
33 Summary:        Tools to manage LDB files
34 Group:          Development/Libraries
35 Requires:       %{name} = %{version}-%{release}
36
37 %description -n ldb-tools
38 Tools to manage LDB files.
39
40 %package devel
41 Summary:        Developer tools for the LDB library
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44 Requires:       libtalloc-devel >= %{talloc_version}
45 Requires:       pkgconfig
46 Requires:       tdb-devel >= %{tdb_version}
47 Requires:       tevent-devel >= %{tevent_version}
48
49 %description devel
50 Header files needed to develop programs that link against the LDB
51 library.
52
53 %package -n python-ldb
54 Summary:        Python bindings for the LDB library
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       python-tdb = %{tdb_version}
58 Obsoletes:      pyldb
59
60 %description -n python-ldb
61 Python bindings for the LDB library.
62
63 %package -n python-ldb-devel
64 Summary:        Development files for the Python bindings for the LDB library
65 Group:          Development/Libraries
66 Requires:       pyldb = %{version}-%{release}
67
68 %description -n python-ldb-devel
69 Development files for the Python bindings for the LDB library
70
71 %prep
72 %setup -q -n ldb-%{version}
73
74 %build
75 # note: configure in fact is waf call
76 CC="%{__cc}" \
77 CFLAGS="%{rpmcflags}" \
78 PYTHONDIR=%{py_sitedir} \
79 ./configure \
80         --prefix=%{_prefix} \
81         --libdir=%{_libdir} \
82         --with-modulesdir=%{_libdir}/ldb/modules \
83         --with-privatelibdir=%{_libdir}/ldb \
84         --bundled-libraries=NONE \
85         --disable-rpath \
86         --disable-rpath-install
87
88 %{__make} \
89         V=1
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 %{__make} install \
94         DESTDIR=$RPM_BUILD_ROOT
95
96 # Remove _tevent.so (it's managed by python-tevent)
97 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_tevent.so
98
99 # Shared libraries need to be marked executable for
100 # rpmbuild to strip them and include them in debuginfo
101 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \;
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %post   -p /sbin/ldconfig
107 %postun -p /sbin/ldconfig
108
109 %post   -n python-ldb -p /sbin/ldconfig
110 %postun -n python-ldb -p /sbin/ldconfig
111
112 %files
113 %defattr(644,root,root,755)
114 %dir %{_libdir}/ldb
115 %{_libdir}/libldb.so.*
116 %dir %{_libdir}/ldb/modules
117 %dir %{_libdir}/ldb/modules/ldb
118 %{_libdir}/ldb/modules/ldb/*.so
119
120 %files -n ldb-tools
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_bindir}/ldbadd
123 %attr(755,root,root) %{_bindir}/ldbdel
124 %attr(755,root,root) %{_bindir}/ldbedit
125 %attr(755,root,root) %{_bindir}/ldbmodify
126 %attr(755,root,root) %{_bindir}/ldbrename
127 %attr(755,root,root) %{_bindir}/ldbsearch
128 %{_libdir}/ldb/libldb-cmdline.so
129 %{_mandir}/man1/ldbadd.1.*
130 %{_mandir}/man1/ldbdel.1.*
131 %{_mandir}/man1/ldbedit.1.*
132 %{_mandir}/man1/ldbmodify.1.*
133 %{_mandir}/man1/ldbrename.1.*
134 %{_mandir}/man1/ldbsearch.1.*
135
136 %files devel
137 %defattr(644,root,root,755)
138 %{_includedir}/ldb_module.h
139 %{_includedir}/ldb_handlers.h
140 %{_includedir}/ldb_errors.h
141 %{_includedir}/ldb_version.h
142 %{_includedir}/ldb.h
143 %{_libdir}/libldb.so
144
145 %{_pkgconfigdir}/ldb.pc
146 %{_mandir}/man3/ldb.3*
147
148 %files -n python-ldb
149 %defattr(644,root,root,755)
150 %{py_sitedir}/ldb.so
151 %{_libdir}/libpyldb-util.so.1*
152
153 %files -n python-ldb-devel
154 %defattr(644,root,root,755)
155 %{_includedir}/pyldb.h
156 %{_libdir}/libpyldb-util.so
157 %{_pkgconfigdir}/pyldb-util.pc
This page took 0.393717 seconds and 4 git commands to generate.