Parcourir la source

avoid using varargs. more perl administration stuff

Michael van Elst il y a 23 ans
Parent
commit
9ac37d6d7c
2 fichiers modifiés avec 38 ajouts et 11 suppressions
  1. 11 0
      imapd/imapd.patch
  2. 27 11
      imapd/imapd.spec

+ 11 - 0
imapd/imapd.patch

@@ -12,3 +12,14 @@
  /* 
   *
   * disk format; all numbers in network byte order
+--- et/com_err.c.dist	Tue Jun 17 08:38:32 2003
++++ et/com_err.c	Tue Jun 17 08:38:46 2003
+@@ -48,7 +48,7 @@
+ #include <string.h>
+ #include "mit-sipb-copyright.h"
+ 
+-#if defined(HAVE_STDARG_H) || defined(_WINDOWS)
++#if defined(HAVE_STDARG_H) || defined(__STDC__) || defined(_WINDOWS)
+ #include <stdarg.h>
+ #else
+ #include <varargs.h>

+ 27 - 11
imapd/imapd.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [EVAL]
 Group:        Mail
 License:      BSD
 Version:      2.1.13
-Release:      20030609
+Release:      20030617
 
 #   package options
 %option       with_vhost_hack  no
@@ -139,22 +139,33 @@ Provides:     IMAP
         --with-cyrus-group=%{l_rgrp}
 
     #   redirect the hard-coded file paths
-    %{l_shtool} subst -e "s;/etc/\(.*\).conf;%{l_prefix}/etc/imapd/\\1.conf;" \
+    %{l_shtool} subst \
+        -e 's;/etc/\(.*\).conf;%{l_prefix}/etc/imapd/\1.conf;' \
         imap/*.c imap/*.h master/*.c master/*.h
+    %{l_shtool} subst \
+        -e 's;/etc/mail/cyrusmap\.db;%{l_prefix}/var/imapd/cyrusmap.db;' \
+        imap/sendmail-map.c
     %{l_make} %{l_mflags}
 
+%install
     #   build (and install) Perl-based administration stuff
     %{l_prefix}/bin/perl-openpkg prolog
-    ( cd perl/imap
-      export SASL_INC="%{l_cppflags}"
-      export SASL_LIB="%{l_ldflags} -lsasl2"
-      export OPENSSL_INC="%{l_cppflags}"
-      export OPENSSL_LIB="%{l_ldflags} -lssl -lcrypto"
-      %{l_prefix}/bin/perl-openpkg install )
+    export SASL_INC="%{l_cppflags}"
+    export SASL_LIB="%{l_ldflags} -lsasl2"
+    export OPENSSL_INC="%{l_cppflags}"
+    export OPENSSL_LIB="%{l_ldflags} -lssl -lcrypto"
+
+    %{l_prefix}/bin/perl-openpkg install -d perl/imap
+    ( cd perl/sieve
+      #   FIXME: private information from perl-openpkg
+      tag="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}"
+      perl="${RPM_BUILD_DIR}/perl-$tag"
+      %{l_make} PERL="$perl"
+    ) || exit 1
+    %{l_prefix}/bin/perl-openpkg install -d perl/sieve/managesieve
+    %{l_prefix}/bin/perl-openpkg install -d perl/sieve/acap
+    %{l_prefix}/bin/perl-openpkg epilog
 
-%install
-#   FIXME: clean up disabled due to 'perl-openpkg install'
-#   rm -rf $RPM_BUILD_ROOT
     %{l_make} %{l_mflags} install \
         prefix=$RPM_BUILD_ROOT%{l_prefix} \
         exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
@@ -166,6 +177,11 @@ Provides:     IMAP
         $RPM_BUILD_ROOT%{l_prefix}/var/imapd/spool \
         $RPM_BUILD_ROOT%{l_prefix}/bin
 
+    #   install sieve adminstration script
+    %{l_shtool} install -c -m 755 \
+        perl/sieve/scripts/sieveshell.pl \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/sieveshell
+
     #   offer a sane configuration
 
     l_hostname=`%{l_shtool} echo -e %h`