first draft for the myplc-docs package (cross-module change)
[myplc.git] / myplc-docs.spec
1 #
2 # $Id: myplc-native.spec 9260 2008-05-07 16:20:25Z thierry $
3 #
4 %define url $URL: svn+ssh://thierry@svn.planet-lab.org/svn/MyPLC/trunk/myplc-native.spec $
5
6 %define name myplc-docs
7 %define version 4.2
8 %define taglevel 9
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Summary: PlanetLab Central (PLC) online documentation
13 Name: %{name}
14 Version: %{version}
15 Release: %{release}
16 License: PlanetLab
17 Group: Applications/Systems
18 Source0: %{name}-%{version}.tar.gz
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
20 BuildArch: noarch
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 %define debug_package %{nil}
28
29 %description 
30 This package contains the online documentation for MyPLC. This covers
31 the overall system itself, together with the reference manuals for the
32 two APIs provided, namely PLCAPI and NMAPI.
33
34 %prep
35 %setup -q
36
37 %build
38 rm -rf $RPM_BUILD_ROOT
39
40 pushd MyPLC
41 # beware that making the pdf file somehow overwrites the html
42 make -C doc myplc.pdf 
43 rm -f doc/myplc.html
44 make -C doc myplc.html 
45 popd
46
47 pushd PLCAPI
48 # beware that making the pdf file somehow overwrites the html
49 make -C doc PLCAPI.pdf 
50 rm -f doc/PLCAPI.html
51 make -C doc PLCAPI.html 
52 popd
53
54 pushd NodeManager
55 # beware that making the pdf file somehow overwrites the html
56 make -C doc NMAPI.pdf 
57 rm -f doc/NMAPI.html
58 make -C doc NMAPI.html 
59 popd
60
61 %install
62
63 for ext in pdf html; do
64     install -D -m 444 MyPLC/doc/myplc.$ext $RPM_BUILD_ROOT/var/www/html/planetlab/doc/
65     install -D -m 444 PLCAPI/doc/PLCAPI.$ext $RPM_BUILD_ROOT/var/www/html/planetlab/doc/
66     install -D -m 444 NodeManager/doc/NMAPI.$ext $RPM_BUILD_ROOT/var/www/html/planetlab/doc/
67 done
68
69 ./MyPLC/doc/docbook2drupal.sh "MyPLC Documentation (%{pldistro})" \
70     $RPM_BUILD_ROOT/var/www/html/planetlab/doc/myplc.html \
71     $RPM_BUILD_ROOT/var/www/html/planetlab/doc/myplc.php 
72 ./MyPLC/doc/docbook2drupal.sh "PLC API Documentation (%{pldistro})" \
73     $RPM_BUILD_ROOT/var/www/html/planetlab/doc/PLCAPI.html \
74     $RPM_BUILD_ROOT/var/www/html/planetlab/doc/PLCAPI.php 
75 ./MyPLC/doc/docbook2drupal.sh "Node Manager API Documentation (%{pldistro})" \
76     $RPM_BUILD_ROOT/var/www/html/planetlab/doc/NMAPI.html \
77     $RPM_BUILD_ROOT/var/www/html/planetlab/doc/NMAPI.php 
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(-,root,root,-)
84 /var/www/html/planetlab/doc/
85
86 %changelog