From 7efac2c8cc221a2ee5145b6806a4f0886418ae4d Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 26 Nov 2007 12:48:14 +0000 Subject: [PATCH] review policy for building our pycurl/psycopg2 or not - based on fedora distrib --- Makefile | 23 ++++++++++++----------- PLCAPI.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 6eba7ee6..2fc4409a 100644 --- a/Makefile +++ b/Makefile @@ -11,17 +11,18 @@ init := PLC/__init__.py PLC/Methods/__init__.py # Python modules -modules := psycopg2 - -# Temporarily until we can kill the Fedora Core 2 build -curl_vernum := $(shell printf %d 0x$(shell curl-config --vernum)) -pycurl_vernum := $(shell printf %d 0x070d01) # 7.13.1 -pycurl_incompatnum := $(shell printf %d 0x071000) # 7.16.0 -ifeq ($(shell test $(curl_vernum) -ge $(pycurl_vernum) && echo 1),1) -ifeq ($(shell test $(curl_vernum) -ge $(pycurl_incompatnum) && echo 0),1) -modules += pycurl -endif -endif +# see PLCAPI.spec for the settings of modules +# default is : no extra module get built + +## Temporarily until we can kill the Fedora Core 2 build +#curl_vernum := $(shell printf %d 0x$(shell curl-config --vernum)) +#pycurl_vernum := $(shell printf %d 0x070d01) # 7.13.1 +#pycurl_incompatnum := $(shell printf %d 0x071000) # 7.16.0 +#ifeq ($(shell test $(curl_vernum) -ge $(pycurl_vernum) && echo 1),1) +#ifeq ($(shell test $(curl_vernum) -ge $(pycurl_incompatnum) && echo 0),1) +#modules += pycurl +#endif +#endif modules-install := $(foreach module, $(modules), $(module)-install) modules-clean := $(foreach module, $(modules), $(module)-clean) diff --git a/PLCAPI.spec b/PLCAPI.spec index 02ab40ba..84d04a35 100644 --- a/PLCAPI.spec +++ b/PLCAPI.spec @@ -55,8 +55,15 @@ through Apache mod_python. %setup -q %build +# python-pycurl and python-psycopg2 avail. from fedora 5 +# make sure to check myplc/-plc.lst +if [ "%{distrorelease}" -le 4 ] ; then + modules="build_psycopg2=true build_pycurl=true" +else + modules="" +fi # Build __init__.py metafiles and PHP API. -%{__make} %{?_smp_mflags} subdirs="php php/xmlrpc" +%{__make} %{?_smp_mflags} subdirs="php php/xmlrpc" modules="$modules" # Build documentation # beware that making the pdf file somehow overwrites the html %{__make} -C doc PLCAPI.pdf -- 2.45.2