/[escript]/branches/3.4/debian/rules
ViewVC logotype

Contents of /branches/3.4/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4469 - (show annotations)
Wed Jun 19 02:49:33 2013 UTC (8 years, 4 months ago) by jfenwick
File size: 3333 byte(s)
Moving all the packaging stuff
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=`packaging/debuntu/getsubst`
31 sed -e "s%STDLOCATION=0%STDLOCATION=1%" < bin/run-escript > $(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 cp doc/manpage/man1/run-escript.1 $(BDEST)/usr/share/man/man1
44 install --mode=644 debian/changelog $(BDEST)/usr/share/doc/python-escript/changelog.Debian
45 gzip -f9 $(BDEST)/usr/share/doc/python-escript/changelog.Debian
46 install --mode=644 debian/copyright $(BDEST)/usr/share/doc/python-escript
47 gzip -f9 $(BDEST)/usr/share/doc/python-escript/copyright
48 mkdir -p debian/python-escript/DEBIAN
49 #Thanks to Krafft's book for this
50 cd debian/python-escript && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
51 dpkg-gencontrol -Pdebian/python-escript -ppython-escript
52 dpkg-deb --build debian/python-escript ..
53
54 binary-indep: install
55 mkdir -p $(DDEST)
56 mkdir -p $(DDEST)/usr/share/doc/python-escript-doc/
57 mkdir -p debian/python-escript-doc/DEBIAN
58 scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=`packaging/debuntu/getsubst` docs
59 install --mode=644 debian/copyright $(DDEST)/usr/share/doc/python-escript-doc
60 gzip -f9 $(DDEST)/usr/share/doc/python-escript-doc/copyright
61 install --mode=644 debian/changelog $(DDEST)/usr/share/doc/python-escript-doc/changelog.Debian
62 gzip -f9 $(DDEST)/usr/share/doc/python-escript-doc/changelog.Debian
63 cp $(WORK)/release/doc/escript_examples.tar.gz $(DDEST)/usr/share/doc/python-escript-doc/
64 cp $(WORK)/release/doc/install/install.pdf $(DDEST)/usr/share/doc/python-escript-doc
65 cp $(WORK)/release/doc/user/user.pdf $(DDEST)/usr/share/doc/python-escript-doc
66 cp $(WORK)/release/doc/cookbook/cookbook.pdf $(DDEST)/usr/share/doc/python-escript-doc
67 cp $(WORK)/release/doc/inversion/inversion.pdf $(DDEST)/usr/share/doc/python-escript-doc/
68 cp -r $(WORK)/release/doc/sphinx_api $(DDEST)/usr/share/doc/python-escript-doc/python_html
69 cp -r $(WORK)/release/doc/doxygen $(DDEST)/usr/share/doc/python-escript-doc/doxygen
70 cd debian/python-escript-doc && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
71 dpkg-gencontrol -Pdebian/python-escript-doc -ppython-escript-doc
72 dpkg-deb --build debian/python-escript-doc ..
73

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26