]> git.pld-linux.org Git - packages/mozldap.git/blob - mozldap.spec
dc90da0cc0c1fbbe0915c59957c92c1e8a0b17f2
[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 %define mozldap_version 5.17
7 Summary:        Mozilla LDAP C SDK
8 Summary(pl):    Biblioteki Mozilla LDAP C SDK
9 Name:           mozldap
10 Version:        5.17
11 Release:        2
12 License:        MPL v1.1 or GPL v2+ or LGPL v2.1+
13 Group:          Libraries
14 Source0:        ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{version}/src/ldapcsdk-5.1.7.tar.gz
15 # Source0-md5:  66ddb43e984c0df67e21afb4dc6977b1
16 URL:            http://www.mozilla.org/directory/csdk.html
17 BuildRequires:  gawk
18 BuildRequires:  libstdc++-devel
19 BuildRequires:  nspr-devel >= %{nspr_evr}
20 BuildRequires:  nss-devel >= %{nss_evr}
21 BuildRequires:  perl-base
22 BuildRequires:  pkgconfig
23 BuildRequires:  svrcore-devel >= %{svrcore_version}
24 Requires:       nspr >= %{nspr_evr}
25 Requires:       nss >= %{nss_evr}
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _noautoreqdep   libldap50.so libprldap50.so libssldap50.so
29
30 %description
31 The Mozilla LDAP C SDK is a set of libraries that allow applications
32 to communicate with LDAP directory servers. These libraries are
33 derived from the University of Michigan and Netscape LDAP libraries.
34 They use Mozilla NSPR and NSS for crypto.
35
36 %description -l pl
37 Mozilla LDAP C SDK to zestaw bibliotek pozwalaj±cych aplikacjom
38 komunikowaæ siê z serwerami us³ug katalogowych LDAP. Biblioteki te
39 wywodz± siê z bibliotek LDAP University of Michigan i Netscape.
40 Wykorzystuj± biblioteki Mozilla NSPR i NSS do kryptografii.
41
42 %package devel
43 Summary:        Development files and examples for Mozilla LDAP C SDK
44 Summary(pl):    Pliki programistyczne i przyk³ady dla bibliotek Mozilla LDAP C SDK
45 Group:          Development/Libraries
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       nspr-devel >= %{nspr_evr}
48 Requires:       nss-devel >= %{nss_evr}
49
50 %description devel
51 Header and other files for doing development with the Mozilla LDAP C
52 SDK.
53
54 %description devel -l pl
55 Pliki nag³ówkowe i inne do tworzenia oprogramowania z u¿yciem
56 bibliotek Mozilla LDAP C SDK
57
58 %package static
59 Summary:        Static Mozilla LDAP C SDK libraries
60 Summary(pl):    Statyczne biblioteki Mozilla LDAP C SDK
61 Group:          Development/Libraries
62 Requires:       %{name}-devel = %{version}-%{release}
63
64 %description static
65 Static Mozilla LDAP C SDK libraries.
66
67 %description static -l pl
68 Statyczne biblioteki Mozilla LDAP C SDK.
69
70 %package tools
71 Summary:        Tools for the Mozilla LDAP C SDK
72 Summary(pl):    Narzêdzia dla bibliotek Mozilla LDAP C SDK
73 Group:          Applications/System
74 Requires:       %{name} = %{version}-%{release}
75
76 %description tools
77 The mozldap-tools package provides the ldapsearch, ldapmodify, and
78 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
79
80 %description tools -l pl
81 Ten pakiet dostarcza narzêdzia ldapsearch, ldapmodify i ldapdelete
82 wykorzystuj±ce biblioteki Mozilla LDAP C SDK.
83
84 %prep
85 %setup -q -n mozilla
86
87 %build
88 cd directory/c-sdk
89 %configure \
90 %ifarch %{x8664} ia64 ppc64 s390x
91         --enable-64bit \
92 %endif
93         --disable-debug \
94         --enable-optimize \
95         --with-nspr \
96         --with-nspr-inc=%{_includedir}/nspr \
97         --with-nspr-lib=%{_libdir} \
98         --with-nss \
99         --with-nss-inc=%{_includedir}/nss \
100         --with-nss-lib=%{_libdir} \
101         --with-svrcore \
102         --with-svrcore-inc=%{_includedir}/svrcore
103
104 %ifarch %{x8664} ppc64 ia64 s390x
105 USE_64=1
106 export USE_64
107 %endif
108
109 %{__make} \
110         BUILDCLU=1 \
111         HAVE_SVRCORE=1 \
112         BUILD_OPT=1 \
113         XCFLAGS="%{rpmcflags}"
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}/mozldap
118
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*50.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 libssldap50.so libprldap50.so libldap50.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}/libldap50.so.*.*
157 %attr(755,root,root) %{_libdir}/libprldap50.so.*.*
158 %attr(755,root,root) %{_libdir}/libssldap50.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}/libiutil50.a
169 %{_libdir}/liblber50.a
170 %{_libdir}/libldap50.a
171 %{_libdir}/libldif50.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.066999 seconds and 2 git commands to generate.