# # The macro rpmdbname should be # "redhat" for the distribution cdrom (note: not the vendor!) # "powertools" for the powertools cdrom # etc # You'll need to check the other macros too. # # #%dontdefine rpmdbname redhat #%dontdefine rpmdbversion 6.1 #%dontdefine rpmdbtree /mnt/somewhere %define default SL %define rpmdbname SL %define rpmmarketingname "Scientific Linux" %define rpmdbversion 48 %define rpmdbtree /mnt/src/scientific/40rolling # This hack is needed for building alternative platform databases # on a single architecture using rpm's --target flag %define _arch %{_target_cpu} %define rpmdbdistribution %{rpmmarketingname} %{rpmdbname}-%{rpmdbversion} %define rpmdbplatform %{_arch}-%{_vendor}-%{_os} %define rpmdbpath /usr/lib/rpmdb/%{rpmdbplatform}/%{rpmdbname} Summary: The entire rpm database for the %{rpmmarketingname} distribution. Name: rpmdb-%{rpmdbname} Version: %{rpmdbversion} Release: 0.%(date +"%%Y%m%d") Group: Development/System Copyright: GPL BuildRoot: /%{_tmppath}/%{name}-%{version}-%{release}-root %description The %{name} package contains a copy of the rpm database for all packages from the %{rpmmarketingname} distribution. %prep [ -d %{rpmdbtree} ] || { echo "This specfile needs access to %{rpmdbtree}/%{_arch}/%{rpmdbname}/RPMS" exit 1 } %build %install rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}%{rpmdbpath} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm cat > ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm/macros.solve < /dev/null 2>&1 || : %preun rm -f %{rpmdbpath}/__db* > /dev/null 2>&1 || : %files %defattr(0644,root,root,0755) %{rpmdbpath} %{_sysconfdir}/rpm/macros.solve %changelog * Wed Apr 7 2004 Connie Sieh - Changed so that it looks in both $default/RPMS and sites//Updates * Wed Jan 15 2003 Tim Powers - remove stale db lock files if they exist in %%post and %%preun * Fri Sep 24 1999 Jeff Johnson - rpm db build needed --notriggers. * Wed Sep 22 1999 Jeff Johnson - Create.