Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7693593
  • 博文数量: 637
  • 博客积分: 10265
  • 博客等级: 上将
  • 技术积分: 6165
  • 用 户 组: 普通用户
  • 注册时间: 2004-12-12 22:00
文章分类

全部博文(637)

文章存档

2011年(1)

2010年(1)

2009年(3)

2008年(12)

2007年(44)

2006年(156)

2005年(419)

2004年(1)

分类:

2006-03-26 21:31:08



If you wish to use postfix with some of the additionally supported modules you will need to rebuild from the source package. You will also need to have installed the specific packages you wish to link against. During the build procedure rpm will tell you if you are missing the required packages, and likewise if you try and install a binary rpm and don't have the required runtime libraries.

If you have downloaded the .src.rpm package and want to build the binary package follow the following steps:

  • Download source rpm package: postfix-.....src.rpm

  • Install the package which puts source files in %{_sourcedir} and %{_specdir}, ready for starting the package build. See below for the exact location that rpm uses.
    Note: This will not affect the binary packages that are currently installed on your machine.
    	rpm -Uvh postfix-...src.rpm
  • According to the different distribution you are using, or the different options you wish to enable you may need to generate a new postfix.spec file. Create the specific postfix.spec file:
    	cd `rpm --eval '%{_sourcedir}'`
    # set the required build options
    export POSTFIX_SMTPD_MULTILINE_GREETING=1 # for exmaple
    # export POSTFIX_IPV6=1
    # export POSTFIX_LDAP=1
    # export POSTFIX_MYSQL=1
    # export POSTFIX_MYSQL_REDHAT=1
    # # if used provide the directories of the mysql include and lib files
    # # - only 2 directories are allowed and the order should be as stated
    # export POSTFIX_MYSQL_PATHS=/include/directory:/lib/directory
    # export POSTFIX_PCRE=1
    # export POSTFIX_PGSQL=1
    # export POSTFIX_RBL_MAPS=1
    # There is support for building Postfix with SASL v1 or v2.
    # - select the correct version
    # export POSTFIX_SASL=1 # to enable support for SASL v1
    # export POSTFIX_SASL=2 # to enable support for SASL v2
    # export POSTFIX_SPF=1
    # export POSTFIX_TLS=1
    # export POSTFIX_VDA=1
    # DB library support is determined by default according to your distribution
    # however to modify the default library used you can do the following:
    # export POSTFIX_DB=3 # to enable support for db3
    # export POSTFIX_DB=4 # to enable support for db4
    # this creates %{_specdir}/postfix.spec
    sh `rpm --eval '%{_sourcedir}'`/make-postfix.spec
  • Build the binary rpms (locally):
    	cd `rpm --eval '%{_specdir}'`
    rpmbuild -ba postfix.spec

    The binary and source rpms are put in %{_rpmdir}/i386 and %{_srcrpmdir} respectively.

  • Install the binary rpms:
    	rpm -Uvh `rpm --eval '%{_rpmdir}'`/i386/postfix-...i386.rpm

If you have any further questions regarding this package please let me know. Package building errors are mine alone, and not Wietse's.

On RedHat Linux the standard directory structure used by rpm is:


RPM Macro Standard Directory or Value
%{_sourcedir} /usr/src/redhat/SOURCES
%{_specdir} /usr/src/redhat/SPECS
%{_rpmdir} /usr/src/redhat/RPMS

These values can be obtained from rpm by the following command:

	rpm --eval '%{name}'

阅读(5949) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~