rpms/cyrus-imapd/F-10 cyrus-imapd.spec,1.48,1.49

Michal Hlavinka mhlavink at fedoraproject.org
Mon May 25 16:01:34 UTC 2009


Author: mhlavink

Update of /cvs/extras/rpms/cyrus-imapd/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8619

Modified Files:
	cyrus-imapd.spec 
Log Message:
spec cleanup



Index: cyrus-imapd.spec
===================================================================
RCS file: /cvs/extras/rpms/cyrus-imapd/F-10/cyrus-imapd.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- cyrus-imapd.spec	25 May 2009 15:29:06 -0000	1.48
+++ cyrus-imapd.spec	25 May 2009 16:01:04 -0000	1.49
@@ -8,67 +8,42 @@ Release: 1%{?dist}
 # rpm --rebuild --define='SEEN_DB skiplist' cyrus-imapd-2.x.x-x.src.rpm
 
 # use saslauth group
-%{!?SASLGROUP: %define SASLGROUP 1}
+%{!?SASLGROUP: %global SASLGROUP 1}
 # include deliver-wrapper
-%{!?DEL_WRAP: %define DEL_WRAP 0}
+%{!?DEL_WRAP: %global DEL_WRAP 0}
 # use preforking cyrus.conf
-%{!?PREFORK: %define PREFORK 1}
+%{!?PREFORK: %global PREFORK 1}
 # enable Netscape hack (recommended)
-%{!?NETSCAPEHACK: %define NETSCAPEHACK 1}
+%{!?NETSCAPEHACK: %global NETSCAPEHACK 1}
 # enable IMAP4 LIST extensions
-%{!?LISTEXT: %define LISTEXT 1}
+%{!?LISTEXT: %global LISTEXT 1}
 # enable IDLED support
-%{!?IDLED: %define IDLED 1}
+%{!?IDLED: %global IDLED 1}
 # enable SNMP support
-%{!?SNMP: %define SNMP 1}
+%{!?SNMP: %global SNMP 1}
 # force syncronous updates on ext3
-%{!?FORCESYNCEXT3: %define FORCESYNCEXT3 0}
+%{!?FORCESYNCEXT3: %global FORCESYNCEXT3 0}
 # include autocreate feature
-%{!?AUTOCREATE: %define AUTOCREATE 1}
+%{!?AUTOCREATE: %global AUTOCREATE 1}
 # don't check for RFC compliant line termination (bare newlines)
-%{!?NO_BARE_NL: %define NO_BARE_NL 0}
+%{!?NO_BARE_NL: %global NO_BARE_NL 0}
 # used syslog facility for logging
-%{!?SYSLOGFACILITY: %define SYSLOGFACILITY MAIL}
+%{!?SYSLOGFACILITY: %global SYSLOGFACILITY MAIL}
 # use -fpie for linking
-%{!?USEPIE: %define USEPIE 1}
+%{!?USEPIE: %global USEPIE 1}
 
 # ********************** BUILD TIME OPTIONS END ************************
 
-#%define _acversion 2.59
-%define _use_internal_dependency_generator 0
-#%define _rhver %(eval rpm -q --queryformat '%{VERSION}' $(rpm -qf /etc/redhat-release))
-#%define _rhrelease %(eval %{__cat} /etc/redhat-release)
 %define _dbver db4
-#%define _dbrpmver %(eval "rpm -q %{_dbver}")
 # Do we need the perl install hack for RedHat > 7.3 ?
 
 %define _perlhack 1
-#(eval [ %{_rhver} = "6.2" -o %{_rhver} = "7.0" -o %{_rhver} = "7.1" -o %{_rhver} = "7.2" -o %{_rhver} = "7.3" -o %{_rhver} = "2.1AS" -o %{_rhver} = "2.1ES" ] && echo 0 || echo 1)
-
-%define _perl_man3dir %(eval "$(perl -V:man3dir)"; echo $man3dir)
 
 %define _withldap 1
-#(eval "rpm -q --requires openldap | grep -q ^libsasl2 && echo 1 || echo 0")
 
 %define _snmpver net
-#(eval "rpm -q --quiet ucd-snmp && echo ucd || echo net")
-
-# Disable -debuginfo package generation
-#define debug_package %{nil}
-# Do we have filesystem >= 2.3.2 (new pki location) ?
-
-%define use_etc_pki 1
-#(eval [ $(rpm -q --queryformat '%{VERSION}' filesystem \| sed -e "s/\\.//g") -ge 232 ] && echo 1 || echo 0 )
-
-%if %{use_etc_pki}
-%define certs_dir %{_sysconfdir}/pki/tls/certs
-%define pki_dir %{_sysconfdir}/pki/%{name}
-%else
-%define certs_dir %{_datadir}/ssl/certs
-%define pki_dir %{_datadir}/ssl/certs
-%endif
 
