Tagging module PLCAPI -- from PLCAPI-4.2-1 to PLCAPI-4.2-2
[plcapi.git] / PLCAPI.spec
1 #
2 # $Id$
3 #
4
5 %define url $URL$
6
7 %define name PLCAPI
8 %define version 4.2
9 %define taglevel 2
10
11 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
12
13 Summary: PlanetLab Central API
14 Name: %{name}
15 Version: %{version}
16 Release: %{release}
17 License: PlanetLab
18 Group: System Environment/Daemons
19 Source0: %{name}-%{version}.tar.gz
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21
22 Vendor: PlanetLab
23 Packager: PlanetLab Central <support@planet-lab.org>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
26
27 Obsoletes: plcapilib
28
29 # We use set everywhere
30 Requires: python >= 2.4
31
32 # We use psycopg2
33 BuildRequires: postgresql-devel
34
35 # Standard xmlrpc.so that ships with PHP does not marshal NULL
36 BuildRequires: php-devel
37 Obsoletes: php-xmlrpc
38 Provides: php-xmlrpc
39
40 # OpenJade does not honor XML catalog files and tries to access
41 # www.oasis-open.org even if DTDs are locally installed. Disable
42 # documentation generation for now.
43 # BuildRequires: docbook-dtds, docbook-utils-pdf
44
45 # PostgreSQL and SOAPpy are necessary to run the API server, but not
46 # plcsh. Since the only supported method of running the server is via
47 # MyPLC anyway, don't be so stringent about binary requirements, in
48 # case people want to install this package just for plcsh.
49 # Requires: postgresql-server, SOAPpy
50 AutoReqProv: no
51
52 %description
53 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
54 PlanetLab Central (PLC) database. The API may be accessed directly via
55 the Python shell program plcsh, through a toy standalone server, or
56 through Apache mod_python.
57
58 %prep
59 %setup -q
60
61 %build
62 # python-pycurl and python-psycopg2 avail. from fedora 5
63 # make sure to check build/<pldistro>/plc.pkgs
64 if [ "%{distrorelease}" -le 4 ] ; then
65     modules="psycopg2 pycurl"
66 else
67     modules=""
68 fi
69 # Build __init__.py metafiles and PHP API. 
70 %{__make} %{?_smp_mflags} subdirs="php php/xmlrpc" modules="$modules"
71 # Build documentation
72 # beware that making the pdf file somehow overwrites the html
73 %{__make} -C doc PLCAPI.pdf
74 rm -f doc/PLCAPI.html
75 %{__make} -C doc PLCAPI.html
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 if [ "%{distrorelease}" -le 4 ] ; then
80     modules="psycopg2 pycurl"
81 else
82     modules=""
83 fi
84 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}" modules="$modules"
85 #someone out there skips doc installation - we DO want this installed
86 for doc in PLCAPI.html PLCAPI.pdf ; do
87     install -D -m 644 doc/$doc $RPM_BUILD_ROOT/"%{_datadir}"/plc_api/doc/$doc
88 done
89
90 # Install shell symlink
91 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
92 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
93
94 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
95 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
96 ; Enable xmlrpc extension module
97 extension=xmlrpc.so
98 EOF
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %define php_extension_dir %(php-config --extension-dir)
104
105 %files
106 %defattr(-,root,root,-)
107 #someone out there skips doc installation - we DO want this installed
108 #%doc doc/PLCAPI.xml doc/PLCAPI.pdf doc/PLCAPI.html
109 %dir %{_datadir}/plc_api
110 %{_datadir}/plc_api/*
111 %{_bindir}/plcsh
112 %{php_extension_dir}/xmlrpc.so
113 %{_sysconfdir}/php.d/xmlrpc.ini
114 %{_bindir}/refresh-peer.py*
115
116 %changelog
117 * Fri Feb 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-1 PLCAPI-4.2-2
118 - refresh peer script to use a month-dependent logfile
119 - tracking the starting point for UniPi integration of the dummynet boxes
120
121 * Thu Jan 31 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-0 PLCAPI-4.2-1
122 - plcsh adds its own path to sys.path
123 - fix so GetNodes can be called from a Node
124
125 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
126 - Initial build.