瀏覽代碼

comitt the missing pieces for the installation of the pkgconfig file

Ralf S. Engelschall 21 年之前
父節點
當前提交
d9130bf509
共有 1 個文件被更改,包括 17 次插入1 次删除
  1. 17 1
      openldap/openldap.spec

+ 17 - 1
openldap/openldap.spec

@@ -46,6 +46,7 @@ Release:      20041024
 Source0:      ftp://ftp.openldap.org/pub/openldap/openldap-release/openldap-%{version}.tgz
 Source1:      rc.openldap
 Source2:      fsl.openldap
+Source3:      openldap.pc
 Patch0:       openldap.patch
 
 #   build information
@@ -189,15 +190,30 @@ AutoReqProv:  no
         %{SOURCE rc.openldap} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
 
     #   install OSSP fsl configuration
-    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
     %{l_shtool} install -c -m 644 %{l_value -s -a} \
         %{SOURCE fsl.openldap} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
 
+    #   install pkg-config configuration
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
+    libs="-lldap -llber"
+%if "%{with_sasl}" == "yes"
+    libs="$libs -lsasl2"
+%endif
+    %{l_shtool} install -c -m 644 %{l_value -s -a} \
+        -e 's;@version@;%{version};' \
+        -e "s;@libs@;$libs;" \
+        %{SOURCE openldap.pc} \
+        $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
+
     #   determine installation files
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \
         '%not %dir %{l_prefix}/etc/fsl' \
+        '%not %dir %{l_prefix}/lib/pkgconfig' \
         '%config %{l_prefix}/etc/fsl/fsl.openldap' \
         '%config %{l_prefix}/etc/openldap/*.conf'