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

Diff of /branches/4.0fordebian/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5577 by jfenwick, Fri Apr 3 05:26:15 2015 UTC revision 5578 by jfenwick, Fri Apr 3 11:46:53 2015 UTC
# Line 17  WORK3M=$(CURDIR)/debian/stage3M Line 17  WORK3M=$(CURDIR)/debian/stage3M
17    
18    
19    
20  .PHONY: build clean install binary binary-arch binary-arch2 binary-arch3 binary-indep  .PHONY: clean build build-arch build-indep build2 build2M build3 build3M binary binary-arch binary-arch3 binary-arch2 binary-arch2M binary-arch3 binary-arch3M binary-indep
21    
22  #thanks to the debian manual  #thanks to the debian manual
23  ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))  ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
24      parbuild=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))      parbuild=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
25      sflags=-j$(parbuild)      sflags=-j$(parbuild)
26  else  else
27      sflags=-j10      sflags=-j12
28  endif  endif
29    
30    
# Line 47  clean: Line 47  clean:
47      rm -f debian/files      rm -f debian/files
48      dh_clean      dh_clean
49    
50    build: build-arch build-indep
51    
52  install2:    build-arch: build2 build2M build3 build3M
53    
54    # build2 will be the compiled version we extract doco from
55    build-indep: build2
56        scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=`debian/utils/getsubst`_options.py docs
57    
58    build2:
59      mkdir -p $(WORK)      mkdir -p $(WORK)
60      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
61      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=`debian/utils/getsubst`_options.py      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=`debian/utils/getsubst`_options.py
62      sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $(WORK)/bin/run-escript      sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $(WORK)/bin/run-escript
63    
64  install2M:  build2M:
65      mkdir -p $(WORKM)      mkdir -p $(WORKM)
66      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
67      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILDM) verbose=on prefix=$(WORKM) options_file=`debian/utils/getsubst`_mpi_options.py      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILDM) verbose=on prefix=$(WORKM) options_file=`debian/utils/getsubst`_mpi_options.py
68      sed -i -e "s%ESCRIPT_ROOT=/usr/lib/python-escript%ESCRIPT_ROOT=/usr/lib/python-escript-mpi%" $(WORKM)/bin/run-escript      sed -i -e "s%ESCRIPT_ROOT=/usr/lib/python-escript%ESCRIPT_ROOT=/usr/lib/python-escript-mpi%" $(WORKM)/bin/run-escript
69      sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $(WORKM)/bin/run-escript      sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $(WORKM)/bin/run-escript
70    
71  install3:    build3:
72      mkdir -p $(WORK3)      mkdir -p $(WORK3)
73      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
74      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD3) verbose=on prefix=$(WORK3) options_file=`debian/utils/getsubst`_py3_options.py      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD3) verbose=on prefix=$(WORK3) options_file=`debian/utils/getsubst`_py3_options.py
# Line 69  install3: Line 76  install3:
76      sed -i -e "s%ESCRIPT_ROOT=/usr/lib/python-escript%ESCRIPT_ROOT=/usr/lib/python3-escript%" $(WORK3)/bin/run-escript      sed -i -e "s%ESCRIPT_ROOT=/usr/lib/python-escript%ESCRIPT_ROOT=/usr/lib/python3-escript%" $(WORK3)/bin/run-escript
77      sed -i -e "s%PYTHON_CMD=python%PYTHON_CMD=python3%" $(WORK3)/bin/run-escript      sed -i -e "s%PYTHON_CMD=python%PYTHON_CMD=python3%" $(WORK3)/bin/run-escript
78    
79  install3M:  build3M:
80      mkdir -p $(WORK3M)      mkdir -p $(WORK3M)
81      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi      if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
82      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD3M) verbose=on prefix=$(WORK3M) options_file=`debian/utils/getsubst`_py3_mpi_options.py      scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD3M) verbose=on prefix=$(WORK3M) options_file=`debian/utils/getsubst`_py3_mpi_options.py
# Line 78  install3M: Line 85  install3M:
85      sed -i -e "s%PYTHON_CMD=python%PYTHON_CMD=python3%" $(WORK3M)/bin/run-escript      sed -i -e "s%PYTHON_CMD=python%PYTHON_CMD=python3%" $(WORK3M)/bin/run-escript
86    
87    
88  install:    install2 install2M install3 install3M  binary: binary-arch binary-indep
89    
90  build:  build-arch build-indep  binary-arch: binary-arch2 binary-arch2M binary-arch3 binary-arch3M
91    
92  binary-arch2:   install2  binary-arch2:
93      mkdir -p $(BDEST)/usr/share/doc/python-escript/      mkdir -p $(BDEST)/usr/share/doc/python-escript/
94      mkdir -p $(BDEST)/usr/share/man/man1      mkdir -p $(BDEST)/usr/share/man/man1
95      mkdir -p $(BDEST)/usr/lib/python-escript      mkdir -p $(BDEST)/usr/lib/python-escript
# Line 99  binary-arch2:  install2 Line 106  binary-arch2:  install2
106      mkdir -p debian/python-escript/DEBIAN      mkdir -p debian/python-escript/DEBIAN
107      find debian/python-escript -name '*.pyc' | xargs rm -f      find debian/python-escript -name '*.pyc' | xargs rm -f
108      find $(BDEST) -name '*.so' | xargs strip      find $(BDEST) -name '*.so' | xargs strip
109      dh_makeshlibs -Pdebian/python-escript -ppython-escript      dh_makeshlibs -P$(BDEST) -ppython-escript
110      dh_shlibdeps -Pdebian/python-escript -ppython-escript      dh_shlibdeps -P$(BDEST) -ppython-escript
111      dpkg-gencontrol -Pdebian/python-escript -ppython-escript      dpkg-gencontrol -P$(BDEST) -ppython-escript
112      install --mode=755 debian/python-escript.postinst $(BDEST)/DEBIAN/postinst      install --mode=755 debian/python-escript.postinst $(BDEST)/DEBIAN/postinst
113      dh_python2 -p python-escript      dh_python2 -p python-escript
114      install --mode=755 debian/python-escript.prerm $(BDEST)/DEBIAN/prerm      install --mode=755 debian/python-escript.prerm $(BDEST)/DEBIAN/prerm
# Line 110  binary-arch2:  install2 Line 117  binary-arch2:  install2
117      dpkg-deb --build debian/python-escript ..      dpkg-deb --build debian/python-escript ..
118    
119    
120  binary-arch2m:  install2M  binary-arch2M:
121      mkdir -p $(BMDEST)/usr/share/doc/python-escript-mpi/      mkdir -p $(BMDEST)/usr/share/doc/python-escript-mpi/
122      mkdir -p $(BMDEST)/usr/share/man/man1      mkdir -p $(BMDEST)/usr/share/man/man1
123      mkdir -p $(BMDEST)/usr/lib/python-escript-mpi      mkdir -p $(BMDEST)/usr/lib/python-escript-mpi
# Line 129  binary-arch2m: install2M Line 136  binary-arch2m: install2M
136      mkdir -p debian/python-escript-mpi/DEBIAN      mkdir -p debian/python-escript-mpi/DEBIAN
137      find debian/python-escript-mpi -name '*.pyc' | xargs rm -f      find debian/python-escript-mpi -name '*.pyc' | xargs rm -f
138      find $(BMDEST) -name '*.so' | xargs strip      find $(BMDEST) -name '*.so' | xargs strip
139      dh_makeshlibs -Pdebian/python-escript -ppython-escript      dh_makeshlibs -P$(BMDEST) -ppython-escript-mpi
140      dh_shlibdeps -Pdebian/python-escript -ppython-escript      dh_shlibdeps -P$(BMDEST) -ppython-escript-mpi
141      dpkg-gencontrol -Pdebian/python-escript-mpi -ppython-escript-mpi      dpkg-gencontrol -P$(BMDEST) -ppython-escript-mpi
142      install --mode=755 debian/python-escript-mpi.postinst $(BMDEST)/DEBIAN/postinst      install --mode=755 debian/python-escript-mpi.postinst $(BMDEST)/DEBIAN/postinst
143      dh_python2 -p python-escript-mpi      dh_python2 -p python-escript-mpi
144      install --mode=755 debian/python-escript-mpi.prerm $(BMDEST)/DEBIAN/prerm      install --mode=755 debian/python-escript-mpi.prerm $(BMDEST)/DEBIAN/prerm
# Line 139  binary-arch2m: install2M Line 146  binary-arch2m: install2M
146      cd debian/python-escript-mpi && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums      cd debian/python-escript-mpi && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
147      dpkg-deb --build debian/python-escript-mpi ..      dpkg-deb --build debian/python-escript-mpi ..
148    
149  binary-arch3:   install3  binary-arch3:
150      mkdir -p $(B3DEST)/usr/share/doc/python3-escript/      mkdir -p $(B3DEST)/usr/share/doc/python3-escript/
151      mkdir -p $(B3DEST)/usr/share/man/man1      mkdir -p $(B3DEST)/usr/share/man/man1
152      mkdir -p $(B3DEST)/usr/lib/python3-escript      mkdir -p $(B3DEST)/usr/lib/python3-escript
# Line 156  binary-arch3:  install3 Line 163  binary-arch3:  install3
163      mkdir -p debian/python3-escript/DEBIAN      mkdir -p debian/python3-escript/DEBIAN
164      find debian/python3-escript -name '*.pyc' | xargs rm -f      find debian/python3-escript -name '*.pyc' | xargs rm -f
165      find $(B3DEST) -name '*.so' | xargs strip      find $(B3DEST) -name '*.so' | xargs strip
166      dh_makeshlibs -Pdebian/python-escript -ppython-escript      dh_makeshlibs -P$(B3DEST) -ppython3-escript
167      dh_shlibdeps -Pdebian/python-escript -ppython-escript      dh_shlibdeps -P$(B3DEST) -ppython3-escript
168      dpkg-gencontrol -Pdebian/python3-escript -ppython3-escript      dpkg-gencontrol -P$(B3DEST) -ppython3-escript
169      install --mode=755 debian/python-escript3.postinst $(B3DEST)/DEBIAN/postinst      install --mode=755 debian/python-escript3.postinst $(B3DEST)/DEBIAN/postinst
170      dh_python3 -p python-escript      dh_python3 -p python3-escript
171      install --mode=755 debian/python-escript3.prerm $(B3DEST)/DEBIAN/prerm      install --mode=755 debian/python-escript3.prerm $(B3DEST)/DEBIAN/prerm
172      #Thanks to Krafft's book for this      #Thanks to Krafft's book for this
173      cd debian/python3-escript && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums      cd debian/python3-escript && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
174      dpkg-deb --build debian/python3-escript ..      dpkg-deb --build debian/python3-escript ..
175    
176  binary-arch3m:  install3M  binary-arch3M:
177      mkdir -p $(B3MDEST)/usr/share/doc/python3-escript-mpi/      mkdir -p $(B3MDEST)/usr/share/doc/python3-escript-mpi/
178      mkdir -p $(B3MDEST)/usr/share/man/man1      mkdir -p $(B3MDEST)/usr/share/man/man1
179      mkdir -p $(B3MDEST)/usr/lib/python3-escript-mpi      mkdir -p $(B3MDEST)/usr/lib/python3-escript-mpi
# Line 182  binary-arch3m: install3M Line 189  binary-arch3m: install3M
189      install --mode=644 debian/changelog $(B3MDEST)/usr/share/doc/python3-escript-mpi/changelog.Debian      install --mode=644 debian/changelog $(B3MDEST)/usr/share/doc/python3-escript-mpi/changelog.Debian
190      gzip -f9 $(B3MDEST)/usr/share/doc/python3-escript-mpi/changelog.Debian      gzip -f9 $(B3MDEST)/usr/share/doc/python3-escript-mpi/changelog.Debian
191      install --mode=644 debian/copyright $(B3MDEST)/usr/share/doc/python3-escript-mpi      install --mode=644 debian/copyright $(B3MDEST)/usr/share/doc/python3-escript-mpi
192      mkdir -p debian/python3-escript-mpi/DEBIAN      mkdir -p $(B3MDEST)/DEBIAN
193      find debian/python3-escript-mpi -name '*.pyc' | xargs rm -f      find $(B3MDEST) -name '*.pyc' | xargs rm -f
194      find $(B3MDEST) -name '*.so' | xargs strip      find $(B3MDEST) -name '*.so' | xargs strip
195      dh_makeshlibs -Pdebian/python-escript -ppython-escript      dpkg-gencontrol -P$(B3MDEST) -ppython3-escript-mpi
196      dh_shlibdeps -Pdebian/python-escript -ppython-escript      dh_makeshlibs -P$(B3MDEST) -ppython3-escript-mpi
197      dpkg-gencontrol -Pdebian/python3-escript-mpi -ppython3-escript-mpi      dh_shlibdeps -P$(B3MDEST) -ppython3-escript-mpi
198        dh_strip -P$(B3MDEST) -ppython3-escript-mpi
199        #dpkg-gencontrol -P$(B3MDEST) -ppython3-escript-mpi
200      install --mode=755 debian/python-escript3-mpi.postinst $(B3MDEST)/DEBIAN/postinst      install --mode=755 debian/python-escript3-mpi.postinst $(B3MDEST)/DEBIAN/postinst
201      dh_python3 -p python3-escript-mpi      dh_python3 -p python3-escript-mpi
202      install --mode=755 debian/python-escript3-mpi.prerm $(B3MDEST)/DEBIAN/prerm      install --mode=755 debian/python-escript3-mpi.prerm $(B3MDEST)/DEBIAN/prerm
# Line 195  binary-arch3m: install3M Line 204  binary-arch3m: install3M
204      cd debian/python3-escript-mpi && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums      cd debian/python3-escript-mpi && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
205      dpkg-deb --build debian/python3-escript-mpi ..      dpkg-deb --build debian/python3-escript-mpi ..
206    
 build-arch: binary-arch2 binary-arch3 binary-arch2m binary-arch3m  
207    
208    binary-indep:
 build-indep: install2  
209      mkdir -p $(DDEST)      mkdir -p $(DDEST)
210      mkdir -p $(DDEST)/usr/share/doc/python-escript-doc/      mkdir -p $(DDEST)/usr/share/doc/python-escript-doc/
211      mkdir -p debian/python-escript-doc/DEBIAN      mkdir -p debian/python-escript-doc/DEBIAN
# Line 213  build-indep: install2 Line 220  build-indep: install2
220      cp $(WORK)/release/doc/inversion/inversion.pdf $(DDEST)/usr/share/doc/python-escript-doc/      cp $(WORK)/release/doc/inversion/inversion.pdf $(DDEST)/usr/share/doc/python-escript-doc/
221      cp -r $(WORK)/release/doc/sphinx_api $(DDEST)/usr/share/doc/python-escript-doc/python_html      cp -r $(WORK)/release/doc/sphinx_api $(DDEST)/usr/share/doc/python-escript-doc/python_html
222      cp -r $(WORK)/release/doc/doxygen $(DDEST)/usr/share/doc/python-escript-doc/doxygen      cp -r $(WORK)/release/doc/doxygen $(DDEST)/usr/share/doc/python-escript-doc/doxygen
223      cd debian/python-escript-doc && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums      cd $(DDEST) && find * -path DEBIAN -prune -o -type f -print | xargs md5sum > DEBIAN/md5sums
224      dpkg-gencontrol -Pdebian/python-escript-doc -ppython-escript-doc      dpkg-gencontrol -P$(DDEST) -ppython-escript-doc
225        dh_fixperms -P$(DDEST) -ppython-escript-doc
226      dpkg-deb --build debian/python-escript-doc ..      dpkg-deb --build debian/python-escript-doc ..
227        

Legend:
Removed from v.5577  
changed lines
  Added in v.5578

  ViewVC Help
Powered by ViewVC 1.1.26