9 %define release %{subversion}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11 Summary: PlanetLab Central API
16 Group: System Environment/Daemons
17 # too bad the spec syntax does not like this
19 Source0: %{name}-%{version}.tar.gz
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
24 # We use set everywhere
25 Requires: python >= 2.4
28 BuildRequires: postgresql-devel
30 # Standard xmlrpc.so that ships with PHP does not marshal NULL
31 BuildRequires: php-devel
35 # OpenJade does not honor XML catalog files and tries to access
36 # www.oasis-open.org even if DTDs are locally installed. Disable
37 # documentation generation for now.
38 # BuildRequires: docbook-dtds, docbook-utils-pdf
40 # PostgreSQL and SOAPpy are necessary to run the API server, but not
41 # plcsh. Since the only supported method of running the server is via
42 # MyPLC anyway, don't be so stringent about binary requirements, in
43 # case people want to install this package just for plcsh.
44 # Requires: postgresql-server, SOAPpy
48 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
49 PlanetLab Central (PLC) database. The API may be accessed directly via
50 the Python shell program plcsh, through a toy standalone server, or
51 through Apache mod_python.
57 # Build __init__.py metafiles and PHP API.
58 %{__make} %{?_smp_mflags} subdirs="php php/xmlrpc"
60 # beware that making the pdf file somehow overwrites the html
61 %{__make} -C doc PLCAPI.pdf
63 %{__make} -C doc PLCAPI.html
66 rm -rf $RPM_BUILD_ROOT
67 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
68 #someone out there skips doc installation - we DO want this installed
69 for doc in PLCAPI.html PLCAPI.pdf ; do
70 install -D -m 644 doc/$doc $RPM_BUILD_ROOT/"%{_datadir}"/plc_api/doc/$doc
73 # Install shell symlink
74 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
75 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
77 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
78 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
79 ; Enable xmlrpc extension module
84 rm -rf $RPM_BUILD_ROOT
86 %define php_extension_dir %(php-config --extension-dir)
89 %defattr(-,root,root,-)
90 #someone out there skips doc installation - we DO want this installed
91 #%doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
92 %dir %{_datadir}/plc_api
95 %{php_extension_dir}/xmlrpc.so
96 %{_sysconfdir}/php.d/xmlrpc.ini
97 %{_bindir}/refresh-peer.py*
100 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> -