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