Explorar el Código

fix hardcoded platform-specific paths

Michael van Elst hace 23 años
padre
commit
84700e9c2a
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  1. 11 1
      sendmail/sendmail.spec

+ 11 - 1
sendmail/sendmail.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [PLUS]
 Group:        Mail
 License:      BSD
 Version:      8.12.9
-Release:      20030530
+Release:      20030605
 
 #   package options
 %option       with_tls      no
@@ -105,6 +105,15 @@ Conflicts:    ssmtp, exim, postfix
       %{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 Sendmail
     ( cd sendmail-%{version}
@@ -282,6 +291,7 @@ Conflicts:    ssmtp, exim, postfix
 
     #   create important files which have to be present from the beginning
     %{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/.hoststat
     %{l_shtool} mkdir -f -p -m 755 \