Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Python for Maemo
Summary Tracker Lists SCM Wiki
[pymaemo] Contents of /packages/pygtk/branches/chinook/debian/rules

Contents of /packages/pygtk/branches/chinook/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 695 - (show annotations)
Wed Dec 5 16:55:47 2007 UTC (13 years, 4 months ago) by lucianomw
File size: 2415 byte(s)
-use autogen.sh correctly
1 #!/usr/bin/make -f
2
3 PYVER=2.5
4 PYTHON=python$(PYVER)
5
6 p_base=$(PYTHON)-gtk2
7 p_dev=$(p_base)-dev
8
9 d_base=debian/$(p_base)
10 d_dev=debian/$(p_dev)
11
12 ifeq ($(DEB_BUILD_ARCH),armel)
13 CFLAGS=-Os -mthumb -mfloat-abi=softfp -Wall -Wstrict-prototypes
14 else
15 CFLAGS=-Os -Wall -Wstrict-prototypes
16 endif
17
18 build: build-stamp
19 build-stamp:
20 dh_testdir
21
22 CFLAGS="$(CFLAGS)" \
23 PYTHON=`which $(PYTHON)` \
24 ./autogen.sh \
25 --prefix=/usr \
26 --enable-thread \
27 --disable-docs \
28 --disable-numpy
29 $(MAKE)
30 touch build-stamp
31
32 clean:
33 dh_testdir
34 dh_testroot
35 rm -f build-stamp
36 -rm -rf $(d_base) $(d_dev)
37 -$(MAKE) distclean
38 -rm -rf docs/reference/builddate.xml
39 -rm -rf docs/Makefile
40 find -name "*.pyc" -exec rm -f {} \;
41 find -name "*.pyo" -exec rm -f {} \;
42 dh_clean codegen/*.pyc
43
44 install: build
45 dh_testdir
46 dh_testroot
47 dh_clean -k
48 dh_installdirs
49
50 mkdir -p $(CURDIR)/$(d_base)
51 mkdir -p $(CURDIR)/$(d_dev)
52
53 $(MAKE) install DESTDIR=$(CURDIR)/$(d_base)
54 $(PYTHON) -OO -m compileall -f $(d_base)
55 cp -a $(CURDIR)/$(d_base)/* $(CURDIR)/$(d_dev)
56
57 # base
58 rm -rf $(d_base)/usr/lib/pygtk
59 rm -rf $(d_base)/usr/lib/pkgconfig
60 rm -rf $(d_base)/usr/bin
61 rm -rf $(d_base)/usr/share
62 rm -rf $(d_base)/usr/include
63 find $(d_base) -name "*.py" -exec rm -f {} \;
64 find $(d_base) -name "*.pyc" -exec rm -f {} \;
65 find $(d_base) -name "*.la" -exec rm -f {} \;
66
67 # dev
68 find $(d_dev) -name "*.pyo" | grep -v codegen | xargs rm -f
69 find $(d_dev) -name "*.so" -exec rm -f {} \;
70
71 # cleanup
72 find $(d_base) $(d_dev) -name ".svn" | xargs rm -rf
73
74 # Replace all '#!' calls to python with $(PYTHON)
75 for i in `find $(d_base) $(d_dev) -type f`; do \
76 sed "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/$(PYTHON)," \
77 $$i > $$i.temp; \
78 if cmp --quiet $$i $$i.temp; then \
79 rm -f $$i.temp; \
80 else \
81 mv -f $$i.temp $$i; \
82 chmod 755 $$i; \
83 echo "fixed interpreter: $$i"; \
84 fi; \
85 done
86
87 binary: binary-indep binary-arch
88 binary-indep: install
89 dh_testdir
90 dh_testroot
91 dh_installdirs
92 dh_installchangelogs -p$(p_dev)
93 dh_installdocs -p$(p_dev)
94 dh_strip
95 dh_compress -p$(p_dev) -Xexamples -X.py
96 dh_fixperms
97 dh_makeshlibs
98 dh_installdeb
99 dh_shlibdeps
100 dh_gencontrol
101 dh_md5sums
102 dh_builddeb
103
104 binary-arch: install
105 dh_testdir
106 dh_testroot
107 dh_installdirs
108 dh_strip
109 dh_fixperms
110 dh_makeshlibs
111 dh_installdeb
112 dh_shlibdeps
113 dh_gencontrol
114 dh_md5sums
115 dh_builddeb
116
117 .PHONY: build clean install binary-indep binary-arch binary
118

Properties

Name Value
svn:executable *


Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment