- remove rpm dependencies on postgresql-server and SOAPpy, so that we
[plcapi.git] / PLCAPI.spec
1 Summary: PlanetLab Central API
2 Name: PLCAPI
3 Version: 4.0
4 Release: 1%{?pldistro:.%{pldistro}}%{?date:.%{date}}
5 License: PlanetLab
6 Group: System Environment/Daemons
7 URL: http://cvs.planet-lab.org/cvs/new_plc_api
8 Source0: %{name}-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
10
11 Obsoletes: plcapilib
12
13 # We use set everywhere
14 Requires: python >= 2.4
15
16 # We use psycopg2
17 BuildRequires: postgresql-devel
18
19 # Standard xmlrpc.so that ships with PHP does not marshal NULL
20 BuildRequires: php-devel
21 Obsoletes: php-xmlrpc
22 Provides: php-xmlrpc
23
24 # OpenJade does not honor XML catalog files and tries to access
25 # www.oasis-open.org even if DTDs are locally installed. Disable
26 # documentation generation for now.
27 # BuildRequires: docbook-dtds, docbook-utils-pdf
28
29 # Necessary to run the API server, but not plcsh as a client. The only
30 # supported method of running the server is via MyPLC anyway.
31 # Requires: postgresql-server, SOAPpy
32
33 %description
34 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
35 PlanetLab Central (PLC) database. The API may be accessed directly via
36 the Python shell program plcsh, through a toy standalone server, or
37 through Apache mod_python.
38
39 %prep
40 %setup -q
41
42 %build
43 # Build __init__.py metafiles and PHP API. Do not build documentation
44 # for now.
45 %{__make} %{?_smp_mflags} subdirs="php php/xmlrpc"
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
50
51 # Install shell symlink
52 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
53 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
54
55 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
56 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
57 ; Enable xmlrpc extension module
58 extension=xmlrpc.so
59 EOF
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %define php_extension_dir %(php-config --extension-dir)
65
66 %files
67 %defattr(-,root,root,-)
68 %doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
69 %dir %{_datadir}/plc_api
70 %{_datadir}/plc_api/*
71 %{_bindir}/plcsh
72 %{php_extension_dir}/xmlrpc.so
73 %{_sysconfdir}/php.d/xmlrpc.ini
74
75 %changelog
76 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
77 - Initial build.
78