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