8 # this branch was created from tag PLCAPI-4.2-2
9 %define version dummynet
12 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
14 Summary: PlanetLab Central API
19 Group: System Environment/Daemons
20 Source0: %{name}-%{version}.tar.gz
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
24 Packager: PlanetLab Central <support@planet-lab.org>
25 Distribution: PlanetLab %{plrelease}
26 URL: %(echo %{url} | cut -d ' ' -f 2)
30 # We use set everywhere
31 Requires: python >= 2.4
34 BuildRequires: postgresql-devel
36 # Standard xmlrpc.so that ships with PHP does not marshal NULL
37 BuildRequires: php-devel
41 # OpenJade does not honor XML catalog files and tries to access
42 # www.oasis-open.org even if DTDs are locally installed. Disable
43 # documentation generation for now.
44 # BuildRequires: docbook-dtds, docbook-utils-pdf
46 # PostgreSQL and SOAPpy are necessary to run the API server, but not
47 # plcsh. Since the only supported method of running the server is via
48 # MyPLC anyway, don't be so stringent about binary requirements, in
49 # case people want to install this package just for plcsh.
50 # Requires: postgresql-server, SOAPpy
54 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
55 PlanetLab Central (PLC) database. The API may be accessed directly via
56 the Python shell program plcsh, through a toy standalone server, or
57 through Apache mod_python.
63 # python-pycurl and python-psycopg2 avail. from fedora 5
64 # make sure to check build/<pldistro>/plc.pkgs
65 if [ "%{distrorelease}" -le 4 ] ; then
66 modules="psycopg2 pycurl"
70 # Build __init__.py metafiles and PHP API.
71 %{__make} %{?_smp_mflags} subdirs="php php/xmlrpc" modules="$modules"
73 # beware that making the pdf file somehow overwrites the html
74 %{__make} -C doc PLCAPI.pdf
76 %{__make} -C doc PLCAPI.html
79 rm -rf $RPM_BUILD_ROOT
80 if [ "%{distrorelease}" -le 4 ] ; then
81 modules="psycopg2 pycurl"
85 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}" modules="$modules"
86 #someone out there skips doc installation - we DO want this installed
87 for doc in PLCAPI.html PLCAPI.pdf ; do
88 install -D -m 644 doc/$doc $RPM_BUILD_ROOT/"%{_datadir}"/plc_api/doc/$doc
91 # Install shell symlink
92 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
93 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
95 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
96 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
97 ; Enable xmlrpc extension module
102 rm -rf $RPM_BUILD_ROOT
104 %define php_extension_dir %(php-config --extension-dir)
107 %defattr(-,root,root,-)
108 #someone out there skips doc installation - we DO want this installed
109 #%doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
110 %dir %{_datadir}/plc_api
111 %{_datadir}/plc_api/*
113 %{php_extension_dir}/xmlrpc.so
114 %{_sysconfdir}/php.d/xmlrpc.ini
115 %{_bindir}/refresh-peer.py*
118 * Fri Feb 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-1 PLCAPI-4.2-2
119 - refresh peer script to use a month-dependent logfile
120 - tracking the starting point for UniPi integration of the dummynet boxes
122 * Thu Jan 31 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-0 PLCAPI-4.2-1
123 - plcsh adds its own path to sys.path
124 - fix so GetNodes can be called from a Node
126 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> -