Re: Detecting Postgres version during build

2012-03-07 Thread Tom Lane
Well, what you need to build against is Postgres 9.1.x, because that is what is in current Fedora releases. I think you should just do -DPG91 and be done with it. You could BuildRequire postgresql-devel >= 9.1.0 if that makes you feel better. regards, tom lane -- devel m

Re: Detecting Postgres version during build

2012-03-07 Thread Tom Hughes
On 07/03/12 10:45, Gianluca Sforna wrote: On Wed, Mar 7, 2012 at 11:32 AM, Tom Hughes wrote: It might be worth looking at how something like the postgis package handles this, as it also contains a Postgres extension. Yeah. useful: http://pkgs.fedoraproject.org/gitweb/?p=postgis.git;a=blob;f=

Re: Detecting Postgres version during build

2012-03-07 Thread Gianluca Sforna
On Wed, Mar 7, 2012 at 11:32 AM, Tom Hughes wrote: > It might be worth looking at how something like the postgis package handles > this, as it also contains a Postgres extension. Yeah. useful: http://pkgs.fedoraproject.org/gitweb/?p=postgis.git;a=blob;f=postgis.spec;h=53c558366da23ea5afdec41331b3

Re: Detecting Postgres version during build

2012-03-07 Thread Tom Hughes
On 07/03/12 10:22, Gianluca Sforna wrote: I am not sure this is going to work (at least in the present case): the package includes some SQL code along with a shared object that pgsql server runs to provide the chemical functions. AFAICT setting this up is completely server side (see http://code.

Re: Detecting Postgres version during build

2012-03-07 Thread Gianluca Sforna
Hi Richard, I'll add some more context. The package I'm preparing is for rdkit (http://rdkit.org), a cheminformatic software with several components (a library, python bindings, and Postgres chemical cartridge). The current files I'm working on are here: http://giallu.fedorapeople.org/rdkit.spec

Re: Detecting Postgres version during build

2012-03-06 Thread Richard W.M. Jones
On Tue, Mar 06, 2012 at 01:13:24AM +0100, Gianluca Sforna wrote: > I am trying to build a package that provides a Postegres cartridge > compatible with 8.x and 9.x. Unfortunately the cartridge related files > are not installed in the same path for both version so I am looking > for a way to query t

Detecting Postgres version during build

2012-03-05 Thread Gianluca Sforna
I am trying to build a package that provides a Postegres cartridge compatible with 8.x and 9.x. Unfortunately the cartridge related files are not installed in the same path for both version so I am looking for a way to query the version against I'm building and pick the correct path. Is there any