PLCAPI RPM spec file
[plcapi.git] / PLCAPI.spec
1 Summary: PlanetLab Central API
2 Name: PLCAPI
3 Version: 4.0
4 Release: 1
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 BuildRequires: docbook-dtds, docbook-utils-pdf
12
13 Requires: postgresql-server, SOAPpy
14
15 %description
16 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
17 PlanetLab Central (PLC) database. The API may be accessed directly via
18 the Python shell program plcsh, through a toy standalone server, or
19 through Apache mod_python.
20
21 %prep
22 %setup -q
23
24 %build
25 # Build __init__.py metafiles, documentation, and PHP API
26 %{__make} %{?_smp_mflags}
27
28 # Byte compile
29 %{__python} setup.py build
30
31 %install
32 rm -rf $RPM_BUILD_ROOT
33
34 # Install in /usr/share/plc_api
35 %{__python} setup.py install \
36     --install-purelib=$RPM_BUILD_ROOT/%{_datadir}/plc_api \
37     --install-data=$RPM_BUILD_ROOT/%{_datadir}/plc_api
38
39 # Install shell symlink
40 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
41 ln -s %{_datadir}/plc_api/Shell.py $RPM_BUILD_ROOT/%{_bindir}/plcsh
42
43 %clean
44 rm -rf $RPM_BUILD_ROOT
45
46 %files
47 %defattr(-,root,root,-)
48 %doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
49 %dir %{_datadir}/plc_api
50 %{_datadir}/plc_api
51 %{_bindir}/plcsh
52
53 %changelog
54 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
55 - Initial build.
56