]> git.pld-linux.org Git - packages/mozldap.git/blob - mozldap.spec
f092cccad5058ddebe75d51652239984b394ed23
[packages/mozldap.git] / mozldap.spec
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.3
6 Summary:        Mozilla LDAP C SDK
7 Summary(pl.UTF-8):      Biblioteki Mozilla LDAP C SDK
8 Name:           mozldap
9 Version:        6.0.7
10 Release:        3
11 License:        MPL v1.1 or GPL v2+ or LGPL v2.1+
12 Group:          Libraries
13 Source0:        http://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{version}/src/%{name}-%{version}.tar.gz
14 # Source0-md5:  6e1b8ace4931a6839fe4cb027d23b5ac
15 Patch0:         %{name}-link.patch
16 Patch1:         %{name}-ac.patch
17 URL:            http://wiki.mozilla.org/LDAP_C_SDK
18 BuildRequires:  autoconf >= 2.13
19 BuildRequires:  cyrus-sasl-devel >= 2.0
20 BuildRequires:  gawk
21 BuildRequires:  libstdc++-devel
22 BuildRequires:  nspr-devel >= %{nspr_evr}
23 BuildRequires:  nss-devel >= %{nss_evr}
24 BuildRequires:  perl-base
25 BuildRequires:  pkgconfig
26 BuildRequires:  svrcore-devel >= %{svrcore_version}
27 Requires:       nspr >= %{nspr_evr}
28 Requires:       nss >= %{nss_evr}
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _noautoreqdep   libldap60.so libprldap60.so libssldap60.so libldif60.so
32
33 %description
34 The Mozilla LDAP C SDK is a set of libraries that allow applications
35 to communicate with LDAP directory servers. These libraries are
36 derived from the University of Michigan and Netscape LDAP libraries.
37 They use Mozilla NSPR and NSS for crypto.
38
39 %description -l pl.UTF-8
40 Mozilla LDAP C SDK to zestaw bibliotek pozwalających aplikacjom
41 komunikować się z serwerami usług katalogowych LDAP. Biblioteki te
42 wywodzą się z bibliotek LDAP University of Michigan i Netscape.
43 Wykorzystują biblioteki Mozilla NSPR i NSS do kryptografii.
44
45 %package devel
46 Summary:        Development files and examples for Mozilla LDAP C SDK
47 Summary(pl.UTF-8):      Pliki programistyczne i przykłady dla bibliotek Mozilla LDAP C SDK
48 Group:          Development/Libraries
49 Requires:       %{name} = %{version}-%{release}
50 Requires:       nspr-devel >= %{nspr_evr}
51 Requires:       nss-devel >= %{nss_evr}
52
53 %description devel
54 Header and other files for doing development with the Mozilla LDAP C
55 SDK.
56
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe i inne do tworzenia oprogramowania z użyciem
59 bibliotek Mozilla LDAP C SDK
60
61 %package static
62 Summary:        Static Mozilla LDAP C SDK libraries
63 Summary(pl.UTF-8):      Statyczne biblioteki Mozilla LDAP C SDK
64 Group:          Development/Libraries
65 Requires:       %{name}-devel = %{version}-%{release}
66
67 %description static
68 Static Mozilla LDAP C SDK libraries.
69
70 %description static -l pl.UTF-8
71 Statyczne biblioteki Mozilla LDAP C SDK.
72
73 %package tools
74 Summary:        Tools for the Mozilla LDAP C SDK
75 Summary(pl.UTF-8):      Narzędzia dla bibliotek Mozilla LDAP C SDK
76 Group:          Applications/System
77 Requires:       %{name} = %{version}-%{release}
78 Requires:       svrcore >= %{svrcore_version}
79
80 %description tools
81 The mozldap-tools package provides the ldapsearch, ldapmodify, and
82 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
83
84 %description tools -l pl.UTF-8
85 Ten pakiet dostarcza narzędzia ldapsearch, ldapmodify i ldapdelete
86 wykorzystujące biblioteki Mozilla LDAP C SDK.
87
88 %prep
89 %setup -q
90 %patch0 -p3
91 %patch1 -p3
92
93 %build
94 DISTDIR=$(pwd)/dist
95 cd c-sdk
96 %{__autoconf}
97 %configure \
98 %ifarch %{x8664} ia64 ppc64 s390x
99         --enable-64bit \
100 %endif
101         --disable-debug \
102         --enable-clu \
103         --enable-optimize \
104         --with-dist-prefix=$DISTDIR \
105         --with-sasl \
106         --with-system-nspr \
107         --with-system-nss \
108         --with-system-svrcore
109
110 %ifarch %{x8664} ppc64 ia64 s390x
111 USE_64=1
112 export USE_64
113 %endif
114
115 %{__make} \
116         XCFLAGS="%{rpmcflags}"
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT{{%{_includedir},%{_libdir}}/mozldap,%{_bindir},%{_sysconfdir}/%{name}}
121
122 install dist/lib/lib*.so $RPM_BUILD_ROOT%{_libdir}
123 install dist/lib/lib*.a $RPM_BUILD_ROOT%{_libdir}
124 install dist/public/ldap/*.h $RPM_BUILD_ROOT%{_includedir}/mozldap
125 install dist/bin/ldap* $RPM_BUILD_ROOT%{_bindir}
126 # what really uses these and proper install dir?
127 install dist/etc/* $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
128
129 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
130 cp -a c-sdk/ldap/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
131
132 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
133 sed c-sdk/mozldap.pc.in -e "
134         s,%%prefix%%,%{_prefix},g
135         s,%%exec_prefix%%,%{_prefix},g
136         s,%%libdir%%,%{_libdir},g
137         s,%%includedir%%,%{_includedir}/mozldap,g
138         s,%%bindir%%,%{_bindir},g
139         s,%%major%%,6,g
140         s,%%minor%%,0,g
141         s,%%submin%%,7,g
142         s,%%libsuffix%%,60,g
143         s,%%NSPR_VERSION%%,%{nspr_version},g
144         s,%%NSS_VERSION%%,%{nss_version},g
145         s,%%MOZLDAP_VERSION%%,%{version},g
146 " > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozldap.pc
147
148 cd $RPM_BUILD_ROOT%{_libdir}
149 for file in lib*.so; do
150         mv $file $file.%{version}
151         ln -s $file.%{version} $file
152 done
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %post   -p /sbin/ldconfig
158 %postun -p /sbin/ldconfig
159
160 %files
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_libdir}/libldap60.so.*.*
163 %attr(755,root,root) %ghost %{_libdir}/libldap60.so
164 %attr(755,root,root) %{_libdir}/libprldap60.so.*.*
165 %attr(755,root,root) %ghost %{_libdir}/libprldap60.so
166 %attr(755,root,root) %{_libdir}/libssldap60.so.*.*
167 %attr(755,root,root) %ghost %{_libdir}/libssldap60.so
168 %attr(755,root,root) %{_libdir}/libldif60.so.*.*
169 %attr(755,root,root) %ghost %{_libdir}/libldif60.so
170
171 %files devel
172 %defattr(644,root,root,755)
173 %{_includedir}/mozldap
174 %{_pkgconfigdir}/mozldap.pc
175 %{_examplesdir}/%{name}-%{version}
176
177 %files static
178 %defattr(644,root,root,755)
179 %{_libdir}/libiutil60.a
180 %{_libdir}/liblber60.a
181 %{_libdir}/libldap60.a
182 %{_libdir}/libldif60.a
183
184 %files tools
185 %defattr(644,root,root,755)
186 %dir %{_sysconfdir}/%{name}
187 %{_sysconfdir}/%{name}/ldapfilter.conf
188 %{_sysconfdir}/%{name}/ldapfriendly
189 %{_sysconfdir}/%{name}/ldapsearchprefs.conf
190 %{_sysconfdir}/%{name}/ldaptemplates.conf
191 # NOTE: these probably collide with openldap
192 %attr(755,root,root) %{_bindir}/ldapcmp
193 %attr(755,root,root) %{_bindir}/ldapcompare
194 %attr(755,root,root) %{_bindir}/ldapdelete
195 %attr(755,root,root) %{_bindir}/ldapmodify
196 %attr(755,root,root) %{_bindir}/ldappasswd
197 %attr(755,root,root) %{_bindir}/ldapsearch
This page took 0.073729 seconds and 2 git commands to generate.