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 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT%{_includedir}/mozldap
95 install -d $RPM_BUILD_ROOT%{_libdir}
96 install -d $RPM_BUILD_ROOT%{_libdir}/mozldap
98 # Copy the binary libraries we want
99 for file in libssldap50.so libprldap50.so libldap50.so; do
100 install mozilla/dist/lib/$file $RPM_BUILD_ROOT%{_libdir}
103 # Copy the binaries we want
104 for file in ldapsearch ldapmodify ldapdelete ldapcmp ldapcompare; do
105 install mozilla/dist/bin/$file $RPM_BUILD_ROOT%{_libdir}/mozldap
108 # Copy the include files
109 for file in mozilla/dist/public/ldap/*.h; do
110 install -m 644 $file $RPM_BUILD_ROOT%{_includedir}/mozldap
113 # Copy the developer files
114 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap
115 cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{_datadir}/mozldap
116 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
117 install mozilla/directory/c-sdk/ldap/examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
118 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
119 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
120 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
122 # Rename the libraries and create the symlinks
123 cd $RPM_BUILD_ROOT%{_libdir}
124 for file in libssldap50.so libprldap50.so libldap50.so; do
125 mv $file $file.%{major}.${minor}
126 ln -s $file.%{major}.%{minor} $file.%{major}
127 ln -s $file.%{major} $file
130 # Set up our package file
131 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
132 sed mozldap.pc.in -e "
133 s,%%libdir%%,%{_libdir},g
134 s,%%prefix%%,%{_prefix},g
135 s,%%exec_prefix%%,%{_prefix},g
136 s,%%includedir%%,%{_includedir}/mozldap,g
137 s,%%NSPR_VERSION%%,%{nspr_version},g
138 s,%%NSS_VERSION%%,%{nss_version},g
139 s,%%SVRCORE_VERSION%%,%{svrcore_version},g
140 s,%%MOZLDAP_VERSION%%,%{version},g
141 " > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozldap.pc
145 rm -rf $RPM_BUILD_ROOT
147 %post -p /sbin/ldconfig
148 %postun -p /sbin/ldconfig
151 %defattr(644,root,root,755)
152 %{_libdir}/libssldap50.so
153 %{_libdir}/libprldap50.so
154 %{_libdir}/libldap50.so
155 %attr(755,root,root) %{_libdir}/libssldap50.so.%{major}
156 %attr(755,root,root) %{_libdir}/libprldap50.so.%{major}
157 %attr(755,root,root) %{_libdir}/libldap50.so.%{major}
158 %attr(755,root,root) %{_libdir}/libssldap50.so.%{major}.%{minor}
159 %attr(755,root,root) %{_libdir}/libprldap50.so.%{major}.%{minor}
160 %attr(755,root,root) %{_libdir}/libldap50.so.%{major}.%{minor}
163 %defattr(644,root,root,755)
164 %{_libdir}/mozldap/ldapsearch
165 %{_libdir}/mozldap/ldapmodify
166 %{_libdir}/mozldap/ldapdelete
167 %{_libdir}/mozldap/ldapcmp
168 %{_libdir}/mozldap/ldapcompare
171 %defattr(644,root,root,755)
172 %{_pkgconfigdir}/mozldap.pc
173 %{_includedir}/mozldap