-# Build __init__.py metafiles and PHP API. Do not build documentation
-# for now.
-%{__make} %{?_smp_mflags} SUBDIRS=php
+# python-pycurl and python-psycopg2 avail. from fedora 5
+# make sure to check myplc/<pldistro>-plc.lst
+if [ "%{distrorelease}" -le 4 ] ; then
+ modules="psycopg2 pycurl"
+else
+ modules=""
+fi
+# Build __init__.py metafiles and PHP API.
+%{__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
+rm -f doc/PLCAPI.html
+%{__make} -C doc PLCAPI.html