瀏覽代碼

add cyradm stuff

Ralf S. Engelschall 23 年之前
父節點
當前提交
8f9cebad57
共有 1 個文件被更改,包括 16 次插入7 次删除
  1. 16 7
      imapd/imapd.spec

+ 16 - 7
imapd/imapd.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [EVAL]
 Group:        Mail
 License:      BSD
 Version:      2.1.12
-Release:      20030204
+Release:      20030224
 
 #   list of sources
 Source0:      ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
@@ -44,14 +44,13 @@ Patch0:       imapd.patch
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020206, sasl, db >= 4.1.24, openssl, make, perl
+BuildPreReq:  OpenPKG, openpkg >= 20020206, sasl, db >= 4.1.24, openssl, make, perl, perl-openpkg
 PreReq:       OpenPKG, openpkg >= 20020206, sasl, openssl, MTA
 AutoReq:      no
 AutoReqProv:  no
 Provides:     IMAP
 
 %description
-
     The Cyrus IMAP server is an IMAP4 and POP3 daemon that differs from
     other IMAP server implementations in that it is generally intended to
     be run on sealed servers, where normal users are not permitted to log
@@ -61,7 +60,7 @@ Provides:     IMAP
 
 %prep
     %setup -q -n cyrus-imapd-%{version}
-    %patch0 -p0
+    %patch -p0
 
 %build
     %{l_shtool} subst -e 's;db-4.1;db;g' configure
@@ -92,8 +91,18 @@ Provides:     IMAP
         imap/*.c imap/*.h master/*.c master/*.h
     %{l_make} %{l_mflags}
 
+    #   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 )
+
 %install
-    rm -rf $RPM_BUILD_ROOT
+    #rm -rf $RPM_BUILD_ROOT
+
     %{l_make} %{l_mflags} install \
         prefix=$RPM_BUILD_ROOT%{l_prefix} \
         exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
@@ -110,8 +119,8 @@ Provides:     IMAP
     %{l_shtool} install -c -m 644 \
         -e 's;@l_prefix@;%{l_prefix};g' \
         -e 's;@l_musr@;%{l_musr};g' \
-        %{SOURCE imapd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/imapd/ \
-        master/conf/cyrus.conf $RPM_BUILD_ROOT%{l_prefix}/etc/imapd/
+        %{SOURCE imapd.conf} master/conf/cyrus.conf \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/imapd/
 
     #   install the run command file
     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d