File: rules

package info (click to toggle)
bitpim 0.9.08.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 24,228 kB
  • ctags: 45,773
  • sloc: python: 191,894; cpp: 2,074; perl: 600; ansic: 343; sh: 185; makefile: 76; sed: 1
file content (96 lines) | stat: -rwxr-xr-x 3,446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/langcore.mk
# include /usr/share/cdbs/1/class/python-distutils.mk

DEB_DH_INSTALL_SOURCEDIR   = debian/tmp
DEB_INSTALL_CHANGELOGS_ALL = debian/changelog.upstream

datadir = /usr/share/bitpim
libdir  = /usr/lib/bitpim

data_dest = $(DEB_DESTDIR)$(datadir)
lib_dest  = $(DEB_DESTDIR)$(libdir)
code_dest = $(data_dest)/code
res_dest  = $(data_dest)/resources
dtop_dest = $(DEB_DESTDIR)/usr/share/applications
udev_bin  = $(DEB_DESTDIR)/lib/udev

export CFLAGS CXXFLAGS

clean::
#	$(MAKE) -C src/native/av/bmp2avi clean PLATFORM=linux
	rm -f src/native/av/bmp2avi/bmp2avi.lbin helpers/bmp2avi.lbin
	cd src/native/strings  &&  python setup.py clean -a  && \
	    rm -rf build *.so *.pyc
	cd src/native/usb  &&  rm -f libusb_wrap.c libusb.py _libusb.so
	chmod -x examples/*
	rm -f debian/changelog.upstream debian/stamp-built

common-build-arch:: debian/stamp-built

debian/stamp-built:
	mkdir -p helpers
#	$(MAKE) -C src/native/av/bmp2avi PLATFORM=linux CXXFLAGS="$(CXXFLAGS)"
#	cd src/native/strings  &&  python setup.py build --build-base="./build"
#	cd src/native/usb  &&  sh -x ./build.sh
	python packaging/buildmodules.py all
	touch $@

debian/changelog.upstream:
	unzip -p resources/bitpim.htb versionhistory.htm \
	    | lynx -dump -stdin -nolist > $@

common-install-arch:: debian/changelog.upstream
	mkdir -p $(lib_dest)/native/usb
	cp src/native/av/bmp2avi/bmp2avi.lbin $(lib_dest)
	cd src/native/strings  &&  \
	    python setup.py install --root=$(DEB_DESTDIR) --no-compile -O0 \
	      --install-lib=$(libdir)/native/strings
	install -m644 src/native/strings/__init__.py $(lib_dest)/native/strings
	cp src/native/usb/*.py src/native/usb/*.so $(lib_dest)/native/usb

common-install-indep:: debian/changelog.upstream
	mkdir -p $(DEB_DESTDIR)/usr/bin
	install -m755 debian/bitfling.sh $(DEB_DESTDIR)/usr/bin/bitfling
	install -m755 debian/bitpim.sh   $(DEB_DESTDIR)/usr/bin/bitpim
	mkdir -p $(code_dest)
	install -m644 src/*.py $(code_dest)
	sed -e 's/^\(vendor=\)".*"/\1"Debian"/' src/version.py \
	    > $(code_dest)/version.py
	cd $(code_dest)  &&  chmod +x analyser.py bp.py \
	  brewcompressedimage.py calendarcontrol.py comdiagnose.py \
	  comscan.py hexeditor.py setphone_wizard.py usb_ids.py version.py
	mkdir $(code_dest)/native
	install -m644 src/native/*.py $(code_dest)/native
	install -m644 src/native/strings/jarowpy.py \
	    $(code_dest)/native/strings.py
	for x in egroupware evolution qtopiadesktop; do \
	    mkdir -p $(code_dest)/native/$$x  &&  \
	    install -m644 src/native/$$x/*.py $(code_dest)/native/$$x; \
	done
	mkdir $(code_dest)/phones
	install -m644 src/phones/*.py $(code_dest)/phones
	mkdir $(res_dest)
	install -m644 resources/* $(res_dest)
	rm -f $(res_dest)/bitpim.chm
	mkdir $(code_dest)/bitfling
	install -m644 src/bitfling/*.py $(code_dest)/bitfling
	chmod +x $(code_dest)/bitfling/xmlrpcstuff.py
	mkdir -p $(dtop_dest)
	sed -e 's,%%INSTALLBINDIR%%,/usr/bin,g' \
	    -e 's,%%INSTALLLIBDIR%%,$(datadir),g' \
	    packaging/bitpim.desktop > $(dtop_dest)/bitpim.desktop
	mkdir -p $(udev_bin)
	install -m755 debian/notify-bitpim $(udev_bin)

# binary-install/bitfling::
# 	dh_python -pbitfling /usr/share/bitpim/code/bitfling

binary-install/bitpim::
	dh_pysupport -pbitpim
#	dh_python -pbitpim

binary-install/bitpim-lib::
	dh_pysupport -pbitpim-lib /usr/lib/bitpim
#	dh_python -pbitpim-lib /usr/lib/bitpim