use Makefile to build and install
[plcapi.git] / PLCAPI.spec
index 82224dd..95103e1 100644 (file)
@@ -10,7 +10,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 Obsoletes: plcapilib
 
-BuildRequires: docbook-dtds, docbook-utils-pdf
+# OpenJade does not honor XML catalog files and tries to access
+# www.oasis-open.org even if DTDs are locally installed. Disable
+# documentation generation for now.
+# BuildRequires: docbook-dtds, docbook-utils-pdf
 
 Requires: postgresql-server, SOAPpy
 
@@ -24,20 +27,13 @@ through Apache mod_python.
 %setup -q
 
 %build
-# Build __init__.py metafiles, documentation, and PHP API
-%{__make} %{?_smp_mflags}
-
-# Byte compile
-%{__python} setup.py build
+# Build __init__.py metafiles and PHP API. Do not build documentation
+# for now.
+%{__make} %{?_smp_mflags} SUBDIRS=php
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-# Install in /usr/share/plc_api
-%{__python} setup.py install \
-    --install-purelib=$RPM_BUILD_ROOT/%{_datadir}/plc_api \
-    --install-scripts=$RPM_BUILD_ROOT/%{_datadir}/plc_api \
-    --install-data=$RPM_BUILD_ROOT/%{_datadir}/plc_api
+%{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
 
 # Install shell symlink
 mkdir -p $RPM_BUILD_ROOT/%{_bindir}