%define ver 20041111 %define rel 1.nvi %define name exim-conf %define eximcf /etc/exim %define distserver https://mta.org.ua/exim-4.0-conf/m4 %define do_recode 0 %if %{do_recode} %define locale ru_RU.UTF-8} %endif Summary: The files needed to reconfigure Exim. Name: %{name} Version: %{ver} Release: %{rel} URL: https://mta.org.ua/ Group: System Environment/Daemons License: GPL BuildRoot: %{_tmppath}/%{name}-root BuildPrereq: wget rsync sed %if %{do_recode} BuildPrereq: recode %endif Requires: m4 rsync Vendor: Victor Ustugov Packager: Nikolai V. Ivanyushin BuildArch: noarch Epoch: 99999 %description This package includes the configuration files you need to generate the exim.conf file distributed with the exim package. You will need the %{name} package if you ever need to reconfigure and rebuild your exim.conf file. %prep %__rm -rf %{name} %__mkdir %{name} cd %{name} %__mkdir m4 && cd m4 wget %{distserver}/Makefile %build cd %{name}/m4 %__make sync && %__make sync pre-install %install [ "$RPM_BUILD_ROOT" != "/" ] && %__rm -rf $RPM_BUILD_ROOT cd %{name} %__mkdir -p $RPM_BUILD_ROOT%{eximcf} %__cp -R ./* $RPM_BUILD_ROOT%{eximcf} # Fix perl path for i in $RPM_BUILD_ROOT%{eximcf}/perl/*.pl; do %{__sed} 's:^#!/usr/local/bin/perl:#!/usr/bin/perl:' <$i >$i.tmp %{__mv} $i.tmp $i %{__chmod} +x $i done # Change charset %if %{do_recode} for i in `find $RPM_BUILD_ROOT%{eximcf} -type f`; do LANG=%{locale} recode -f KOI8-R -t $i if echo $i|grep antivir_notification.txt; then %{__sed} 's:charset=koi8-r:charset=utf-8:' <$i >$i.tmp %{__mv} $i.tmp $i fi done %endif %clean [ "$RPM_BUILD_ROOT" != "/" ] && %__rm -rf $RPM_BUILD_ROOT %__rm -rf $RPM_BUILD_DIR/%{name} %files %defattr(-,root,root) %{eximcf}/acls %{eximcf}/bin %{eximcf}/deliveries %{eximcf}/features %{eximcf}/hacks %{eximcf}/m4 %{eximcf}/patches %{eximcf}/periodic %{eximcf}/perl %{eximcf}/redhat %{eximcf}/samples %config(missingok,noreplace) %{eximcf}/site/* %{eximcf}/system_filters %changelog * Thu Nov 11 2004 Nikolai V. Ivanyushin nvi - do_recode turned off by default * Mon Nov 8 2004 Nikolai V. Ivanyushin nvi - added %{eximcf}/redhat directory - some cosmetic changes * Sat Nov 6 2004 Nikolai V. Ivanyushin nvi - some cosmetic changes * Fri Nov 5 2004 Nikolai V. Ivanyushin nvi - %{eximcf}/site/* added to %%config files - added Epoch: 99999 * Wed Nov 3 2004 Nikolai V. Ivanyushin nvi - files converted from koi8-r to %{locale} - added define do_recode - recode added to BuildPrereq if defined do_recode * Tue Nov 2 2004 Nikolai V. Ivanyushin nvi - roll back to /etc/exim inspired by Victor Ustugov - changed name back to exim-conf thanx again Victor - added Vendor tag, cheers Victor ;-) * Mon Nov 1 2004 Nikolai V. Ivanyushin nvi - spec file changed to be in style of sendmail-cf rpm package - changed name to exim-cf - removed doc files - moved to /usr/share/exim-cf - added dependencies - fixed perl paths * Sun Oct 31 2004 Nikolai V. Ivanyushin nvi - first build