# # 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. # # %define rpmdbname redhat %define rpmdbversion 7.0 %define rpmdbtree /mnt/master/in-one # This hack is needed for building alternative platform databases # on a single architecture using rpm's --target flag %define _arch %{_target_cpu} %define rpmdbdistribution Red Hat %{rpmdbname}-%{rpmdbversion} %define rpmdbplatform %{_arch}-%{_vendor}-%{_os} %define rpmdbpath /usr/lib/rpmdb/%{rpmdbplatform}/%{rpmdbname} Summary: The entire rpm database for the %{rpmdbdistribution} distribution. Summary(cs): Databáze všech balíčků v Red Hat Linuxu %{rpmdbversion}. Name: rpmdb-%{rpmdbname} Version: %{rpmdbversion} Release: 0.%(date +"%%Y%m%d") Group: Development/System Group(cs): Vývojové prostředky/Systém Copyright: GPL BuildRoot: /%{_tmppath}/%{name}-%{version}-%{release}-root %description The %{name} package contains a copy of the rpm database for all packages from the %{rpmdbdistribution} distribution. %prep [ -d %{rpmdbtree} ] || { echo "This specfile needs access to %{rpmdbtree}/%{_arch}/Redhat/RPMS" exit 1 } %build %install rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}%{rpmdbpath} MYRPM="rpm --dbpath ${RPM_BUILD_ROOT}%{rpmdbpath}" %if %{_dbapi} MYRPM="$MYRPM --define \"_dbapi %{_dbapi}\"" %endif eval "$MYRPM --initdb" if [ -d %{rpmdbtree}/%{_arch}/RedHat/RPMS ]; then cd %{rpmdbtree}/%{_arch}/RedHat/RPMS elif [ -d %{rpmdbtree}/%{_arch} ]; then cd %{rpmdbtree}/%{_arch} else exit 1 fi if [ -d %{rpmdbtree}/%{_arch}/RedHat/RPMS ]; then eval "$MYRPM -i --justdb --nodeps --noorder --ignorearch --noscripts --notriggers --ignoresize --force *{%{_arch},noarch}.rpm" else eval "$MYRPM -i --justdb --nodeps --noorder --ignorearch --noscripts --notriggers --ignoresize --force *{%{_arch},noarch}.rpm ../noarch/*.rpm" fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(0644,root,root,0755) %{rpmdbpath} %changelog * Wed Dec 6 2000 Milan Kerslager - rebuild for 7.0 CZ * Fri Sep 24 1999 Jeff Johnson - rpm db build needed --notriggers. * Wed Sep 22 1999 Jeff Johnson - Create.