Further cleanips, closer to a clean build

This commit is contained in:
Jason Tibbitts 2016-11-23 01:31:03 -06:00
parent 43a6d440d6
commit f3be05b9b0

View File

@ -37,7 +37,7 @@ BuildRequires: pkgconfig tcp_wrappers transfig
BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) perl(Pod::Html)
BuildRequires: cyrus-sasl-devel jansson-devel krb5-devel
BuildRequires: cyrus-sasl-devel glib2-devel jansson-devel krb5-devel
BuildRequires: libical-devel libxml2-devel net-snmp-devel openldap-devel
BuildRequires: openssl-devel sqlite-devel
@ -153,7 +153,9 @@ autoreconf -vi
%make_build
# This isn't built by default, but this package has always installed it.
make -C notifyd notifytest
make notifyd/notifytest
make -C tools/vzic
#make -C man -f Makefile.dist
#make -C doc -f Makefile.dist
@ -163,7 +165,7 @@ make -C notifyd notifytest
echo AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
make install DESTDIR=%buildroot
# Install some additional binaryes
# Install some additional binaries
# Create directories
install -d \
@ -175,9 +177,6 @@ install -d \
%buildroot/%_datadir/%name/rpm \
%buildroot/etc/pki/%name
echo BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
ls -lR %buildroot
# This is needed to install the perl files correctly
#pushd perl/imap
# perl Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
@ -187,15 +186,21 @@ ls -lR %buildroot
#popd
# Do what the regular make install does
make install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
make -C man install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
#make install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
#make -C man install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
# Some tools which aren't installed by the makefile which we want
install -m 755 notifyd/notifytest %buildroot%_bindir/
install -m 755 perl/imap/cyradm %buildroot%_bindir/
for i in arbitronsort.pl convert-sieve.pl dohash masssievec \
migrate-metadata mkimap mknewsgroups mupdate-loadgen.pl \
rehash translatesieve undohash upgradesieve; do
install -m 755 tools/$i %buildroot/%cyrexecdir/
done
# Install tools
for tool in tools/* ; do
test -f ${tool} && install -m 755 ${tool} %{buildroot}%{cyrexecdir}/
for i in vzic vzic-test.pl vzic-merge.pl vzic-dump.pl; do
install -m 755 tools/vzic/$i %buildroot/%cyrexecdir/
done
# Install additional files
@ -242,15 +247,15 @@ install -m 644 master/conf/*.conf doc/conf/
echo sieve_version=2.2.3 ) | sort > %{buildroot}%{_datadir}/%{name}/rpm/db.cfg
# create the ghost pem file
touch %{buildroot}%{ssl_pem_file}
touch %buildroot/%ssl_pem_file
# Rename 'master' binary and manpage to avoid clash with postfix
mv -f %{buildroot}%{cyrexecdir}/master %{buildroot}%{cyrexecdir}/cyrus-master
mv -f %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/cyrus-master.8
mv %buildroot/%cyrexecdir/master %buildroot/%cyrexecdir/cyrus-master
mv %buildroot/%_mandir/man8/master.8 %buildroot/%_mandir/man8/cyrus-master.8
# Rename 'fetchnews' binary and manpage to avoid clash with leafnode
mv -f %{buildroot}%{cyrexecdir}/fetchnews %{buildroot}%{cyrexecdir}/cyrfetchnews
mv -f %{buildroot}%{_mandir}/man8/fetchnews.8 %{buildroot}%{_mandir}/man8/cyrfetchnews.8
mv %buildroot/%cyrexecdir/fetchnews %buildroot/%cyrexecdir/cyrfetchnews
mv %buildroot/%_mandir/man8/fetchnews.8 %buildroot/%_mandir/man8/cyrfetchnews.8
perl -pi -e 's|fetchnews|cyrfetchnews|g;s|Fetchnews|Cyrfetchnews|g;s/FETCHNEWS/CYRFETCHNEWS/g' \
%{buildroot}%{_mandir}/man8/cyrfetchnews.8
@ -261,14 +266,10 @@ do
done
# Remove installed but not packaged files
rm -f %{buildroot}%{cyrexecdir}/not-mkdep
rm -f %{buildroot}%{cyrexecdir}/config2header*
rm -f %{buildroot}%{cyrexecdir}/config2man
rm -f %{buildroot}%{cyrexecdir}/pop3proxyd
find %{buildroot} -name "perllocal.pod" -exec rm -f {} \;
find %{buildroot} -name ".packlist" -exec rm -f {} \;
rm -f %{buildroot}%{_mandir}/man8/syncnews.8*
find %{buildroot}%{perl_vendorarch} -name "*.bs" -exec rm -f {} \;
rm %{buildroot}%{cyrexecdir}/pop3proxyd
find %{buildroot} -name "perllocal.pod" -exec rm {} \;
find %{buildroot} -name ".packlist" -exec rm {} \;
#find %{buildroot}%{perl_vendorarch} -name "*.bs" -exec rm {} \;
%pre
@ -317,7 +318,7 @@ fi
%systemd_postun_with_restart cyrus-imapd.service
%files
%license COPYRIGHT
%license COPYING
%doc README doc/*
%config(noreplace) /etc/cyrus.conf
%config(noreplace) /etc/imapd.conf
@ -417,7 +418,6 @@ fi
%files devel
%{_includedir}/cyrus
%{_libdir}/lib*.a
%{_mandir}/man3/imclient.3*
%files utils
@ -449,6 +449,9 @@ fi
%{_mandir}/man1/*
%changelog
* Wed Nov 23 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.5.10-1
- Initial update to the 2.5 series.
* Tue May 17 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.4.18-3
- Perl 5.24 rebuild