- build shared libmilter (#309281)
- drop static libraries - convert RELEASE_NOTES to UTF-8
This commit is contained in:
parent
45fbb3396d
commit
fe11c480c4
50
sendmail-8.14.3-sharedmilter.patch
Normal file
50
sendmail-8.14.3-sharedmilter.patch
Normal file
@ -0,0 +1,50 @@
|
||||
diff -up sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4.sharedmilter sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4
|
||||
--- sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4.sharedmilter 2009-01-20 15:19:34.000000000 +0100
|
||||
+++ sendmail-8.14.3/devtools/M4/UNIX/sharedlibrary.m4 2009-01-20 15:19:34.000000000 +0100
|
||||
@@ -15,22 +15,23 @@ divert(-1)
|
||||
divert(0)dnl
|
||||
include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/links.m4')dnl
|
||||
bldLIST_PUSH_ITEM(`bldC_PRODUCTS', bldCURRENT_PRODUCT)dnl
|
||||
-bldPUSH_TARGET(bldCURRENT_PRODUCT`.a')dnl
|
||||
+bldPUSH_TARGET(bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL)dnl
|
||||
bldPUSH_INSTALL_TARGET(`install-'bldCURRENT_PRODUCT)dnl
|
||||
bldPUSH_CLEAN_TARGET(bldCURRENT_PRODUCT`-clean')dnl
|
||||
|
||||
include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
|
||||
divert(bldTARGETS_SECTION)
|
||||
-bldCURRENT_PRODUCT.a: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
|
||||
- ${AR} ${AROPTS} bldCURRENT_PRODUCT.a ${bldCURRENT_PRODUCT`OBJS'}
|
||||
- ${RANLIB} ${RANLIBOPTS} bldCURRENT_PRODUCT.a
|
||||
+bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
|
||||
+ ${CC} ${CFLAGS} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL `-Wl,'confSONAME`,'bldCURRENT_PRODUCT`.so.'confSOVER ${bldCURRENT_PRODUCT`OBJS'}
|
||||
ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
|
||||
|
||||
-install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a
|
||||
+install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL
|
||||
ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ')
|
||||
- ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}')
|
||||
+ ${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.confSOVER.confSOPLVL ${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so.confSOVER
|
||||
+ ${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.confSOVER ${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so
|
||||
+ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.so.confSOVER`.'confSOPLVL ${DESTDIR}${LIBDIR}')
|
||||
|
||||
bldCURRENT_PRODUCT-clean:
|
||||
- rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
|
||||
+ rm -f ${OBJS} bldCURRENT_PRODUCT.so* ${MANPAGES}
|
||||
|
||||
divert(0)
|
||||
diff -up sendmail-8.14.3/libmilter/Makefile.m4.sharedmilter sendmail-8.14.3/libmilter/Makefile.m4
|
||||
--- sendmail-8.14.3/libmilter/Makefile.m4.sharedmilter 2008-04-08 07:23:44.000000000 +0200
|
||||
+++ sendmail-8.14.3/libmilter/Makefile.m4 2009-01-20 15:26:05.000000000 +0100
|
||||
@@ -9,7 +9,11 @@ define(`confMT', `true')
|
||||
SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
|
||||
PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
|
||||
|
||||
-bldPRODUCT_START(`library', `libmilter')
|
||||
+APPENDDEF(`confOPTIMIZE', `-fno-pie -fPIC')
|
||||
+define(`runCtest', `esyscmd(`echo -e "#include <stdio.h>\n#include \"../include/libmilter/mfapi.h\"\nint main(){'$1`;return 0;}" | gcc -x c -I../include -o ctest - && ./ctest && rm -f ctest')')dnl
|
||||
+define(`confSOVER', runCtest(`printf(\"%d.%d\", SM_LM_VRS_MAJOR(SMFI_VERSION), SM_LM_VRS_MINOR(SMFI_VERSION))'))dnl
|
||||
+define(`confSOPLVL', runCtest(`printf(\"%d\", SM_LM_VRS_PLVL(SMFI_VERSION))'))dnl
|
||||
+bldPRODUCT_START(`sharedlibrary', `libmilter')
|
||||
define(`bldINSTALLABLE', `true')
|
||||
define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
|
||||
APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
|
@ -15,7 +15,7 @@
|
||||
Summary: A widely used Mail Transport Agent (MTA)
|
||||
Name: sendmail
|
||||
Version: 8.14.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: Sendmail
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.sendmail.org/
|
||||
@ -49,6 +49,7 @@ Patch13: sendmail-8.13.7-aliases_dir.patch
|
||||
Patch14: sendmail-8.13.7-vacation.patch
|
||||
Patch15: sendmail-8.14.1-noversion.patch
|
||||
Patch16: sendmail-8.13.1-localdomain.patch
|
||||
Patch17: sendmail-8.14.3-sharedmilter.patch
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: tcp_wrappers-devel
|
||||
BuildRequires: db4-devel
|
||||
@ -109,6 +110,7 @@ provided in PostScript(TM) and troff formats.
|
||||
Summary: Extra development include files and development files
|
||||
Group: Development/Libraries
|
||||
Requires: sendmail = %{version}-%{release}
|
||||
Requires: sendmail-milter = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Include files and devel libraries for e.g. the milter addons as part
|
||||
@ -126,6 +128,17 @@ sendmail.cf file distributed with the sendmail package. You will need
|
||||
the sendmail-cf package if you ever need to reconfigure and rebuild
|
||||
your sendmail.cf file.
|
||||
|
||||
%package milter
|
||||
Summary: The sendmail milter library
|
||||
Group: System Environment/Libraries
|
||||
|
||||
%description milter
|
||||
The sendmail Mail Filter API (Milter) is designed to allow third-party
|
||||
programs access to mail messages as they are being processed in order to
|
||||
filter meta-information and content.
|
||||
|
||||
This package includes the milter shared library.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
@ -142,6 +155,14 @@ your sendmail.cf file.
|
||||
%patch15 -p1 -b .noversion
|
||||
%patch16 -p1 -b .localdomain
|
||||
|
||||
cp devtools/M4/UNIX/{,shared}library.m4
|
||||
%patch17 -p1 -b .sharedmilter
|
||||
|
||||
for f in RELEASE_NOTES; do
|
||||
iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&
|
||||
touch -r ${f}{,_} && mv -f ${f}{_,}
|
||||
done
|
||||
|
||||
%build
|
||||
# generate redhat config file
|
||||
cat > redhat.config.m4 << EOF
|
||||
@ -254,7 +275,9 @@ namegroup=`id -ng`
|
||||
Make() {
|
||||
make $@ \
|
||||
DESTDIR=%{buildroot} \
|
||||
LIBDIR=%{_libdir} \
|
||||
MANROOT=%{_mandir}/man \
|
||||
LIBMODE=0755 INCMODE=0644 \
|
||||
SBINOWN=${nameuser} SBINGRP=${namegroup} \
|
||||
UBINOWN=${nameuser} UBINGRP=${namegroup} \
|
||||
MANOWN=${nameuser} MANGRP=${namegroup} \
|
||||
@ -268,7 +291,6 @@ Make() {
|
||||
OBJDIR=obj.$(uname -s).$(uname -r).$(uname -m)
|
||||
|
||||
Make install -C $OBJDIR/libmilter
|
||||
Make install -C $OBJDIR/libsmutil
|
||||
Make install -C $OBJDIR/sendmail
|
||||
Make install -C $OBJDIR/mailstats
|
||||
Make force-install -C $OBJDIR/rmail
|
||||
@ -276,16 +298,6 @@ Make install -C $OBJDIR/praliases
|
||||
Make install -C $OBJDIR/smrsh
|
||||
Make install -C $OBJDIR/makemap
|
||||
|
||||
# install libraries
|
||||
install -m 644 $OBJDIR/libmilter/libmilter.a %{buildroot}%{_libdir}
|
||||
install -m 644 $OBJDIR/libsmutil/libsmutil.a %{buildroot}%{_libdir}
|
||||
install -m 644 $OBJDIR/libsm/libsm.a %{buildroot}%{_libdir}
|
||||
|
||||
%if "%{_lib}" == "lib64"
|
||||
# libmilter.a is 64 bit, not usable in /usr/lib for 32 bit build
|
||||
rm -fr %{buildroot}/usr/lib/libmilter.a
|
||||
%endif
|
||||
|
||||
# replace absolute with relative symlinks
|
||||
ln -sf ../sbin/makemap %{buildroot}%{_bindir}/makemap
|
||||
for f in hoststat mailq newaliases purgestat ; do
|
||||
@ -441,6 +453,10 @@ if [ $1 = 0 ]; then
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%post milter -p /sbin/ldconfig
|
||||
|
||||
%postun milter -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir %{_docdir}/sendmail-%{version}
|
||||
@ -526,9 +542,12 @@ exit 0
|
||||
%doc libmilter/docs/*
|
||||
%dir %{_includedir}/libmilter
|
||||
%{_includedir}/libmilter/*.h
|
||||
%{_libdir}/libmilter.a
|
||||
%{_libdir}/libsmutil.a
|
||||
%{_libdir}/libsm.a
|
||||
%{_libdir}/libmilter.so
|
||||
|
||||
%files milter
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libmilter.so.[0-9].[0-9]
|
||||
%{_libdir}/libmilter.so.[0-9].[0-9].[0-9]
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
@ -544,6 +563,11 @@ exit 0
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jan 20 2009 Miroslav Lichvar <mlichvar@redhat.com> 8.14.3-4
|
||||
- build shared libmilter (#309281)
|
||||
- drop static libraries
|
||||
- convert RELEASE_NOTES to UTF-8
|
||||
|
||||
* Fri Dec 19 2008 Miroslav Lichvar <mlichvar@redhat.com> 8.14.3-3
|
||||
- run newaliases only when necessary
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user