]> git.pld-linux.org Git - packages/mozldap.git/blob - mozldap.spec
bdd2b1c21df0b41a65409c7c1c5f4d7d4efcab67
[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.2
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/mozldap-%{version}.tar.gz
14 # Source0-md5:  60d1d6fa115efe3e54974243c1958b99
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.UTF-8
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.UTF-8):   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.UTF-8
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.UTF-8):   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.UTF-8
70 Statyczne biblioteki Mozilla LDAP C SDK.
71
72 %package tools
73 Summary:        Tools for the Mozilla LDAP C SDK
74 Summary(pl.UTF-8):   Narzędzia dla bibliotek Mozilla LDAP C SDK
75 Group:          Applications/System
76 Requires:       %{name} = %{version}-%{release}
77 Requires:       svrcore >= %{svrcore_version}
78
79 %description tools
80 The mozldap-tools package provides the ldapsearch, ldapmodify, and
81 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
82
83 %description tools -l pl.UTF-8
84 Ten pakiet dostarcza narzędzia ldapsearch, ldapmodify i ldapdelete
85 wykorzystujące biblioteki Mozilla LDAP C SDK.
86
87 %prep
88 %setup -q
89 %patch0 -p1
90
91 %build
92 cd mozilla/directory/c-sdk
93 %{__autoconf}
94 %configure \
95 %ifarch %{x8664} ia64 ppc64 s390x
96         --enable-64bit \
97 %endif
98         --disable-debug \
99         --enable-clu \
100         --enable-optimize \
101         --with-sasl \
102         --with-system-nspr \
103         --with-system-nss \
104         --with-system-svrcore
105
106 %ifarch %{x8664} ppc64 ia64 s390x
107 USE_64=1
108 export USE_64
109 %endif
110
111 %{__make} \
112         XCFLAGS="%{rpmcflags}"
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}/mozldap
117
118 cd mozilla
119 install dist/lib/lib*ldap*.so $RPM_BUILD_ROOT%{_libdir}
120 install dist/bin/ldap* $RPM_BUILD_ROOT%{_libdir}/mozldap
121 install dist/public/ldap/*.h $RPM_BUILD_ROOT%{_includedir}/mozldap
122 install directory/c-sdk/ldap/libraries/lib*/lib*60.a $RPM_BUILD_ROOT%{_libdir}
123
124 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
125 cd directory/c-sdk/ldap
126 cp -r examples $RPM_BUILD_ROOT%{_datadir}/mozldap
127 install examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
128 install libraries/libldap/*.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
129 cd -
130
131 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
132 sed directory/c-sdk/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,%%MOZLDAP_VERSION%%,%{version},g
140 " > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozldap.pc
141
142 cd $RPM_BUILD_ROOT%{_libdir}
143 for file in libssldap60.so libprldap60.so libldap60.so; do
144         mv $file $file.%{version}
145         ln -s $file.%{version} $file
146 done
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post   -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
153
154 %files
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_libdir}/libldap60.so.*.*
157 %attr(755,root,root) %{_libdir}/libprldap60.so.*.*
158 %attr(755,root,root) %{_libdir}/libssldap60.so.*.*
159
160 %files devel
161 %defattr(644,root,root,755)
162 %{_includedir}/mozldap
163 %{_pkgconfigdir}/mozldap.pc
164 %{_datadir}/mozldap
165
166 %files static
167 %defattr(644,root,root,755)
168 %{_libdir}/libiutil60.a
169 %{_libdir}/liblber60.a
170 %{_libdir}/libldap60.a
171 %{_libdir}/libldif60.a
172
173 %files tools
174 %defattr(644,root,root,755)
175 %dir %{_libdir}/mozldap
176 %attr(755,root,root) %{_libdir}/mozldap/ldap*
This page took 0.075113 seconds and 2 git commands to generate.