build and install our own custom xmlrpc.so extension
[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 # Standard xmlrpc.so that ships with PHP does not marshal NULL
14 Obsoletes: php-xmlrpc
15 Provides: php-xmlrpc
16
17 # OpenJade does not honor XML catalog files and tries to access
18 # www.oasis-open.org even if DTDs are locally installed. Disable
19 # documentation generation for now.
20 # BuildRequires: docbook-dtds, docbook-utils-pdf
21
22 Requires: postgresql-server, SOAPpy
23
24 %description
25 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
26 PlanetLab Central (PLC) database. The API may be accessed directly via
27 the Python shell program plcsh, through a toy standalone server, or
28 through Apache mod_python.
29
30 %prep
31 %setup -q
32
33 %build
34 # Build __init__.py metafiles and PHP API. Do not build documentation
35 # for now.
36 %{__make} %{?_smp_mflags} SUBDIRS="php php/xmlrpc"
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
41
42 # Install shell symlink
43 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
44 ln -s %{_datadir}/plc_api/Shell.py $RPM_BUILD_ROOT/%{_bindir}/plcsh
45
46 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
47 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
48 ; Enable xmlrpc extension module
49 extension=xmlrpc.so
50 EOF
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %files
56 %defattr(-,root,root,-)
57 %doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
58 %dir %{_datadir}/plc_api
59 %{_datadir}/plc_api/*
60 %{_bindir}/plcsh
61 %{_libdir}/php/modules/xmlrpc.so
62 %{_sysconfdir}/php.d/xmlrpc.ini
63
64 %changelog
65 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
66 - Initial build.
67