Pārlūkot izejas kodu

fix hardcoded platform-specific paths

Michael van Elst 23 gadi atpakaļ
vecāks
revīzija
84700e9c2a
1 mainītis faili ar 11 papildinājumiem un 1 dzēšanām
  1. 11 1
      sendmail/sendmail.spec

+ 11 - 1
sendmail/sendmail.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [PLUS]
 Group:        Mail
 Group:        Mail
 License:      BSD
 License:      BSD
 Version:      8.12.9
 Version:      8.12.9
-Release:      20030530
+Release:      20030605
 
 
 #   package options
 #   package options
 %option       with_tls      no
 %option       with_tls      no
@@ -105,6 +105,15 @@ Conflicts:    ssmtp, exim, postfix
       %{l_tar} xf %{SOURCE cf.tar}
       %{l_tar} xf %{SOURCE cf.tar}
     )
     )
 
 
+    #   override platform-specific definitions
+    ( cd sendmail-%{version}
+      %{l_shtool} subst \
+        -e 's;\(define *SMRSH_CMDDIR *\).*;\1 "%{l_prefix}/var/sendmail/sm.bin";g' \
+        -e 's;\(define *_PATH_SENDMAIL *\).*;\1 "%{l_prefix}/sbin/sendmail";g' \
+        -e 's;\(include *<paths.h>.*\);\1\n#ifdef _PATH_SENDMAIL\n#undef _PATH_SENDMAIL\n#endif;g' \
+        include/sendmail/pathnames.h include/sm/conf.h
+    )
+
 %build
 %build
     #   build Sendmail
     #   build Sendmail
     ( cd sendmail-%{version}
     ( cd sendmail-%{version}
@@ -282,6 +291,7 @@ Conflicts:    ssmtp, exim, postfix
 
 
     #   create important files which have to be present from the beginning
     #   create important files which have to be present from the beginning
     %{l_shtool} mkdir -f -p -m 755 \
     %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/sm.bin \
         $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/mqueue \
         $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/mqueue \
         $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/mqueue/.hoststat
         $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/mqueue/.hoststat
     %{l_shtool} mkdir -f -p -m 755 \
     %{l_shtool} mkdir -f -p -m 755 \