- lowercase subdirs
[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 Requires: postgresql-server, SOAPpy
30
31 %description
32 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
33 PlanetLab Central (PLC) database. The API may be accessed directly via
34 the Python shell program plcsh, through a toy standalone server, or
35 through Apache mod_python.
36
37 %prep
38 %setup -q
39
40 %build
41 # Build __init__.py metafiles and PHP API. Do not build documentation
42 # for now.
43 %{__make} %{?_smp_mflags} subdirs="php php/xmlrpc"
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
48
49 # Install shell symlink
50 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
51 ln -s %{_datadir}/plc_api/Shell.py $RPM_BUILD_ROOT/%{_bindir}/plcsh
52
53 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
54 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
55 ; Enable xmlrpc extension module
56 extension=xmlrpc.so
57 EOF
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %define php_extension_dir %(php-config --extension-dir)
63
64 %files
65 %defattr(-,root,root,-)
66 %doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
67 %dir %{_datadir}/plc_api
68 %{_datadir}/plc_api/*
69 %{_bindir}/plcsh
70 %{php_extension_dir}/xmlrpc.so
71 %{_sysconfdir}/php.d/xmlrpc.ini
72
73 %changelog
74 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
75 - Initial build.
76