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