[cyrus-imapd/f16] make this spec compatible with epel
Michal Hlavinka
mhlavink at fedoraproject.org
Fri Nov 25 12:49:44 UTC 2011
commit d31c56d84342ec3a23fc90788e38191426e5c523
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Fri Nov 25 13:49:37 2011 +0100
make this spec compatible with epel
cyrus-imapd.cvt_cyrusdb_all | 3 ---
cyrus-imapd.spec | 20 ++++++++++++++++++--
2 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/cyrus-imapd.cvt_cyrusdb_all b/cyrus-imapd.cvt_cyrusdb_all
index a62a069..5a5227d 100644
--- a/cyrus-imapd.cvt_cyrusdb_all
+++ b/cyrus-imapd.cvt_cyrusdb_all
@@ -133,9 +133,6 @@ PIDFILE=/var/run/cyrus-master${INSTANCE}.pid
CYRUSCONF=/etc/cyrus${INSTANCE}.conf
IMAPDCONF=/etc/imapd${INSTANCE}.conf
-#only for Fedora 15:
-export PATH="/usr/lib/cyrus-imapd/libdb-utils/:$PATH"
-
# make sure what we have is a valid instance
# and that config files are present
if [ -n "$INSTANCE" ]; then
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec
index d39baa3..2d63f0c 100644
--- a/cyrus-imapd.spec
+++ b/cyrus-imapd.spec
@@ -1,6 +1,6 @@
Name: cyrus-imapd
Version: 2.4.12
-Release: 2%{?dist}
+Release: 3%{?dist}
%define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem
@@ -32,7 +32,7 @@ Source11: README.rpm
Source12: cyrus-imapd.service
Source13: cyr_systemd_helper
-
+%if %{?rhel}0 < 7
#temporary(Fedora 15 and 16), to workaround broken update of db4->libdb in sendmail->cyrus-sasl->%{name}
#ok, we need libdb-utils, but it can't be installed, because it conflicts with db4-utils (rpm pulls it in)
#so we keep libdb-utils content in /usr/lib/cyrus-imapd/libdb-utils/ but we have to get it somehow during build process
@@ -40,6 +40,9 @@ Source13: cyr_systemd_helper
#and yumdownloader,koji download,lftp,wget... nothing works in mock build
Source101: libdb-utils.i386.cpio
Source102: libdb-utils.x86_64.cpio
+%else
+Requires: libdb-utils
+%endif
# inclusion requested:
# http://bugzilla.cyrusimap.org/bugzilla3/show_bug.cgi?id=3182
@@ -200,6 +203,8 @@ make -C notifyd notifytest
%install
rm -rf %{buildroot}
+
+%if %{?rhel}0 < 7
#temporary, install our own copy of libdb-utils
mkdir -p %{buildroot}/%{_cyrexecdir}/libdb-utils/
cp %{_sourcedir}/libdb-utils.%{_arch}.cpio %{buildroot}/%{_cyrexecdir}/libdb-utils/
@@ -208,6 +213,7 @@ cpio -idv '*/usr/bin/*' <libdb-utils.%{_arch}.cpio
mv usr/bin/* .
rm -rf usr
popd
+%endif
# This is needed to install the perl files correctly
pushd perl/imap
@@ -243,6 +249,9 @@ install -d \
# Install additional files
install -m 755 %{SOURCE8} %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all
+%if %{?rhel}0 < 7
+sed -i '2i export PATH="/usr/lib/cyrus-imapd/libdb-utils/:$PATH"' %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all
+%endif
install -m 644 %{SOURCE9} %{buildroot}%{_datadir}/%{name}/rpm/magic
install -p -m 644 master/conf/prefork.conf %{buildroot}%{_sysconfdir}/cyrus.conf
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/imapd.conf
@@ -389,7 +398,11 @@ fi
%{_sysconfdir}/cron.daily/%{name}
/lib/systemd/system/cyrus-imapd.service
%dir %{_cyrexecdir}
+
+%if %{?rhel}0 < 7
%{_cyrexecdir}/libdb-utils
+%endif
+
%{_cyrexecdir}/cyr_systemd_helper
%{_cyrexecdir}/arbitron
%{_cyrexecdir}/arbitronsort.pl
@@ -509,6 +522,9 @@ fi
%{_mandir}/man1/*
%changelog
+* Fri Nov 25 2011 Michal Hlavinka <mhlavink at redhat.com> - 2.4.12-3
+- make this spec compatible with epel
+
* Wed Nov 23 2011 Michal Hlavinka <mhlavink at redhat.com> - 2.4.12-2
- reduce noisy logging, add option to turn on LOG_DEBUG syslog
messages again (thanks Philip Prindeville) (#754940)
More information about the scm-commits
mailing list