# # 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 6.2 %define rpmdbtree /mnt/master/rh62 # 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 distribuci Red Hat Linuxu 6.2 CZ Name: rpmdb-%{rpmdbname} Version: %{rpmdbversion} Release: 0.%(date +"%%Y%m%d")cz 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 %{rpmdbdistribution} distribution. %description -l cs Balíček rpmdb-redhat obsahuje databázi všech balíčků aktuální distribuce Red Hat Linuxu. %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}" $MYRPM --initdb if [ -d %{rpmdbtree}/RedHat/RPMS ]; then cd %{rpmdbtree}/RedHat/RPMS elif [ -d %{rpmdbtree} ]; then cd %{rpmdbtree} else exit 1 fi $MYRPM -i --ignoresize --justdb --nodeps --noorder --ignorearch --noscripts --notriggers --ignoresize --force *.rpm %clean rm -rf $RPM_BUILD_ROOT %files %defattr(0644,root,root,0755) %{rpmdbpath} %changelog * Fri Sep 24 1999 Jeff Johnson - rpm db build needed --notriggers. * Wed Sep 22 1999 Jeff Johnson - Create.