11 %define release %{subversion}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
13 Summary: PlanetLab Central API
18 Group: System Environment/Daemons
19 Source0: %{name}-%{version}.tar.gz
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21 URL: %(echo %{url} | cut -d ' ' -f 2)
25 # We use set everywhere
26 Requires: python >= 2.4
29 BuildRequires: postgresql-devel
31 # Standard xmlrpc.so that ships with PHP does not marshal NULL
32 BuildRequires: php-devel
36 # OpenJade does not honor XML catalog files and tries to access
37 # www.oasis-open.org even if DTDs are locally installed. Disable
38 # documentation generation for now.
39 # BuildRequires: docbook-dtds, docbook-utils-pdf
41 # PostgreSQL and SOAPpy are necessary to run the API server, but not
42 # plcsh. Since the only supported method of running the server is via
43 # MyPLC anyway, don't be so stringent about binary requirements, in
44 # case people want to install this package just for plcsh.
45 # Requires: postgresql-server, SOAPpy
49 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
50 PlanetLab Central (PLC) database. The API may be accessed directly via
51 the Python shell program plcsh, through a toy standalone server, or
52 through Apache mod_python.
58 # python-pycurl and python-psycopg2 avail. from fedora 5
59 # make sure to check myplc/<pldistro>-plc.lst
60 if [ "%{distrorelease}" -le 4 ] ; then
61 modules="psycopg2 pycurl"
65 # Build __init__.py metafiles and PHP API.
66 %{__make} %{?_smp_mflags} subdirs="php php/xmlrpc" modules="$modules"
68 # beware that making the pdf file somehow overwrites the html
69 %{__make} -C doc PLCAPI.pdf
71 %{__make} -C doc PLCAPI.html
74 rm -rf $RPM_BUILD_ROOT
75 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
76 #someone out there skips doc installation - we DO want this installed
77 for doc in PLCAPI.html PLCAPI.pdf ; do
78 install -D -m 644 doc/$doc $RPM_BUILD_ROOT/"%{_datadir}"/plc_api/doc/$doc
81 # Install shell symlink
82 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
83 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
85 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
86 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
87 ; Enable xmlrpc extension module
92 rm -rf $RPM_BUILD_ROOT
94 %define php_extension_dir %(php-config --extension-dir)
97 %defattr(-,root,root,-)
98 #someone out there skips doc installation - we DO want this installed
99 #%doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
100 %dir %{_datadir}/plc_api
101 %{_datadir}/plc_api/*
103 %{php_extension_dir}/xmlrpc.so
104 %{_sysconfdir}/php.d/xmlrpc.ini
105 %{_bindir}/refresh-peer.py*
108 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> -