rpms/tmda/FC-6 tmda.spec,1.5,1.6
Bernard Johnson (bjohnson)
fedora-extras-commits at redhat.com
Fri Apr 6 07:12:49 UTC 2007
Author: bjohnson
Update of /cvs/extras/rpms/tmda/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25233/FC-6
Modified Files:
tmda.spec
Log Message:
- remove specific python requires since all currently supported pythons are
good enough
- conditionally bytecompile when building for EL-4
Index: tmda.spec
===================================================================
RCS file: /cvs/extras/rpms/tmda/FC-6/tmda.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tmda.spec 1 Mar 2007 08:47:16 -0000 1.5
+++ tmda.spec 6 Apr 2007 07:12:15 -0000 1.6
@@ -18,9 +18,9 @@
BuildArch: noarch
-BuildRequires: python-devel >= 2.3
+BuildRequires: python-devel
-Requires: python >= 2.3
+Requires: python
%description
TMDA is an open source anti-spam system and local mail delivery agent.
@@ -36,12 +36,15 @@
do
sed '1,1s|/usr/bin/env python|%{__python}|g' $i > $i.tmp && mv $i.tmp $i && chmod 0755 $i
done
+
# remove x bits from all files in contrib as they will be used in %%doc
find contrib -type f -print | xargs chmod a-x
+
# fix dos eol problems on some documents
for file in doc/html/attachments/{TmdaFingerprint/tmda-fingerprint,TmdaPostfixPolicy/tmda-postfix-policy.sh}; do
sed -i 's/\r//' $file
done
+
# zero byte file but not used or linkd
rm -f doc/html/error.log
@@ -73,6 +76,28 @@
install -p -m 0755 contrib/tofmipd.init $RPM_BUILD_ROOT/%{_initrddir}/tofmipd
install -p -m 0644 contrib/tofmipd.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/tofmipd
+
+%if 0%{?rhel} && "%rhel" < "5"
+# Conditionally bytecompile if compiling for EL-4 since it does not have
+# a brp-python-bytecompile - this is essentially ripped off from the FC-6
+# /usr/lib/brp-python-bytecompile script
+
+# Figure out how deep we need to descend. We could pick an insanely high
+# number and hope it's enough, but somewhere, somebody's sure to run into it.
+
+depth=`(find $RPM_BUILD_ROOT -type f -name "*.py" -print0 ; echo /) | \
+ xargs -0 -n 1 dirname | sed 's,[^/],,g' | sort -u | tail -n 1 | wc -c`
+if [ -z "$depth" -o "$depth" -le "1" ]; then
+ exit 0
+fi
+
+# Generate normal (.pyc) byte-compiled files.
+%{__python} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1)' > /dev/null
+
+# Generate optimized (.pyo) byte-compiled files.
+%{__python} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1)' > /dev/null
+
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -106,9 +131,9 @@
%package ofmipd
Summary: Tagged Message Delivery Agent - ofmipd server
Group: System Environment/Daemons
-Requires: tmda = %{version}-%{release}
Url: http://www.tmda.net/tmda-ofmipd.html
+Requires: tmda = %{version}-%{release}
Requires : initscripts
Requires(post): /sbin/chkconfig
Requires(preun):/sbin/chkconfig
@@ -156,6 +181,10 @@
%changelog
+* Fri Apr 06 2007 Bernard Johnson <bjohnson at symetrix.com> 1.1.11-3
+- remove versioned python dependencies, no supported python is unsupported
+- if compiling for EL-4, compile python since there is no brp-python-bytecompile
+
* Thu Mar 01 2007 Bernard Johnson <bjohnson at symetrix.com> 1.1.11-2
- fix source0 line
More information about the scm-commits
mailing list