]> git.pld-linux.org Git - packages/mozldap.git/blobdiff - mozldap.spec
- more static libs
[packages/mozldap.git] / mozldap.spec
index ea379c55325a47cd328170d929cc94bbef0bc5bb..d3da14f2dcc3a7668d945b51c6e5235b8b4cab6c 100644 (file)
@@ -1,8 +1,7 @@
-#
-# TODO:
-# Conditional build:
 %define        nspr_version    4.6
+%define        nspr_evr 1:%{nspr_version}
 %define        nss_version     3.11
+%define        nss_evr 1:%{nss_version}
 %define        svrcore_version 4.0.1
 %define        major           5
 %define        minor           17
@@ -10,21 +9,21 @@ Summary:     Mozilla LDAP C SDK
 Summary(pl):   Mozilla LDAP C SDK
 Name:          mozldap
 Version:       %{major}.%{minor}
-Release:       0.1
+Release:       0.2
 License:       MPL/GPL/LGPL
 Group:         System
-######         Unknown group!
-Source0:       ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{version}/src/ldapcsdk-%{version}.tar.gz
-# Source0-md5  453341111111111
+Source0:       ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{major}.17/src/ldapcsdk-5.1.7.tar.gz
+# Source0-md5: 66ddb43e984c0df67e21afb4dc6977b1
 URL:           http://www.mozilla.org/directory/csdk.html
-Requires:      nspr >= %{nspr_version}
-Requires:      nss >= %{nss_version}
-BuildRequires: nspr-devel >= %{nspr_version}
-BuildRequires: nss-devel >= %{nss_version}
-BuildRequires: svrcore-devel >= %{svrcore_version}
-BuildRequires: pkgconfig
 BuildRequires: gawk
-Provides:      mozldap
+BuildRequires: libstdc++-devel
+BuildRequires: nspr-devel >= %{nspr_evr}
+BuildRequires: nss-devel >= %{nss_evr}
+BuildRequires: perl-base
+BuildRequires: pkgconfig
+#BuildRequires:        svrcore-devel >= %{svrcore_version}
+Requires:      nspr >= %{nspr_evr}
+Requires:      nss >= %{nss_evr}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -33,168 +32,134 @@ to communicate with LDAP directory servers. These libraries are
 derived from the University of Michigan and Netscape LDAP libraries.
 They use Mozilla NSPR and NSS for crypto.
 
-%description -l pl
-x
-
 %package tools
 Summary:       Tools for the Mozilla LDAP C SDK
 Group:         System
-######         Unknown group!
 Requires:      mozldap = %{version}-%{release}
-BuildRequires: nspr-devel >= %{nspr_version}
-BuildRequires: nss-devel >= %{nss_version}
-BuildRequires: svrcore-devel >= %{svrcore_version}
-Provides:      mozldap-tools
 
 %description tools
 The mozldap-tools package provides the ldapsearch, ldapmodify, and
 ldapdelete tools that use the Mozilla LDAP C SDK libraries.
 
-%description tools -l pl
-x
-
 %package devel
 Summary:       Development libraries and examples for Mozilla LDAP C SDK
 Group:         Development/Libraries
 Requires:      mozldap = %{version}-%{release}
-BuildRequires: nspr-devel >= %{nspr_version}
-BuildRequires: nss-devel >= %{nss_version}
-Provides:      mozldap-devel
 
 %description devel
 Header and Library files for doing development with the Mozilla LDAP C
-SDK
+SDK.
 
-%description devel -l pl
-x
+%package static
+Summary:       Static Mozilla LDAP C SDK libraries
+Summary(pl):   Statyczne biblioteki Mozilla LDAP C SDK
+Group:         Development/Libraries
+Requires:      mozldap-devel = %{version}-%{release}
 
-%prep
+%description static
+Static Mozilla LDAP C SDK libraries.
 
-%setup -q
-#-n
-#cd mozilla/directory/c-sdk
+%description static -l pl
+Statyczne biblioteki Mozilla LDAP C SDK.
 
-%build
+%prep
+%setup -q -n mozilla
 
+%build
 %ifarch x86_64 ppc64 ia64 s390x
 arg64="--enable-64bit"
 %endif
 
-%configure $arg64 \
-               --with-nss              \
-               --with-system-svrcore   \
-               --enable-optimize       \
-               --disable-debug
-
-# Enable compiler optimizations and disable debugging code
-BUILD_OPT=1
-export BUILD_OPT
-
-# Generate symbolic info for debuggers
-XCFLAGS=%{rpmcflags}
-export XCFLAGS
-
-PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
-PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
+# build local svrcore
+cd security/coreconf
+%{__make}
+cd ../../security/svrcore
+%{__make} \
+       CFLAGS="%{rpmcflags} -I. -I/usr/include/nspr -I/usr/include/nss"
+cd ../..
+# end svrcore
 
-export PKG_CONFIG_ALLOW_SYSTEM_LIBS
-export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
+cd directory/c-sdk
+%configure $arg64 \
+       --with-nspr \
+       --with-nspr-inc=%{_includedir}/nspr \
+       --with-nspr-lib=%{_libdir} \
+       --with-nss \
+       --with-nss-inc=%{_includedir}/nss \
+       --with-nss-lib=%{_libdir} \
+       --with-svrcore \
+       --with-svrcore-inc=$PWD/../../security/svrcore \
+       --enable-optimize \
+       --disable-debug
 
 %ifarch x86_64 ppc64 ia64 s390x
 USE_64=1
 export USE_64
 %endif
 
