maint: fixed bash shift bugs in release.sh and release-bm.sh
[barry.git] / debian / rules
blob400632cf3d707be4a208a2edf1d52c7435fabaea
1 #!/usr/bin/make -f
2 # Based on the multi2 sample debian/rules file:
3 # ---
4 # Sample debian/rules that uses debhelper.
5 # This file is public domain software, originally written by Joey Hess.
7 #export DH_VERBOSE=1
8 include /usr/share/cdbs/1/rules/debhelper.mk
9 include /usr/share/cdbs/1/class/autotools.mk
10 #include /usr/share/cdbs/1/rules/simple-patchsys.mk
12 # where sources are
13 DEB_SRCDIR = .
15 # in which directory to build
16 DEB_BUILDDIR = .
18 # in which directory to install the sofware
19 DEB_DESTDIR = $(CURDIR)/debian/tmp
21 #CDBS automatically handles common flags to pass to the configure script,
22 #but it is possible to give some extra parameters :
23 DEB_CONFIGURE_EXTRA_FLAGS := --enable-boost --enable-nls --with-zlib --enable-gui --enable-desktop $(BARRY_CONFIGURE_OPTS) --with-libusb --enable-rpathhack --with-evolution
24 COMMON_CONFIGURE_FLAGS := --prefix=/usr
25 DEB_INSTALL_DOCS_ALL =
27 install/barry-util::
28 # Install udev rules for the barry-util package
29 install -d $(CURDIR)/debian/barry-util/etc/udev/rules.d
30 install -m 0644 \
31 $(DEB_SRCDIR)/udev/10-blackberry.rules \
32 $(DEB_SRCDIR)/udev/99-blackberry-perms.rules \
33 $(CURDIR)/debian/barry-util/etc/udev/rules.d
34 # Install modprobe blacklist file for bcharge, into barry-util package
35 install -d $(CURDIR)/debian/barry-util/etc/modprobe.d
36 install -m 0644 $(DEB_SRCDIR)/modprobe/blacklist-berry_charge.conf $(CURDIR)/debian/barry-util/etc/modprobe.d/blacklist-berry_charge.conf
37 # Install default ppp options and chat scripts
38 install -d $(CURDIR)/debian/barry-util/etc/ppp/peers
39 install -m 0644 \
40 $(DEB_SRCDIR)/ppp/barry-rogers \
41 $(DEB_SRCDIR)/ppp/barry-minimal \
42 $(DEB_SRCDIR)/ppp/barry-verizon \
43 $(DEB_SRCDIR)/ppp/barry-sprint \
44 $(DEB_SRCDIR)/ppp/barry-telus \
45 $(DEB_SRCDIR)/ppp/barry-o2ireland \
46 $(DEB_SRCDIR)/ppp/barry-tmobileus \
47 $(DEB_SRCDIR)/ppp/barry-att_cingular \
48 $(DEB_SRCDIR)/ppp/barry-chinamobile \
49 $(DEB_SRCDIR)/ppp/barry-kpn \
50 $(DEB_SRCDIR)/ppp/barry-orange-spain \
51 $(DEB_SRCDIR)/ppp/barry-orangeuk \
52 $(DEB_SRCDIR)/ppp/barry-mts \
53 $(DEB_SRCDIR)/ppp/barry-optus-au \
54 $(DEB_SRCDIR)/ppp/barry-vodafone-au \
55 $(CURDIR)/debian/barry-util/etc/ppp/peers
56 install -d $(CURDIR)/debian/barry-util/etc/chatscripts
57 install -m 0640 \
58 $(DEB_SRCDIR)/ppp/barry-rogers.chat \
59 $(DEB_SRCDIR)/ppp/barry-minimal.chat \
60 $(DEB_SRCDIR)/ppp/barry-verizon.chat \
61 $(DEB_SRCDIR)/ppp/barry-sprint.chat \
62 $(DEB_SRCDIR)/ppp/barry-telus.chat \
63 $(DEB_SRCDIR)/ppp/barry-o2ireland.chat \
64 $(DEB_SRCDIR)/ppp/barry-tmobileus.chat \
65 $(DEB_SRCDIR)/ppp/barry-att_cingular.chat \
66 $(DEB_SRCDIR)/ppp/barry-chinamobile.chat \
67 $(DEB_SRCDIR)/ppp/barry-kpn.chat \
68 $(DEB_SRCDIR)/ppp/barry-orange-spain.chat \
69 $(DEB_SRCDIR)/ppp/barry-orangeuk.chat \
70 $(DEB_SRCDIR)/ppp/barry-mts.chat \
71 $(DEB_SRCDIR)/ppp/barry-optus-au.chat \
72 $(DEB_SRCDIR)/ppp/barry-vodafone-au.chat \
73 $(CURDIR)/debian/barry-util/etc/chatscripts
74 # Install hal fdi configs
75 install -d $(CURDIR)/debian/barry-util/usr/share/hal/fdi/information/10freedesktop
76 install -d $(CURDIR)/debian/barry-util/usr/share/hal/fdi/policy/10osvendor
77 install -m 0644 $(DEB_SRCDIR)/hal/fdi/information/10freedesktop/10-blackberry.fdi $(CURDIR)/debian/barry-util/usr/share/hal/fdi/information/10freedesktop
78 install -m 0644 $(DEB_SRCDIR)/hal/fdi/policy/10osvendor/19-blackberry-acl.fdi $(CURDIR)/debian/barry-util/usr/share/hal/fdi/policy/10osvendor
79 # Install hal support script
80 install -d $(CURDIR)/debian/barry-util/usr/bin
81 install -m 0755 $(DEB_SRCDIR)/hal/hal-blackberry $(CURDIR)/debian/barry-util/usr/bin
82 # Install bash and zsh completion scripts
83 install -d $(CURDIR)/debian/barry-util/etc/bash_completion.d
84 install -m 0644 \
85 $(DEB_SRCDIR)/bash/bjavaloader \
86 $(DEB_SRCDIR)/bash/btool \
87 $(CURDIR)/debian/barry-util/etc/bash_completion.d
88 # Install examples/ into libbarry-dev
89 install -d $(CURDIR)/debian/libbarry-dev/usr/share/doc/libbarry-dev/examples
90 install -m 0644 $(DEB_SRCDIR)/examples/*.cc \
91 $(CURDIR)/debian/libbarry-dev/usr/share/doc/libbarry-dev/examples
93 install/barrybackup-gui::
94 # Install barry icon
95 install -d $(CURDIR)/debian/barrybackup-gui/usr/share/pixmaps
96 install -m 0644 $(DEB_SRCDIR)/logo/barry_logo_icon.png $(CURDIR)/debian/barrybackup-gui/usr/share/pixmaps
97 # Install Gnome .desktop file
98 install -d $(CURDIR)/debian/barrybackup-gui/usr/share/applications
99 install -m 0644 $(DEB_SRCDIR)/menu/barrybackup.desktop $(CURDIR)/debian/barrybackup-gui/usr/share/applications
101 install/barrydesktop::
102 # Install barry icon
103 install -d $(CURDIR)/debian/barrydesktop/usr/share/pixmaps
104 install -m 0644 $(DEB_SRCDIR)/logo/barry_logo_icon.png $(CURDIR)/debian/barrydesktop/usr/share/pixmaps/barry_desktop_icon.png
105 # Install Gnome .desktop file
106 install -d $(CURDIR)/debian/barrydesktop/usr/share/applications
107 install -m 0644 $(DEB_SRCDIR)/menu/barrydesktop.desktop $(CURDIR)/debian/barrydesktop/usr/share/applications
109 post-patches::
110 @rm -f $(CURDIR)/deb_srcdir
111 @ln -s $(DEB_SRCDIR) $(CURDIR)/deb_srcdir
112 @test -x $(DEB_SRCDIR)/configure && echo "allready autoreconf" || (cd $(DEB_SRCDIR) && autoreconf -i)
114 os22-binary::
115 # DEB_SRCDIR can be relative, so change into directory to use pwd.
117 # Note: that the compiler flags below depend on opensync-plugin's
118 # debian/rules having a DESTDIR target of opensync-plugin/debian/tmp
119 (cd $(DEB_SRCDIR) && \
120 export TREE_BUILD_CXXFLAGS="-I`pwd`/opensync-plugin/debian/tmp/usr/include/barry18" && \
121 export TREE_BUILD_LDFLAGS="-L`pwd`/opensync-plugin/debian/tmp/usr/lib" && \
122 export PKG_CONFIG_PATH="`pwd`:$(PKG_CONFIG_PATH)" && \
123 export LD_LIBRARY_PATH="`pwd`/opensync-plugin/debian/tmp/usr/lib:$(LD_LIBRARY_PATH)" && \
124 cd opensync-plugin && \
125 debian/rules TREE_BUILD_DIR="`pwd`/.." binary)
127 os22-clean::
128 (cd $(DEB_SRCDIR)/opensync-plugin && debian/rules clean)
130 os4x-binary::
131 # DEB_SRCDIR can be relative, so change into directory to use pwd.
133 # Note: that the compiler flags below depend on opensync-plugin-0.4x's
134 # debian/rules having a DESTDIR target of opensync-plugin-0.4x/debian/tmp
135 (cd $(DEB_SRCDIR) && \
136 export TREE_BUILD_CXXFLAGS="-I`pwd`/opensync-plugin-0.4x/debian/tmp/usr/include/barry18" && \
137 export TREE_BUILD_LDFLAGS="-L`pwd`/opensync-plugin-0.4x/debian/tmp/usr/lib" && \
138 export PKG_CONFIG_PATH="`pwd`:$(PKG_CONFIG_PATH)" && \
139 export LD_LIBRARY_PATH="`pwd`/opensync-plugin-0.4x/debian/tmp/usr/lib:$(LD_LIBRARY_PATH)" && \
140 cd opensync-plugin-0.4x && \
141 debian/rules TREE_BUILD_DIR="`pwd`/.." binary)
143 os4x-clean::
144 (cd $(DEB_SRCDIR)/opensync-plugin-0.4x && debian/rules clean)
146 clean::
147 -@rm -f $(CURDIR)/deb_srcdir