Merge remote-tracking branch 'origin/pycurl' into planetlab-4_0-branch
[plcapi.git] / PLCAPI.spec
1 Summary: PlanetLab Central API
2 Name: PLCAPI
3 Version: 4.1
4 Release: 3%{?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 # PostgreSQL and SOAPpy are necessary to run the API server, but not
30 # plcsh. Since the only supported method of running the server is via
31 # MyPLC anyway, don't be so stringent about binary requirements, in
32 # case people want to install this package just for plcsh.
33 # Requires: postgresql-server, SOAPpy
34 AutoReqProv: no
35
36 %description
37 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
38 PlanetLab Central (PLC) database. The API may be accessed directly via
39 the Python shell program plcsh, through a toy standalone server, or
40 through Apache mod_python.
41
42 %prep
43 %setup -q
44
45 %build
46 # Build __init__.py metafiles and PHP API. Do not build documentation
47 # for now.
48 %{__make} %{?_smp_mflags} subdirs="php php/xmlrpc"
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
53
54 # Install shell symlink
55 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
56 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
57
58 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
59 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
60 ; Enable xmlrpc extension module
61 extension=xmlrpc.so
62 EOF
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %define php_extension_dir %(php-config --extension-dir)
68
69 %files
70 %defattr(-,root,root,-)
71 %doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
72 %dir %{_datadir}/plc_api
73 %{_datadir}/plc_api/*
74 %{_bindir}/plcsh
75 %{php_extension_dir}/xmlrpc.so
76 %{_sysconfdir}/php.d/xmlrpc.ini
77 %{_bindir}/refresh-peer.py*
78
79 %changelog
80 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
81 - Initial build.
82