1 %define nspr_version 1:4.6
2 %define nss_version 1:3.11
3 %define svrcore_version 4.0.1
6 Summary: Mozilla LDAP C SDK
7 Summary(pl): Mozilla LDAP C SDK
9 Version: %{major}.%{minor}
13 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{major}.17/src/ldapcsdk-%{version}.tar.gz
14 # Source0-md5 453341111111111
15 URL: http://www.mozilla.org/directory/csdk.html
17 BuildRequires: nspr-devel >= %{nspr_version}
18 BuildRequires: nss-devel >= %{nss_version}
19 BuildRequires: pkgconfig
20 BuildRequires: svrcore-devel >= %{svrcore_version}
21 Requires: nspr >= %{nspr_version}
22 Requires: nss >= %{nss_version}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 The Mozilla LDAP C SDK is a set of libraries that allow applications
28 to communicate with LDAP directory servers. These libraries are
29 derived from the University of Michigan and Netscape LDAP libraries.
30 They use Mozilla NSPR and NSS for crypto.
33 Summary: Tools for the Mozilla LDAP C SDK
35 BuildRequires: nspr-devel >= %{nspr_version}
36 BuildRequires: nss-devel >= %{nss_version}
37 BuildRequires: svrcore-devel >= %{svrcore_version}
38 Requires: mozldap = %{version}-%{release}
39 Provides: mozldap-tools
42 The mozldap-tools package provides the ldapsearch, ldapmodify, and
43 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
46 Summary: Development libraries and examples for Mozilla LDAP C SDK
47 Group: Development/Libraries
48 BuildRequires: nspr-devel >= %{nspr_version}
49 BuildRequires: nss-devel >= %{nss_version}
50 Requires: mozldap = %{version}-%{release}
51 Provides: mozldap-devel
54 Header and Library files for doing development with the Mozilla LDAP C
61 %ifarch x86_64 ppc64 ia64 s390x
62 arg64="--enable-64bit"
67 --with-system-svrcore \
71 # Enable compiler optimizations and disable debugging code
75 # Generate symbolic info for debuggers
79 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
80 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
82 export PKG_CONFIG_ALLOW_SYSTEM_LIBS
83 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
85 %ifarch x86_64 ppc64 ia64 s390x
90 cd mozilla/directory/c-sdk
91 %{__make} BUILDCLU=1 HAVE_SVRCORE=1 BUILD_OPT=1
93 # Set up our package file
94 install -d $RPM_BUILD_ROOT%{_libdir}/pkgconfig
95 %{__cat} mozldap.pc.in | sed -e "s,%%libdir%%,%{_libdir},g" \
96 -e "s,%%prefix%%,%{_prefix},g" \
97 -e "s,%%exec_prefix%%,%{_prefix},g" \
98 -e "s,%%includedir%%,%{_includedir}/mozldap,g" \
99 -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
100 -e "s,%%NSS_VERSION%%,%{nss_version},g" \
101 -e "s,%%SVRCORE_VERSION%%,%{svrcore_version},g" \
102 -e "s,%%MOZLDAP_VERSION%%,%{version},g" > \
103 $RPM_BUILD_ROOT%{_libdir}/pkgconfig/mozldap.pc
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT%{_includedir}/mozldap
108 install -d $RPM_BUILD_ROOT%{_libdir}
109 install -d $RPM_BUILD_ROOT%{_libdir}/mozldap
111 # Copy the binary libraries we want
112 for file in libssldap50.so libprldap50.so libldap50.so; do
113 install mozilla/dist/lib/$file $RPM_BUILD_ROOT%{_libdir}
116 # Copy the binaries we want
117 for file in ldapsearch ldapmodify ldapdelete ldapcmp ldapcompare; do
118 install mozilla/dist/bin/$file $RPM_BUILD_ROOT%{_libdir}/mozldap
121 # Copy the include files
122 for file in mozilla/dist/public/ldap/*.h; do
123 install -m 644 $file $RPM_BUILD_ROOT%{_includedir}/mozldap
126 # Copy the developer files
127 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap
128 cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{_datadir}/mozldap
129 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
130 install mozilla/directory/c-sdk/ldap/examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
131 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
132 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
133 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
135 # Rename the libraries and create the symlinks
136 cd $RPM_BUILD_ROOT%{_libdir}
137 for file in libssldap50.so libprldap50.so libldap50.so; do
138 mv $file $file.%{major}.${minor}
139 ln -s $file.%{major}.%{minor} $file.%{major}
140 ln -s $file.%{major} $file
144 rm -rf $RPM_BUILD_ROOT
146 %post -p /sbin/ldconfig
147 %postun -p /sbin/ldconfig
150 %defattr(644,root,root,755)
151 %{_libdir}/libssldap50.so
152 %{_libdir}/libprldap50.so
153 %{_libdir}/libldap50.so
154 %attr(755,root,root) %{_libdir}/libssldap50.so.%{major}
155 %attr(755,root,root) %{_libdir}/libprldap50.so.%{major}
156 %attr(755,root,root) %{_libdir}/libldap50.so.%{major}
157 %attr(755,root,root) %{_libdir}/libssldap50.so.%{major}.%{minor}
158 %attr(755,root,root) %{_libdir}/libprldap50.so.%{major}.%{minor}
159 %attr(755,root,root) %{_libdir}/libldap50.so.%{major}.%{minor}
162 %defattr(644,root,root,755)
163 %{_libdir}/mozldap/ldapsearch
164 %{_libdir}/mozldap/ldapmodify
165 %{_libdir}/mozldap/ldapdelete
166 %{_libdir}/mozldap/ldapcmp
167 %{_libdir}/mozldap/ldapcompare
170 %defattr(644,root,root,755)
171 %{_pkgconfigdir}/mozldap.pc
172 %{_includedir}/mozldap