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