Re: [Sugar-devel] Automake-fu question
On Sun, Feb 21, 2010 at 8:40 PM, Tomeu Vizoso wrote: > On Fri, Feb 19, 2010 at 19:47, Andrés Ambrois wrote: >> Hello list! >> >> To provide mobile-broadband-provider-info support for the 3G feature, I need >> to parse some system files, namely /usr/share/zoneinfo/iso3166.tab and >> /usr/share/mobile-broadband-provider-info/serviceproviders.xml. In order for >> packagers to override those locations I created a config.py.in file that >> looks >> like this: >> >> PROVIDERS_PATH = "@prefix@/share/mobile-broadband-provider- >> info/serviceproviders.xml" >> PROVIDERS_FORMAT_SUPPORTED = "2.0" >> COUNTRY_CODES_PATH = "@prefix@/share/zoneinfo/iso3166.tab" >> >> Which is then converted by a make rule in Makefile.am into config.py. I >> understand this is the recommended approach when using autotools [0]. >> >> One of the problems is that this breaks jhbuild, because it uses >> --prefix=/path/to/jhbuild/install. The other is that by default @prefix@ >> expands >> to /usr/local/, which is not the usual location for these files. >> >> The full patch is [1], if you're interested. > > Hmm, as we want to know where the packages that provide those files > were installed, and not where is Sugar installed, I think @prefix@ is > not what we want here. > > The best I can think right now is harcoding to the /usr prefix, or > adding a configure switch for each. Unless we can get those paths from > a .pc file, which would be the ideal but I don't think it's likely. > > What do other packages that consume those files? > I think pkg-config would be right solution here (the package iso-codes-devel provides the relevant .pc file which contains the prefix) -sdg- -- Sayamindu Dasgupta [http://sayamindu.randomink.org/ramblings] ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Automake-fu question
On Fri, Feb 19, 2010 at 19:47, Andrés Ambrois wrote: > Hello list! > > To provide mobile-broadband-provider-info support for the 3G feature, I need > to parse some system files, namely /usr/share/zoneinfo/iso3166.tab and > /usr/share/mobile-broadband-provider-info/serviceproviders.xml. In order for > packagers to override those locations I created a config.py.in file that looks > like this: > > PROVIDERS_PATH = "@prefix@/share/mobile-broadband-provider- > info/serviceproviders.xml" > PROVIDERS_FORMAT_SUPPORTED = "2.0" > COUNTRY_CODES_PATH = "@prefix@/share/zoneinfo/iso3166.tab" > > Which is then converted by a make rule in Makefile.am into config.py. I > understand this is the recommended approach when using autotools [0]. > > One of the problems is that this breaks jhbuild, because it uses > --prefix=/path/to/jhbuild/install. The other is that by default @prefix@ > expands > to /usr/local/, which is not the usual location for these files. > > The full patch is [1], if you're interested. Hmm, as we want to know where the packages that provide those files were installed, and not where is Sugar installed, I think @prefix@ is not what we want here. The best I can think right now is harcoding to the /usr prefix, or adding a configure switch for each. Unless we can get those paths from a .pc file, which would be the ideal but I don't think it's likely. What do other packages that consume those files? Regards, Tomeu > Cheers! > > [0] http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation- > Directory-Variables > [1] http://bugs.sugarlabs.org/ticket/1630 > -- > -Andrés > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Automake-fu question
Hello list! To provide mobile-broadband-provider-info support for the 3G feature, I need to parse some system files, namely /usr/share/zoneinfo/iso3166.tab and /usr/share/mobile-broadband-provider-info/serviceproviders.xml. In order for packagers to override those locations I created a config.py.in file that looks like this: PROVIDERS_PATH = "@prefix@/share/mobile-broadband-provider- info/serviceproviders.xml" PROVIDERS_FORMAT_SUPPORTED = "2.0" COUNTRY_CODES_PATH = "@prefix@/share/zoneinfo/iso3166.tab" Which is then converted by a make rule in Makefile.am into config.py. I understand this is the recommended approach when using autotools [0]. One of the problems is that this breaks jhbuild, because it uses --prefix=/path/to/jhbuild/install. The other is that by default @prefix@ expands to /usr/local/, which is not the usual location for these files. The full patch is [1], if you're interested. Cheers! [0] http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation- Directory-Variables [1] http://bugs.sugarlabs.org/ticket/1630 -- -Andrés ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel