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