4 %define nspr_version 4.6
5 %define nss_version 3.11
6 %define svrcore_version 4.0.1
9 Summary: Mozilla LDAP C SDK
10 Summary(pl): Mozilla LDAP C SDK
12 Version: %{major}.%{minor}
17 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{major}.17/src/ldapcsdk-%{version}.tar.gz
18 # Source0-md5 453341111111111
19 URL: http://www.mozilla.org/directory/csdk.html
20 Requires: nspr >= %{nspr_version}
21 Requires: nss >= %{nss_version}
22 BuildRequires: nspr-devel >= %{nspr_version}
23 BuildRequires: nss-devel >= %{nss_version}
24 BuildRequires: svrcore-devel >= %{svrcore_version}
25 BuildRequires: pkgconfig
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 The Mozilla LDAP C SDK is a set of libraries that allow applications
32 to communicate with LDAP directory servers. These libraries are
33 derived from the University of Michigan and Netscape LDAP libraries.
34 They use Mozilla NSPR and NSS for crypto.
40 Summary: Tools for the Mozilla LDAP C SDK
43 Requires: mozldap = %{version}-%{release}
44 BuildRequires: nspr-devel >= %{nspr_version}
45 BuildRequires: nss-devel >= %{nss_version}
46 BuildRequires: svrcore-devel >= %{svrcore_version}
47 Provides: mozldap-tools
50 The mozldap-tools package provides the ldapsearch, ldapmodify, and
51 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
53 %description tools -l pl
57 Summary: Development libraries and examples for Mozilla LDAP C SDK
58 Group: Development/Libraries
59 Requires: mozldap = %{version}-%{release}
60 BuildRequires: nspr-devel >= %{nspr_version}
61 BuildRequires: nss-devel >= %{nss_version}
62 Provides: mozldap-devel
65 Header and Library files for doing development with the Mozilla LDAP C
68 %description devel -l pl
75 #cd mozilla/directory/c-sdk
79 %ifarch x86_64 ppc64 ia64 s390x
80 arg64="--enable-64bit"
85 --with-system-svrcore \
89 # Enable compiler optimizations and disable debugging code
93 # Generate symbolic info for debuggers
97 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
98 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
100 export PKG_CONFIG_ALLOW_SYSTEM_LIBS
101 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
103 %ifarch x86_64 ppc64 ia64 s390x
108 cd mozilla/directory/c-sdk
109 %{__make} BUILDCLU=1 HAVE_SVRCORE=1 BUILD_OPT=1
111 # Set up our package file
112 %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
113 %{__cat} mozldap.pc.in | sed -e "s,%%libdir%%,%{_libdir},g" \
114 -e "s,%%prefix%%,%{_prefix},g" \
115 -e "s,%%exec_prefix%%,%{_prefix},g" \
116 -e "s,%%includedir%%,%{_includedir}/mozldap,g" \
117 -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
118 -e "s,%%NSS_VERSION%%,%{nss_version},g" \
119 -e "s,%%SVRCORE_VERSION%%,%{svrcore_version},g" \
120 -e "s,%%MOZLDAP_VERSION%%,%{version},g" > \
121 $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/mozldap.pc
124 # There is no make install target so we'll do it ourselves.
126 rm -rf $RPM_BUILD_ROOT
127 %{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/mozldap
128 %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}
129 %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/mozldap
131 # Copy the binary libraries we want
132 for file in libssldap50.so libprldap50.so libldap50.so
134 %{__install} -m 755 mozilla/dist/lib/$file $RPM_BUILD_ROOT/%{_libdir}
137 # Copy the binaries we want
138 for file in ldapsearch ldapmodify ldapdelete ldapcmp ldapcompare
140 %{__install} -m 755 mozilla/dist/bin/$file $RPM_BUILD_ROOT/%{_libdir}/mozldap
143 # Copy the include files
144 for file in mozilla/dist/public/ldap/*.h
146 %{__install} -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/mozldap
149 # Copy the developer files
150 %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mozldap
151 cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{_datadir}/mozldap
152 %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
153 %{__install} -m 644 mozilla/directory/c-sdk/ldap/examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
154 %{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
155 %{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
156 %{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
158 # Rename the libraries and create the symlinks
159 cd $RPM_BUILD_ROOT/%{_libdir}
160 for file in libssldap50.so libprldap50.so libldap50.so
162 mv $file $file.${major}.${minor}
163 ln -s $file.${major}.%{minor} $file.${major}
164 ln -s $file.${major} $file
168 %{__rm} -rf $RPM_BUILD_ROOT
171 /sbin/ldconfig >/dev/null 2>/dev/null
174 /sbin/ldconfig >/dev/null 2>/dev/null
177 %defattr(644,root,root,755)
178 %{_libdir}/libssldap50.so
179 %{_libdir}/libprldap50.so
180 %{_libdir}/libldap50.so
181 %{_libdir}/libssldap50.so.%{major}
182 %{_libdir}/libprldap50.so.%{major}
183 %{_libdir}/libldap50.so.%{major}
184 %{_libdir}/libssldap50.so.%{major}.%{minor}
185 %{_libdir}/libprldap50.so.%{major}.%{minor}
186 %{_libdir}/libldap50.so.%{major}.%{minor}
189 %defattr(644,root,root,755)
190 %{_libdir}/mozldap/ldapsearch
191 %{_libdir}/mozldap/ldapmodify
192 %{_libdir}/mozldap/ldapdelete
193 %{_libdir}/mozldap/ldapcmp
194 %{_libdir}/mozldap/ldapcompare
197 %defattr(644,root,root,755)
198 %{_libdir}/pkgconfig/mozldap.pc
199 %{_includedir}/mozldap