diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 83 |
1 files changed, 67 insertions, 16 deletions
diff --git a/debian/rules b/debian/rules index 53e4ac3..1791f45 100755 --- a/debian/rules +++ b/debian/rules @@ -38,20 +38,20 @@ # nostrip - Do *NOT* strip binaries (for debugging) # # SM_CONF -# A quick means to customize the Debian Sendmail package according -# to your sites guidelines ! -# 1) Choose a configuration name (ie FooBar) -# 2) cp debian/configure.options debian/FooBar.options -# 3) $(EDIT) debian/FooBar.options to taste -# 4) mkdir debian/FooBar.patches -# 5) add any local patches in that directory - following -# the style in debian/patches style (ie, 8.13/8.13.3 subdirectory) -# 6) cp debian/changelog debian/FooBar.changelog -# 7) $(EDIT) debian/FooBar.changelog, delete everything after the -# 1st null line (but leave that null!!!) -# 8) Update debian/FooBar.changelog to show your updates -# 9) SM_CONF="FooBar" debian/rules configure ** IMPORTANT *** -# 10) build the package (SM_CONF="FooBar" dpkg-buildpackage or debuild) +# A quick means to customize the Debian Sendmail package according +# to your sites guidelines ! +# 1) Choose a configuration name (ie FooBar) +# 2) cp debian/configure.options debian/FooBar.options +# 3) $(EDIT) debian/FooBar.options to taste +# 4) mkdir debian/FooBar.patches +# 5) add any local patches in that directory - following +# the style in debian/patches style (ie, 8.13/8.13.3 subdirectory) +# 6) cp debian/changelog debian/FooBar.changelog +# 7) $(EDIT) debian/FooBar.changelog, delete everything after the +# 1st null line (but leave that null!!!) +# 8) Update debian/FooBar.changelog to show your updates +# 9) SM_CONF="FooBar" debian/rules configure ** IMPORTANT *** +# 10) build the package (SM_CONF="FooBar" dpkg-buildpackage or debuild) # # # SM_CONF_OPT @@ -131,7 +131,7 @@ version_string := $(shell (cd ${debian_dir}/.. >/dev/null && \ # Remove local site name from version string ifneq (, ${SM_CONF}) ifneq (, $(findstring ${SM_CONF}.,${version_string})) - version_string := $(shell expr "${version_string}" : "${SM_CONF}.\(.*\)") + version_string := $(shell expr "${version_string}" : "${SM_CONF}.\(.*\)") endif endif version_full := $(shell expr "${version_string}" : '\([^-]*\)') @@ -721,6 +721,21 @@ ifeq (3, $(shell test ${DH_COMPAT} -ge 3 && echo '3')) mv $$file $$file.sav; \ done; endif +ifeq (smX, ${package}) + (cd ${BUILD_TREE} && \ + CFLAGS="-DSM_USE_TLS -DSM_USE_SASL ${CFLAGS}" \ + ./configure \ + --libexecdir=/usr/lib/sm.bin \ + --datadir=${DATA_DIR} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --infodir=${DATA_DIR}/info \ + --mandir=${DATA_DIR}/man \ + --enable-TLS \ + --enable-SASL \ + --enable-pmilter \ + ) +endif touch ${STAMP_DIR}/configure; @@ -731,6 +746,8 @@ ${STAMP_DIR}/build-indep: ${STAMP_DIR}/configure # Skip work if nothing to do... ifeq (yes, ${ENABLE_INDEP}) @dh_testdir; +ifeq (smX,${package}) +else # Add here commands to build/compile the documentation/package. #$(MAKE) doc; # Only valid on newer (8.11+) Sendmails @@ -742,6 +759,7 @@ ifeq (yes, ${ENABLE_INDEP}) # Debian stuff (cd ${debian_dir} && $(MAKE) -f Makefile build-indep;) endif +endif touch ${STAMP_DIR}/build-indep; @@ -753,7 +771,12 @@ ${STAMP_DIR}/build-arch: ${STAMP_DIR}/configure ifeq (yes, ${ENABLE_ARCH}) @dh_testdir; # Add here commands to compile the package. - #$(MAKE); + # $(MAKE); + # +ifeq (smX,${package}) + (cd ${BUILD_TREE} && make) + #(cd ${BUILD_TREE} && make -i check >check.log 2>&1) +else # Place our m4 configuration files for the sendmail build to use if [ -d ${BUILD_TREE}/devtools/Site ]; then \ cp -f ${debian_dir}/build/site.config.m4 \ @@ -778,10 +801,29 @@ ifeq (yes, ${ENABLE_ARCH}) # Remove our config m4 files $(RM) ${BUILD_TREE}/devtools/Site/site.config.m4; endif +endif touch ${STAMP_DIR}/build-arch; #------------- +.PHONY: build-arch +check-arch: ${STAMP_DIR}/check-arch +${STAMP_DIR}/check-arch: ${STAMP_DIR}/build-arch +# Skip work if nothing to do... +ifeq (yes, ${ENABLE_ARCH}) + @dh_testdir; + # Add here commands to compile the package. + # $(MAKE); + # +ifeq (smX,${package}) + (cd ${BUILD_TREE} && make -i check >check.log 2>&1) +else +endif +endif + touch ${STAMP_DIR}/check-arch; + + +#------------- .PHONY: install-indep install-indep: ${STAMP_DIR}/install-indep ${STAMP_DIR}/install-indep: DH_OPTIONS=-i @@ -793,6 +835,8 @@ ifeq (yes, ${ENABLE_INDEP}) #dh_clean -k; dh_installdirs; if [ -x /usr/bin/dh_link ]; then dh_link; fi; +ifeq (smX,${package}) +else # Add here commands to install the documentation/package. #$(MAKE) prefix=`pwd`/${PKG_DIR}/usr install; # sendmail operations guide and other documentation @@ -856,6 +900,7 @@ endif debian/build/debian/sendmail-base.lintian-overrides \ debian/sendmail-base/usr/share/lintian/overrides/sendmail-base; endif +endif touch ${STAMP_DIR}/install-indep; @@ -876,6 +921,8 @@ ifeq (yes, ${ENABLE_ARCH}) # sendmail install proper... with a little help ;-} #$(MAKE) install DESTDIR="$${pwd}/${PKG_DIR}"; # Finally, install the whole enchilada +ifeq (smX,${package}) +else for subdir in ${SM_SUBDIRS}; do \ if [ -d ${BUILD_TREE}/$${subdir} ]; then \ if [ "$${subdir}" = 'libmilter' ]; then \ @@ -1024,6 +1071,7 @@ endif ifeq (, $(findstring nostrip,${DEB_BUILD_OPTIONS})) dh_strip; endif +endif dh_makeshlibs; # -V "libmilter0 (>= ${version_major}.${version_minor})"; dh_shlibdeps; endif @@ -1134,6 +1182,9 @@ source diff: build: build-arch .PHONY: build-all build-all: build-indep build-arch +.PHONY: check check-all +check: check-arch +check-all: check-arch .PHONY: install install: install-arch .PHONY: binary |