]> git.pld-linux.org Git - packages/mozldap.git/blob - mozldap.spec
- mozldap.pc.in moved to proper place
[packages/mozldap.git] / mozldap.spec
1 %define nspr_version    1:4.6
2 %define nss_version     1:3.11
3 %define svrcore_version 4.0.1
4 %define major           5
5 %define minor           17
6 Summary:        Mozilla LDAP C SDK
7 Summary(pl):    Mozilla LDAP C SDK
8 Name:           mozldap
9 Version:        %{major}.%{minor}
10 Release:        0.1
11 License:        MPL/GPL/LGPL
12 Group:          System
13 Source0:        ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{major}.17/src/ldapcsdk-%{version}.tar.gz
14 # Source0-md5   453341111111111
15 URL:            http://www.mozilla.org/directory/csdk.html
16 BuildRequires:  gawk
17 BuildRequires:  nspr-devel >= %{nspr_version}
18 BuildRequires:  nss-devel >= %{nss_version}
19 BuildRequires:  pkgconfig
20 BuildRequires:  svrcore-devel >= %{svrcore_version}
21 Requires:       nspr >= %{nspr_version}
22 Requires:       nss >= %{nss_version}
23 Provides:       mozldap
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 The Mozilla LDAP C SDK is a set of libraries that allow applications
28 to communicate with LDAP directory servers. These libraries are
29 derived from the University of Michigan and Netscape LDAP libraries.
30 They use Mozilla NSPR and NSS for crypto.
31
32 %package tools
33 Summary:        Tools for the Mozilla LDAP C SDK
34 Group:          System
35 BuildRequires:  nspr-devel >= %{nspr_version}
36 BuildRequires:  nss-devel >= %{nss_version}
37 BuildRequires:  svrcore-devel >= %{svrcore_version}
38 Requires:       mozldap = %{version}-%{release}
39 Provides:       mozldap-tools
40
41 %description tools
42 The mozldap-tools package provides the ldapsearch, ldapmodify, and
43 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
44
45 %package devel
46 Summary:        Development libraries and examples for Mozilla LDAP C SDK
47 Group:          Development/Libraries
48 BuildRequires:  nspr-devel >= %{nspr_version}
49 BuildRequires:  nss-devel >= %{nss_version}
50 Requires:       mozldap = %{version}-%{release}
51 Provides:       mozldap-devel
52
53 %description devel
54 Header and Library files for doing development with the Mozilla LDAP C
55 SDK
56
57 %prep
58 %setup -q
59
60 %build
61 %ifarch x86_64 ppc64 ia64 s390x
62 arg64="--enable-64bit"
63 %endif
64
65 %configure $arg64 \
66                 --with-nss              \
67                 --with-system-svrcore   \
68                 --enable-optimize       \
69                 --disable-debug
70
71 # Enable compiler optimizations and disable debugging code
72 BUILD_OPT=1
73 export BUILD_OPT
74
75 # Generate symbolic info for debuggers
76 XCFLAGS=%{rpmcflags}
77 export XCFLAGS
78
79 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
80 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
81
82 export PKG_CONFIG_ALLOW_SYSTEM_LIBS
83 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
84
85 %ifarch x86_64 ppc64 ia64 s390x
86 USE_64=1
87 export USE_64
88 %endif
89
90 cd mozilla/directory/c-sdk
91 %{__make} BUILDCLU=1 HAVE_SVRCORE=1 BUILD_OPT=1
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT%{_includedir}/mozldap
95 install -d $RPM_BUILD_ROOT%{_libdir}
96 install -d $RPM_BUILD_ROOT%{_libdir}/mozldap
97
98 # Copy the binary libraries we want
99 for file in libssldap50.so libprldap50.so libldap50.so; do
100         install mozilla/dist/lib/$file $RPM_BUILD_ROOT%{_libdir}
101 done
102
103 # Copy the binaries we want
104 for file in ldapsearch ldapmodify ldapdelete ldapcmp ldapcompare; do
105         install mozilla/dist/bin/$file $RPM_BUILD_ROOT%{_libdir}/mozldap
106 done
107
108 # Copy the include files
109 for file in mozilla/dist/public/ldap/*.h; do
110         install -m 644 $file $RPM_BUILD_ROOT%{_includedir}/mozldap
111 done
112
113 # Copy the developer files
114 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap
115 cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{_datadir}/mozldap
116 install -d $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
117 install mozilla/directory/c-sdk/ldap/examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
118 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
119 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
120 install mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
121
122 # Rename the libraries and create the symlinks
123 cd $RPM_BUILD_ROOT%{_libdir}
124 for file in libssldap50.so libprldap50.so libldap50.so; do
125         mv $file $file.%{major}.${minor}
126         ln -s $file.%{major}.%{minor} $file.%{major}
127         ln -s $file.%{major} $file
128 done
129
130 # Set up our package file
131 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
132 sed 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,%%SVRCORE_VERSION%%,%{svrcore_version},g
140         s,%%MOZLDAP_VERSION%%,%{version},g
141 " > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozldap.pc
142
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %post -p /sbin/ldconfig
148 %postun -p /sbin/ldconfig
149
150 %files
151 %defattr(644,root,root,755)
152 %{_libdir}/libssldap50.so
153 %{_libdir}/libprldap50.so
154 %{_libdir}/libldap50.so
155 %attr(755,root,root) %{_libdir}/libssldap50.so.%{major}
156 %attr(755,root,root) %{_libdir}/libprldap50.so.%{major}
157 %attr(755,root,root) %{_libdir}/libldap50.so.%{major}
158 %attr(755,root,root) %{_libdir}/libssldap50.so.%{major}.%{minor}
159 %attr(755,root,root) %{_libdir}/libprldap50.so.%{major}.%{minor}
160 %attr(755,root,root) %{_libdir}/libldap50.so.%{major}.%{minor}
161
162 %files tools
163 %defattr(644,root,root,755)
164 %{_libdir}/mozldap/ldapsearch
165 %{_libdir}/mozldap/ldapmodify
166 %{_libdir}/mozldap/ldapdelete
167 %{_libdir}/mozldap/ldapcmp
168 %{_libdir}/mozldap/ldapcompare
169
170 %files devel
171 %defattr(644,root,root,755)
172 %{_pkgconfigdir}/mozldap.pc
173 %{_includedir}/mozldap
174 %{_datadir}/mozldap
This page took 0.079345 seconds and 4 git commands to generate.