On Tue, Jul 13, 2004 at 06:37:02PM +0200, Andrea Riciputi wrote: > Hi, > I'm trying to modify some of the packages that I maintain in order to > use the "variant" feature. Mostly all my packages consist in Python > modules that always have come in two flawors (-py22, -py23). > > 1) Is the following naming scheme correct? > Info2: << > Package: module_name-py%%type_pkg[python]
Spurious doubled percent. Should be: Package: module_name-py%type_pkg[python] > Type: python (2.2, 2.3) The subtype list is space-separated: Type: python(2.2 2.3) > Version: xxxx > Revision: x > << > > 2) Some of the packages need patch files where I change path according > to the Python's flawor: > > - glob.glob(os.path.join(sys.prefix, "share", "pyx", "*.lfs")) > + glob.glob(os.path.join(sys.prefix, "share", "pyx-py23", "*.lfs")) + > > How can I fix this in order to work correctly with the variants?? As you see from the Package field, the python flavor is available as a percent-expansion, so you can just write a little PatchScript. If you've got to change a big .patch with the flavor in many places, you could put something like @PYTHON_FLAVOR@ in the patchfile and then sed 's|@PYTHON_FLAVOR@|%type_pkg[python]|' < %a/%{ni}.patch or else apply the patchfile (if any) normally and then use a bit of perl to change "pyx" to "pyx-py%type_pkg[python]". > 3) From the documentation I've seen examples like this: > > >Depends: (%type_raw[-x11] = -x11) x11 > > How can I check against the "no-x11" variants? I can imagine that > something like this: > > Depends: (%type_raw[-x11] != -x11) something_else_dependency > > will do the trick? Right? According to the description of the "Depends" field in the Packaging Manual, != is correct. Once you have compiled a package, you can: dpkg-deb --field /sw/fink/debs/%n_%v-%r_darwin-powerpc.deb depends to see how the Depends in your .info was interpretted. dan -- Daniel Macks [EMAIL PROTECTED] http://www.netspace.org/~dmacks ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel