]> git.pld-linux.org Git - packages/mozldap.git/blob - mozldap.spec
- use x8664 macro, missing dir
[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.1
6 %define major           5
7 %define minor           17
8 Summary:        Mozilla LDAP C SDK
9 Summary(pl):    Mozilla LDAP C SDK
10 Name:           mozldap
11 Version:        %{major}.%{minor}
12 Release:        0.2
13 License:        MPL/GPL/LGPL
14 Group:          System
15 Source0:        ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{major}.17/src/ldapcsdk-5.1.7.tar.gz
16 # Source0-md5:  66ddb43e984c0df67e21afb4dc6977b1
17 URL:            http://www.mozilla.org/directory/csdk.html
18 BuildRequires:  gawk
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  nspr-devel >= %{nspr_evr}
21 BuildRequires:  nss-devel >= %{nss_evr}
22 BuildRequires:  perl-base
23 BuildRequires:  pkgconfig
24 #BuildRequires: svrcore-devel >= %{svrcore_version}
25 Requires:       nspr >= %{nspr_evr}
26 Requires:       nss >= %{nss_evr}
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 The Mozilla LDAP C SDK is a set of libraries that allow applications
31 to communicate with LDAP directory servers. These libraries are
32 derived from the University of Michigan and Netscape LDAP libraries.
33 They use Mozilla NSPR and NSS for crypto.
34
35 %package tools
36 Summary:        Tools for the Mozilla LDAP C SDK
37 Group:          System
38 Requires:       mozldap = %{version}-%{release}
39
40 %description tools
41 The mozldap-tools package provides the ldapsearch, ldapmodify, and
42 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
43
44 %package devel
45 Summary:        Development libraries and examples for Mozilla LDAP C SDK
46 Group:          Development/Libraries
47 Requires:       mozldap = %{version}-%{release}
48
49 %description devel
50 Header and Library files for doing development with the Mozilla LDAP C
51 SDK.
52
53 %package static
54 Summary:        Static Mozilla LDAP C SDK libraries
55 Summary(pl):    Statyczne biblioteki Mozilla LDAP C SDK
56 Group:          Development/Libraries
57 Requires:       mozldap-devel = %{version}-%{release}
58
59 %description static
60 Static Mozilla LDAP C SDK libraries.
61
62 %description static -l pl
63 Statyczne biblioteki Mozilla LDAP C SDK.
64
65 %prep
66 %setup -q -n mozilla
67
68 %build
69 %ifarch %{x8664} ia64 ppc64 s390x
70 arg64="--enable-64bit"
71 %endif
72
73 # build local svrcore
74 %{__make} -C security/coreconf
75 %{__make} -C security/svrcore \
76         CFLAGS="%{rpmcflags} -I. -I/usr/include/nspr -I/usr/include/nss"
77 # end svrcore
78
79 cd directory/c-sdk
80 %configure $arg64 \
81         --with-nspr \
82         --with-nspr-inc=%{_includedir}/nspr \
83         --with-nspr-lib=%{_libdir} \
84         --with-nss \
85         --with-nss-inc=%{_includedir}/nss \
86         --with-nss-lib=%{_libdir} \
87         --with-svrcore \
88         --with-svrcore-inc=$PWD/../../security/svrcore \
89         --enable-optimize \
90         --disable-debug
91
92 %ifarch %{x8664} ppc64 ia64 s390x
93 USE_64=1
94 export USE_64
95 %endif
96
97 %{__make} \
98         BUILDCLU=1 \
99         HAVE_SVRCORE=1 \
100         BUILD_OPT=1 \
101         XCFLAGS="%{rpmcflags}"
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}/mozldap
106
107 install dist/lib/lib*ldap*.so $RPM_BUILD_ROOT%{_libdir}
108 install dist/bin/ldap* $RPM_BUILD_ROOT%{_libdir}/mozldap
109 install dist/public/ldap/*.h $RPM_BUILD_ROOT%{_includedir}/mozldap
110 install directory/c-sdk/ldap/libraries/lib*/lib*50.a $RPM_BUILD_ROOT%{_libdir}
111
112 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
113 cd directory/c-sdk/ldap
114 cp -r examples $RPM_BUILD_ROOT%{_datadir}/mozldap
115 install examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
116 install libraries/libldap/*.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
117 cd ..
118
119 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
120 sed mozldap.pc.in -e "
121         s,%%libdir%%,%{_libdir},g
122         s,%%prefix%%,%{_prefix},g
123         s,%%exec_prefix%%,%{_prefix},g
124         s,%%includedir%%,%{_includedir}/mozldap,g
125         s,%%NSPR_VERSION%%,%{nspr_version},g
126         s,%%NSS_VERSION%%,%{nss_version},g
127         s,%%SVRCORE_VERSION%%,%{svrcore_version},g
128         s,%%MOZLDAP_VERSION%%,%{version},g
129 " > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozldap.pc
130
131 cd $RPM_BUILD_ROOT%{_libdir}
132 for file in libssldap50.so libprldap50.so libldap50.so; do
133         mv $file $file.%{major}.%{minor}
134         ln -s $file.%{major}.%{minor} $file.%{major}
135         ln -s $file.%{major} $file
136 done
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %post   -p /sbin/ldconfig
142 %postun -p /sbin/ldconfig
143
144 %files
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_libdir}/lib*.so.%{major}.%{minor}
147 %attr(755,root,root) %{_libdir}/lib*.so.%{major}
148
149 %files tools
150 %defattr(644,root,root,755)
151 %dir %{_libdir}/mozldap
152 %attr(755,root,root) %{_libdir}/mozldap/ldap*
153
154 %files devel
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_libdir}/lib*.so
157 %{_includedir}/mozldap
158 %{_pkgconfigdir}/mozldap.pc
159 %{_datadir}/mozldap
160
161 %files static
162 %defattr(644,root,root,755)
163 %{_libdir}/lib*.a
This page took 0.070106 seconds and 4 git commands to generate.