On Thu, 2008-04-03 at 09:17 +0530, S h i v wrote: > I have copied desktop-discuss where most pkgtool/pkgbuild users are > present so that they can add to my response where necessary. > > On Wed, Apr 2, 2008 at 7:46 PM, Orvar Korvar > <knatte_fnatte_tjatte at yahoo.com> wrote: > > If we look at the content of SFEwine.spec we see: > > > > > > BuildRequires: SUNWgnome-camera-devel > > Requires: SUNWgnome-camera > > Requires: SUNWhal > > BuildRequires: SUNWdbus-devel > > Requires: SUNWdbus > > Requires: SUNWxorg-clientlibs > > BuildRequires: SFEfontforge-devel > > Requires: SFEfontforge > > BuildRequires: SFEfreetype-devel > > Requires: SFEfreetype > > BuildRequires: SFElcms-devel > > Requires: SFElcms > > BuildRequires: SFEcups-devel > > Requires: SFEcups > > BuildRequires: SFEncurses-devel > > Requires: SFEncurses > > > > > > Hence, SFEcups is required. But it isnt listed on the command line I am > > using. I should list it in the build list. > > > > > > My question is, which should I list first? I understand SFEwine.spec > > should be listed last on the line? SFEfontforge-devel.spec is not listed > > either in my command, but it isnt necessary. Only SFEfontforge.spec is > > necessary. What is the rules? Which to list, and not to list? Which should > > be listed first, and which would be listed last? Some packages depend upon > > some other, should I list other first then? How do I find out the package > > dependencies? > > > > In summary; what is the syntax for building SFEwine.spec? Which command > > should I use? > > > > Well, that is not the logical summary, since syntax is not the solution :) > > I provide below some details which might be of help. > > [1] Regarding "Requires" & "BuildRequires" > If package A has dependency information as below: > Requires: B > BuildRequires: C-devel > Requires: C > BuildRequires: D-devel > Requires: D > > This means, if someone provides you with a binary package A.pkg, then > you need B,C & D to be able to install and use A.pkg > If you want to build/create package A.pkg, then in addition to B, C & > D you need C-devel and D-devel. > > [2] Which spec file provides C-devel.pkg > You will not find exactly one spec file for every package. This is > because a spec file can deliver more than one package. > For ex: C.spec may deliver one or more of below packages > C.pkg the base package often required to satisfy dependency for > using C. This is required to "use A" > C-devel.pkg the package that contains development interfaces (ex: > header files). This is required to "build A" > C-i10n.pkg localization package containing files for additional > language support > C-doc.pkg documentation package containing man pages, html pages, etc. > ...... > > So if you need SFEfontforge-devel then you should look for the spec > file that delivers it. In this case it is SFEfontforge.spec > > [3] Order for specifying the spec files commands. > This is actually the easier part. > > I *think* if you specify all the required spec files in a single > pkgtool command, then pkgtool takes care of identify the dependency > and handles it in the required order. > > In the example above, you may specify it as: > > pkgtool --download build-install B.spec C.spec D.spec OR > pkgtool --download build-install C.spec D.spec B.spec OR > ....any other order > pkgtool goes through the spec files, identifies what should be the > order and handles it for you. > > If you do it one package at a time manually, then the approach is, > [a] A depends on B so you need to install B. > [b] Now go to B.spec and identify if its dependency is satisfied. If > yes, build and install it. If its spec instead says B "Requires" C, > then go to C.spec file > [c].........move down the dependency path till you reach the package > which doesn't have any other dependency or already has the > dependencies satisfied AND > work upwards. > > So holding a pen and paper you should figure out the dependency after > going through the spec files for each of the package :) > In my example if you see below information, > A->B, A-C, A->C-devel, A->D, A->D-devel > C->D, C->B > B->D, D-devel > then, > build-install D first, then B, then C and finally A > > If there is a situation B "Requires" C and C 'Requires" B, then it is > a circular dependency which should not occur. (this typically occurs > only at the lowest level of dependency where libc needs gcc-libs(or > any other compiler libs) and vice-versa. > > -Shiv
Shiv, that was an excellent write-up of SFE conventions. laca, could a derivative of this be posted on the SFE web page? Orvar, did you check out your spec files from SFE's Subversion repository? You might want to update, as the current version of SFEwine.spec is 0.9.58 and has an additional dependency. -Albert
