/[escript]/branches/4.0fordebian/debian/rules
ViewVC logotype

Contents of /branches/4.0fordebian/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5569 - (show annotations)
Fri Mar 27 04:50:14 2015 UTC (3 years, 11 months ago) by jfenwick
File size: 3390 byte(s)
Notes on where I am up to.
Compressing man page.
Added python version fields to control

1 #!/usr/bin/make -f
2
3 BDEST=$(CURDIR)/debian/python-escript
4 DDEST=$(CURDIR)/debian/python-escript-doc
5 BUILD=$(CURDIR)/debian/tmp
6 WORK=$(CURDIR)/debian/stage
7
8
9 .PHONY: build clean install binary binary-arch binary-indep
10
11 #thanks to the debian manual
12 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
13 parbuild=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
14 sflags=-j$(parbuild)
15 else
16 sflags=
17 endif
18
19
20 clean:
21 rm -rf build condif.log esys include lib release .sconf_tmp .sconsign.dblite config.log .sconf_temp
22 rm -rf $(BDEST)
23 rm -rf $(DDEST)
24 rm -rf $(BUILD)
25 rm -rf $(WORK)
26
27 install:
28 mkdir -p $(WORK)
29 if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
30 scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=`debian/utils/getsubst`
31 sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $(WORK)/bin/run-escript
32
33 binary: binary-arch binary-indep
34
35 binary-arch: install
36 mkdir -p $(BDEST)/usr/share/doc/python-escript/
37 mkdir -p $(BDEST)/usr/share/man/man1
38 mkdir -p $(BDEST)/usr/lib/python-escript
39 mkdir -p $(BDEST)/usr/bin
40 cp $(WORK)/lib/* $(BDEST)/usr/lib/python-escript
41 cp -r $(WORK)/esys $(BDEST)/usr/lib/python-escript
42 cp $(WORK)/bin/* $(BDEST)/usr/bin
43 rm $(BDEST)/usr/bin/runmodel.py
44 cp doc/manpage/man1/run-escript.1 $(BDEST)/usr/share/man/man1
45 gzip -f9 $(BDEST)/usr/share/man/man1/run-escript.1
46 install --mode=644 debian/changelog $(BDEST)/usr/share/doc/python-escript/changelog.Debian
47 gzip -f9 $(BDEST)/usr/share/doc/python-escript/changelog.Debian
48 install --mode=644 debian/copyright $(BDEST)/usr/share/doc/python-escript
49 gzip -f9 $(BDEST)/usr/share/doc/python-escript/copyright
50 mkdir -p debian/python-escript/DEBIAN
51 #Thanks to Krafft's book for this
52 cd debian/python-escript && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
53 dpkg-gencontrol -Pdebian/python-escript -ppython-escript
54 dpkg-deb --build debian/python-escript ..
55
56 binary-indep: install
57 mkdir -p $(DDEST)
58 mkdir -p $(DDEST)/usr/share/doc/python-escript-doc/
59 mkdir -p debian/python-escript-doc/DEBIAN
60 scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=`debian/utils/getsubst` docs
61 install --mode=644 debian/copyright $(DDEST)/usr/share/doc/python-escript-doc
62 gzip -f9 $(DDEST)/usr/share/doc/python-escript-doc/copyright
63 install --mode=644 debian/changelog $(DDEST)/usr/share/doc/python-escript-doc/changelog.Debian
64 gzip -f9 $(DDEST)/usr/share/doc/python-escript-doc/changelog.Debian
65 cp $(WORK)/release/doc/escript_examples.tar.gz $(DDEST)/usr/share/doc/python-escript-doc/
66 cp $(WORK)/release/doc/install/install.pdf $(DDEST)/usr/share/doc/python-escript-doc
67 cp $(WORK)/release/doc/user/user.pdf $(DDEST)/usr/share/doc/python-escript-doc
68 cp $(WORK)/release/doc/cookbook/cookbook.pdf $(DDEST)/usr/share/doc/python-escript-doc
69 cp $(WORK)/release/doc/inversion/inversion.pdf $(DDEST)/usr/share/doc/python-escript-doc/
70 cp -r $(WORK)/release/doc/sphinx_api $(DDEST)/usr/share/doc/python-escript-doc/python_html
71 cp -r $(WORK)/release/doc/doxygen $(DDEST)/usr/share/doc/python-escript-doc/doxygen
72 cd debian/python-escript-doc && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
73 dpkg-gencontrol -Pdebian/python-escript-doc -ppython-escript-doc
74 dpkg-deb --build debian/python-escript-doc ..
75

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26