-%define ssl_pem_file %{pki_dir}/%{name}.pem
+%define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem
 %define uid 76
 %if %{SASLGROUP}
 %define gid 76
@@ -142,7 +117,7 @@ Patch15: cyrus-imapd-2.3.1-make_md5_defa
 Patch18: cyrus-imapd-2.3.7-krb4.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=461875
 Patch19: cyrus-imapd-2.3.12p2-current-db.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: autoconf >= 2.59
 BuildRequires: cyrus-sasl-devel >= 2.1.15-1, perl-devel, tcp_wrappers
 BuildRequires: %{_dbver}-devel, openssl-devel, pkgconfig
@@ -192,7 +167,6 @@ recipients, SIEVE provides server side e
 %package devel
 Group: Development/Libraries
 Summary: Cyrus IMAP server development files
-#Requires: %{name} = %{version}-%{release}
 
 %description devel
 The %{name}-devel package contains header files and libraries
@@ -393,7 +367,7 @@ done
   %{buildroot}%{_vardata}/ptclient \
 %endif
   %{buildroot}%{_datadir}/%{name}/rpm \
-  %{buildroot}%{pki_dir} \
+  %{buildroot}%{_sysconfdir}/pki/%{name} \
   %{_contribdir}
 
 # Install additional files
@@ -444,13 +418,13 @@ mv %{buildroot}%{_mandir}/man8/pop3d.8 %
 
 # create the ghost pem file
 touch %{buildroot}%{ssl_pem_file}
-%if %{use_etc_pki}
+#TODO: check if this is still required
 # change config file so ssl certificates are under /etc rather than /usr/share
 %{__perl} -pi -e \
 's@/usr/share/ssl/certs/%{name}.pem@%{ssl_pem_file}@g; \
  s@/usr/share/ssl/certs/ca-bundle.crt@/etc/pki/tls/certs/ca-bundle.crt@' \
  %{buildroot}%{_sysconfdir}/imapd.conf
-%endif
+
 
 # Rename 'master' binary and manpage to avoid clash with postfix
 %{__mv} -f %{buildroot}%{_cyrexecdir}/master         %{buildroot}%{_cyrexecdir}/cyrus-master
@@ -536,24 +510,23 @@ fi
   fi
 %endif
 
-%if %{use_etc_pki}
+#TODO:check if this is still required
 # change existing config so ssl certificates are under /etc rather than /usr/share
 %{__perl} -pi -e \
 's@/usr/share/ssl/certs/%{name}.pem@%{ssl_pem_file}@g; \
  s@/usr/share/ssl/certs/ca-bundle.crt@/etc/pki/tls/certs/ca-bundle.crt@' \
  %{_sysconfdir}/imapd.conf
-%endif
 
 # Create SSL certificates
 exec > /dev/null 2> /dev/null
-%if %{use_etc_pki}
+#TODO: is this still required?
 # if the certificate is only in the old location, move it to the new location
 if [ -f %{_datadir}/ssl/certs/%{name}.pem -a ! -f %{ssl_pem_file} ]; then
 mv %{_datadir}/ssl/certs/%{name}.pem %{ssl_pem_file}
 fi
-%endif
+
 if [ ! -f %{ssl_pem_file} ]; then
-pushd %{certs_dir}
+pushd %{_sysconfdir}/pki/tls/certs
 umask 077
 %{__cat} << EOF | make %{name}.pem
 --
@@ -566,9 +539,7 @@ root at localhost.localdomain
 EOF
 %{__chown} root.%{_cyrusgroup} %{name}.pem
 %{__chmod} 640 %{name}.pem
-%if %{use_etc_pki}
 mv %{name}.pem %{ssl_pem_file}
-%endif
 popd
 fi
 
@@ -751,9 +722,7 @@ fi
 %{_mandir}/man8/*
 %doc COPYRIGHT README
 %doc doc/*
-%if %{use_etc_pki}
-%dir %{pki_dir}
-%endif
+%dir %{_sysconfdir}/pki/%{name}
 %attr(0640,root,%{_cyrusgroup}) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{ssl_pem_file}
 
 %files devel




More information about the fedora-extras-commits mailing list