-cd mozilla/directory/c-sdk
-%{__make} BUILDCLU=1 HAVE_SVRCORE=1 BUILD_OPT=1
-
-# Set up our package file
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
-%{__cat} mozldap.pc.in | sed -e "s,%%libdir%%,%{_libdir},g" \
-                          -e "s,%%prefix%%,%{_prefix},g" \
-                          -e "s,%%exec_prefix%%,%{_prefix},g" \
-                          -e "s,%%includedir%%,%{_includedir}/mozldap,g" \
-                          -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
-                          -e "s,%%NSS_VERSION%%,%{nss_version},g" \
-                          -e "s,%%SVRCORE_VERSION%%,%{svrcore_version},g" \
-                          -e "s,%%MOZLDAP_VERSION%%,%{version},g" > \
-                          $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/mozldap.pc
+%{__make} \
+       BUILDCLU=1 \
+       HAVE_SVRCORE=1 \
+       BUILD_OPT=1 \
+       XCFLAGS="%{rpmcflags}"
 
 %install
-# There is no make install target so we'll do it ourselves.
-
 rm -rf $RPM_BUILD_ROOT
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/mozldap
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/mozldap
-
-# Copy the binary libraries we want
-for file in libssldap50.so libprldap50.so libldap50.so
-do
-  %{__install} -m 755 mozilla/dist/lib/$file $RPM_BUILD_ROOT/%{_libdir}
-done
-
-# Copy the binaries we want
-for file in ldapsearch ldapmodify ldapdelete ldapcmp ldapcompare
-do
-  %{__install} -m 755 mozilla/dist/bin/$file $RPM_BUILD_ROOT/%{_libdir}/mozldap
-done
-
-# Copy the include files
-for file in mozilla/dist/public/ldap/*.h
-do
-  %{__install} -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/mozldap
-done
-
-# Copy the developer files
-%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mozldap
-cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{_datadir}/mozldap
-%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
-%{__install} -m 644 mozilla/directory/c-sdk/ldap/examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
-%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
-%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
-%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
-
-# Rename the libraries and create the symlinks
-cd $RPM_BUILD_ROOT/%{_libdir}
-for file in libssldap50.so libprldap50.so libldap50.so
-do
-  mv $file $file.${major}.${minor}
-  ln -s $file.${major}.%{minor} $file.${major}
-  ln -s $file.${major} $file
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}/mozldap
+
+install dist/lib/lib*ldap*.so $RPM_BUILD_ROOT%{_libdir}
+install dist/bin/ldap* $RPM_BUILD_ROOT%{_libdir}/mozldap
+install dist/public/ldap/*.h $RPM_BUILD_ROOT%{_includedir}/mozldap
+install directory/c-sdk/ldap/libraries/lib*/lib*50.a $RPM_BUILD_ROOT%{_libdir}
+
+install -d $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
+cd directory/c-sdk/ldap
+cp -r examples $RPM_BUILD_ROOT%{_datadir}/mozldap
+install examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
+install libraries/libldap/*.conf $RPM_BUILD_ROOT%{_datadir}/mozldap%{_sysconfdir}
+cd ..
+
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+sed mozldap.pc.in -e "
+       s,%%libdir%%,%{_libdir},g
+       s,%%prefix%%,%{_prefix},g
+       s,%%exec_prefix%%,%{_prefix},g
+       s,%%includedir%%,%{_includedir}/mozldap,g
+       s,%%NSPR_VERSION%%,%{nspr_version},g
+       s,%%NSS_VERSION%%,%{nss_version},g
+       s,%%SVRCORE_VERSION%%,%{svrcore_version},g
+       s,%%MOZLDAP_VERSION%%,%{version},g
+" > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozldap.pc
+
+cd $RPM_BUILD_ROOT%{_libdir}
+for file in libssldap50.so libprldap50.so libldap50.so; do
+       mv $file $file.%{major}.%{minor}
+       ln -s $file.%{major}.%{minor} $file.%{major}
+       ln -s $file.%{major} $file
 done
 
 %clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
-%post
-/sbin/ldconfig >/dev/null 2>/dev/null
+rm -rf $RPM_BUILD_ROOT
 
-%postun
-/sbin/ldconfig >/dev/null 2>/dev/null
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%{_libdir}/libssldap50.so
-%{_libdir}/libprldap50.so
-%{_libdir}/libldap50.so
-%{_libdir}/libssldap50.so.%{major}
-%{_libdir}/libprldap50.so.%{major}
-%{_libdir}/libldap50.so.%{major}
-%{_libdir}/libssldap50.so.%{major}.%{minor}
-%{_libdir}/libprldap50.so.%{major}.%{minor}
-%{_libdir}/libldap50.so.%{major}.%{minor}
+%attr(755,root,root) %{_libdir}/lib*.so.%{major}.%{minor}
+%attr(755,root,root) %{_libdir}/lib*.so.%{major}
 
 %files tools
 %defattr(644,root,root,755)
-%{_libdir}/mozldap/ldapsearch
-%{_libdir}/mozldap/ldapmodify
-%{_libdir}/mozldap/ldapdelete
-%{_libdir}/mozldap/ldapcmp
-%{_libdir}/mozldap/ldapcompare
+%attr(755,root,root) %{_libdir}/mozldap/ldap*
 
 %files devel
 %defattr(644,root,root,755)
-%{_libdir}/pkgconfig/mozldap.pc
+%{_pkgconfigdir}/mozldap.pc
 %{_includedir}/mozldap
 %{_datadir}/mozldap
+%{_libdir}/lib*.so
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/lib*.a
This page took 0.072729 seconds and 4 git commands to generate.