1 %define nspr_version 4.6
2 %define nspr_evr 1:%{nspr_version}
3 %define nss_version 3.11
4 %define nss_evr 1:%{nss_version}
5 %define svrcore_version 4.0.1
8 Summary: Mozilla LDAP C SDK
9 Summary(pl): Mozilla LDAP C SDK
11 Version: %{major}.%{minor}
15 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{major}.17/src/ldapcsdk-5.1.7.tar.gz
16 # Source0-md5: 66ddb43e984c0df67e21afb4dc6977b1
17 URL: http://www.mozilla.org/directory/csdk.html
19 BuildRequires: libstdc++-devel
20 BuildRequires: nspr-devel >= %{nspr_evr}
21 BuildRequires: nss-devel >= %{nss_evr}
22 BuildRequires: perl-base
23 BuildRequires: pkgconfig
24 #BuildRequires: svrcore-devel >= %{svrcore_version}
25 Requires: nspr >= %{nspr_evr}
26 Requires: nss >= %{nss_evr}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The Mozilla LDAP C SDK is a set of libraries that allow applications
31 to communicate with LDAP directory servers. These libraries are
32 derived from the University of Michigan and Netscape LDAP libraries.
33 They use Mozilla NSPR and NSS for crypto.
36 Summary: Tools for the Mozilla LDAP C SDK
38 Requires: mozldap = %{version}-%{release}
41 The mozldap-tools package provides the ldapsearch, ldapmodify, and
42 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
45 Summary: Development libraries and examples for Mozilla LDAP C SDK
46 Group: Development/Libraries
47 Requires: mozldap = %{version}-%{release}
50 Header and Library files for doing development with the Mozilla LDAP C
54 Summary: Static Mozilla LDAP C SDK libraries
55 Summary(pl): Statyczne biblioteki Mozilla LDAP C SDK
56 Group: Development/Libraries
57 Requires: mozldap-devel = %{version}-%{release}
60 Static Mozilla LDAP C SDK libraries.
62 %description static -l pl
63 Statyczne biblioteki Mozilla LDAP C SDK.
69 %ifarch x86_64 ppc64 ia64 s390x
70 arg64="--enable-64bit"
76 cd ../../security/svrcore
78 CFLAGS="%{rpmcflags} -I. -I/usr/include/nspr -I/usr/include/nss"
85 --with-nspr-inc=%{_includedir}/nspr \
86 --with-nspr-lib=%{_libdir} \
88 --with-nss-inc=%{_includedir}/nss \
89 --with-nss-lib=%{_libdir} \
91 --with-svrcore-inc=$PWD/../../security/svrcore \
95 %ifarch x86_64 ppc64 ia64 s390x
104 XCFLAGS="%{rpmcflags}"
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}/mozldap
110 install dist/lib/lib*ldap*.so $RPM_BUILD_ROOT%{_libdir}
111 install dist/bin/ldap* $RPM_BUILD_ROOT%{_libdir}/mozldap
112 install dist/public/ldap/*.h $RPM_BUILD_ROOT%{_includedir}/mozldap
113 install directory/c-sdk/ldap/libraries/lib*/lib*50.a $RPM_BUILD_ROOT%{_libdir}
115 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
116 cd directory/c-sdk/ldap
117 cp -r examples $RPM_BUILD_ROOT%{_datadir}/mozldap
118 install examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
119 install libraries/libldap/*.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
122 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
123 sed mozldap.pc.in -e "
124 s,%%libdir%%,%{_libdir},g
125 s,%%prefix%%,%{_prefix},g
126 s,%%exec_prefix%%,%{_prefix},g
127 s,%%includedir%%,%{_includedir}/mozldap,g
128 s,%%NSPR_VERSION%%,%{nspr_version},g
129 s,%%NSS_VERSION%%,%{nss_version},g
130 s,%%SVRCORE_VERSION%%,%{svrcore_version},g
131 s,%%MOZLDAP_VERSION%%,%{version},g
132 " > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozldap.pc
134 cd $RPM_BUILD_ROOT%{_libdir}
135 for file in libssldap50.so libprldap50.so libldap50.so; do
136 mv $file $file.%{major}.%{minor}
137 ln -s $file.%{major}.%{minor} $file.%{major}
138 ln -s $file.%{major} $file
142 rm -rf $RPM_BUILD_ROOT
144 %post -p /sbin/ldconfig
145 %postun -p /sbin/ldconfig
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/lib*.so.%{major}.%{minor}
150 %attr(755,root,root) %{_libdir}/lib*.so.%{major}
153 %defattr(644,root,root,755)
154 %attr(755,root,root) %{_libdir}/mozldap/ldap*
157 %defattr(644,root,root,755)
158 %{_pkgconfigdir}/mozldap.pc
159 %{_includedir}/mozldap
164 %defattr(644,root,root,755)