ソースを参照

- Add support for building with the latest unstable version, too. - License is IPL and not GPL

Ralf S. Engelschall 24 年 前
コミット
5db7e66179
1 ファイル変更36 行追加5 行削除
  1. 36 5
      postfix/postfix.spec

+ 36 - 5
postfix/postfix.spec

@@ -22,18 +22,25 @@
 ##  SUCH DAMAGE. 
 ##  
 
+#   select branch ("stable" or "unstable")
+%define       branch      stable
+
+#   the currently used versions
 %define       V_here      20010228.5
 %define       V_real      20010228-pl05
 %define       V_ipv6      20010228pl04-v6-20010913a
 %define       V_tls       0.7.9-20010228-pl04-0.9.6b
 %define       V_pflogsumm 1.0.3
+%define       V_unstable  20011008
 
 #   build options
 #   (attention: ipv6 and tls at the same time conflicts!)
 %define       with_db     yes
 %define       with_pcre   yes
-%define       with_ipv6   yes
+%if "%{branch}" == "stable"
+%define       with_ipv6   no
 %define       with_tls    no
+%endif
 
 #   package information
 Name:         postfix
@@ -43,9 +50,13 @@ Vendor:       Wietse Venema
 Packager:     The OpenPKG Project
 Distribution: OpenPKG [EXP]
 Group:        Mail
-License:      GPL
+License:      IPL
+%if "%{branch}" == "stable"
 Version:      %{V_here}
-Release:      12
+%else
+Version:      %{V_unstable}
+%endif
+Release:      13
 
 #   list of sources
 Source0:      ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%{V_real}.tar.gz
@@ -54,6 +65,7 @@ Source2:      ftp://ftp.openpkg.org/DST/postfix/fakesyslog.tar.gz
 Source3:      ftp://ftp.kame.net/pub/kame/misc/postfix-%{V_ipv6}.diff.gz
 Source4:      http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.pl
 Source5:      rc.postfix
+Source6:      ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/snapshot-%{V_unstable}.tar.gz
 
 #   build information
 Prefix:       %{l_prefix}
@@ -88,10 +100,20 @@ Provides:     MTA
     o Optional PCRE matching support
 
 %prep
-    %setup0 -q -c
+%if "%{branch}" == "stable"
+    %setup0 -q -c -a 0
+%else
+    %setup6 -q -c -a 6
+%endif
+%if "%{with_tls}" == "yes"
     %setup1 -q -T -D -a 1
+%endif
     %setup2 -q -T -D -a 2
+%if "%{branch}" == "stable"
     cd postfix-%{V_real}
+%else
+    cd snapshot-%{V_unstable}
+%endif
 %if "%{with_ipv6}" == "yes"
     %{l_gzip} -d  -c %{SOURCE postfix-20010228pl04-v6-20010913a.diff.gz} |\
     %{l_perl} -e 'my $c = ""; $c .= $_ while (<STDIN>);
@@ -122,7 +144,11 @@ Provides:     MTA
     )
 
     #   configure Postfix
+%if "%{branch}" == "stable"
     cd postfix-%{V_real}
+%else
+    cd snapshot-%{V_unstable}
+%endif
     unset LD_LIBRARY_PATH || true
     CCARGS=""
     CCARGS="$CCARGS %{l_cflags -O}"
@@ -153,7 +179,12 @@ Provides:     MTA
     rm -rf $RPM_BUILD_ROOT
 
     #   perform standard installation procedure
-    ( cd postfix-%{V_real}
+    ( 
+%if "%{branch}" == "stable"
+      cd postfix-%{V_real}
+%else
+      cd snapshot-%{V_unstable}
+%endif
       %{l_rpmtool} subst "s;chown;true;" -- INSTALL.sh
       install_root=$RPM_BUILD_ROOT \
       config_directory=%{l_prefix}/etc/postfix \