To RPM mporei na xrhsimopoih8ei gia na xtisete paketa gia Intel i386, Digital
Alpha poy trexoyn Linux kai se Sparc. Exei anafer8ei oti doyleuei epishs
kai se sta8mous ergasias SGI kai HP. Yparxoyn diafora xarakthristika poy kanoyn
to xtisimo twn paketwn eukolo se oles tis platformes. To prwto einai h
ntirektiba ``optflags'' sto /etc/rpmrc
. Mporei na xrhsimopoih8ei
gia na 8esete flags poy xrhsimopoiountai otan xtizete logismiko, se times poy
ejartwntai apo thn arxitektonikh toy systhmatos.
Allo ena xarakthristiko einai ta ``arch'' macros sto arxeio prodiagrafwn (spec file).
Mporoun na xrhsimopoih8oun gia na kanete diafora pragmata analoga me thn
arxitektonikh toy systhmatos sthn opoia to xtizete.
Allo ena xarakthristiko einai h ntirektiba ``Exclude'' sthn epikefalida (header).
To parakatw einai tmhma toy arxeioy prodiagrafwn (spec file) gia to paketo ``fileutils''. Einai ry8mismeno gia na xtizetai kai se Alpha kai se Intel.
Summary: GNU File Utilities
Name: fileutils
Version: 3.16
Release: 1
Copyright: GPL
Group: Utilities/File
Source0: prep.ai.mit.edu:/pub/gnu/fileutils-3.16.tar.gz
Source1: DIR_COLORS
Patch: fileutils-3.16-mktime.patch
%description
These are the GNU file management utilities. It includes programs
to copy, move, list, etc, files.
The ls program in this package now incorporates color ls!
%prep
%setup
%ifarch alpha
%patch -p1
autoconf
%endif
%build
configure --prefix=/usr --exec-prefix=/
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s
%install
rm -f /usr/info/fileutils*
make install
gzip -9nf /usr/info/fileutils*
.
.
.
Se ayto to paradeigma, mporeite na deite pws xrhsimopoieitai h ntirektiba ``optflags''
apo to /etc/rpmrc
. Analoga me to panw se poia arxitektonikh 8a xtisete,
dinete thn katallhlh timh sto RPM_OPT_FLAGS
. Prepei na kanete patch
to Makefile etsi wste to paketo sas na xrhsimopoiei ayth th metablhth anti twn
kanonikwn ntirektibwn poy 8a mporousate na xrhsimopoihsete (opws -m486
kai -O2
).
Mporeite na parete mia kalh idea gia to ti xreiazetai na kanete egka8istwntas to
phgaio kwdika toy paketoy kai aposympieste ton kwdika kai ejetaste to Makefile.
Koitajte tote to patch gia to Makefile kai deite ti allages prepei na kanete.
To %ifarch
macro einai polu shmantiko se ola ayta. Tis perissoteres fores
8a xreiastei na efarmosete ena-duo patch eidika gia mia sygkekrimenh arxitektonikh.
Se ayth thn periptwsh, to RPM 8a sas epitrecei na efarmosete ayto to patch se mia
arxitektonikh mono.
Sto parapanw paradeigma, to fileutils exei ena patch gia mhxanes 64 bit. Profanws,
ayto 8a prepei na efarmostei mono se Alpha gia thn wra. Etsi, pros8etoyme
ena %ifarch
macro gurw apo to 64 bit patch opws parakatw:
%ifarch axp
%patch1 -p1
%endif
Ayto ejasfalizei oti to patch de 8a efarmostei se opoiadhpote arxitektonikh ektos
apo alpha.
Gia na mporeite na synthreite paketa RPMs phgaioy kwdika se enan katalogo gia oles tis platformes, exoyme ylopoihsei thn ikanothta na "afaireite" paketa wste na mh xtistoun se sygkekrimenes arxitektonikes. Ayto ginetai wste na mporeite na kanete akomh pragmata opws
rpm --rebuild /usr/src/SRPMS/*.rpm
kai na xtisete ta swsta paketa. An den exete metaferei mia efarmogh se
mia sygkekrimenh platforma, to mono poy prepei na kanete einai na
pros8esete mia grammh san ayth :
ExcludeArch: axp
sthn epikefalida toy arxeioy prodiagrafwn toy paketoy me ton kwdika. Sth
synexeia, janaxtiste to paketo sthn platforma gia thn opoia proorizetai.
8a exete tote ena paketo phgaioy kwdika poy paizei se Intel kai mporei
eukola na metafer8ei se Alpha.
Synh8ws, einai eykolotero na xrhsimopoihsete RPM gia na ftiajete paketa gia pollaples -arxitektonikes apo to na parete to ka8e paketo jexwrista kai na to xtisete sta duo merh. Ka8ws polla apo ta megala paketa xtizontai, ayto ginetai eykolotero, parolayta. Opws panta, o kaluteros tropos gia na anazhthsete boh8eia otan kollhsete xtizontas ena RPM einai na deite ton kwdika enos paromoioy paketoy.