rpm: removed .la files, and fixed library packaging
[barry/progweb.git] / debian / rules
blob3f8a85029d51d729cf189a501757be5f3a54adca
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
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-optus-au \
52 $(DEB_SRCDIR)/ppp/barry-vodafone-au \
53 $(CURDIR)/debian/barry-util/etc/ppp/peers
54 install -d $(CURDIR)/debian/barry-util/etc/chatscripts
55 install -m 0640 \
56 $(DEB_SRCDIR)/ppp/barry-rogers.chat \
57 $(DEB_SRCDIR)/ppp/barry-minimal.chat \
58 $(DEB_SRCDIR)/ppp/barry-verizon.chat \
59 $(DEB_SRCDIR)/ppp/barry-sprint.chat \
60 $(DEB_SRCDIR)/ppp/barry-telus.chat \
61 $(DEB_SRCDIR)/ppp/barry-o2ireland.chat \
62 $(DEB_SRCDIR)/ppp/barry-tmobileus.chat \
63 $(DEB_SRCDIR)/ppp/barry-att_cingular.chat \
64 $(DEB_SRCDIR)/ppp/barry-chinamobile.chat \
65 $(DEB_SRCDIR)/ppp/barry-kpn.chat \
66 $(DEB_SRCDIR)/ppp/barry-orange-spain.chat \
67 $(DEB_SRCDIR)/ppp/barry-optus-au.chat \
68 $(DEB_SRCDIR)/ppp/barry-vodafone-au.chat \
69 $(CURDIR)/debian/barry-util/etc/chatscripts
70 # Install hal fdi configs
71 install -d $(CURDIR)/debian/barry-util/usr/share/hal/fdi/information/10freedesktop
72 install -d $(CURDIR)/debian/barry-util/usr/share/hal/fdi/policy/10osvendor
73 install -m 0644 $(DEB_SRCDIR)/hal/fdi/information/10freedesktop/10-blackberry.fdi $(CURDIR)/debian/barry-util/usr/share/hal/fdi/information/10freedesktop
74 install -m 0644 $(DEB_SRCDIR)/hal/fdi/policy/10osvendor/19-blackberry-acl.fdi $(CURDIR)/debian/barry-util/usr/share/hal/fdi/policy/10osvendor
75 # Install hal support script
76 install -d $(CURDIR)/debian/barry-util/usr/bin
77 install -m 0755 $(DEB_SRCDIR)/hal/hal-blackberry $(CURDIR)/debian/barry-util/usr/bin
78 # Install bash and zsh completion scripts
79 install -d $(CURDIR)/debian/barry-util/etc/bash_completion.d
80 install -m 0644 \
81 $(DEB_SRCDIR)/bash/bjavaloader \
82 $(DEB_SRCDIR)/bash/btool \
83 $(CURDIR)/debian/barry-util/etc/bash_completion.d
84 # Install examples/ into libbarry-dev
85 install -d $(CURDIR)/debian/libbarry-dev/usr/share/doc/libbarry-dev/examples
86 install -m 0644 $(DEB_SRCDIR)/examples/*.cc \
87 $(CURDIR)/debian/libbarry-dev/usr/share/doc/libbarry-dev/examples
89 install/barrybackup-gui::
90 # Install barry icon
91 install -d $(CURDIR)/debian/barrybackup-gui/usr/share/pixmaps
92 install -m 0644 $(DEB_SRCDIR)/logo/barry_logo_icon.png $(CURDIR)/debian/barrybackup-gui/usr/share/pixmaps
93 # Install Gnome .desktop file
94 install -d $(CURDIR)/debian/barrybackup-gui/usr/share/applications
95 install -m 0644 $(DEB_SRCDIR)/menu/barrybackup.desktop $(CURDIR)/debian/barrybackup-gui/usr/share/applications
97 install/barrydesktop::
98 # Install barry icon
99 install -d $(CURDIR)/debian/barrydesktop/usr/share/pixmaps
100 install -m 0644 $(DEB_SRCDIR)/logo/barry_logo_icon.png $(CURDIR)/debian/barrydesktop/usr/share/pixmaps/barry_desktop_icon.png
101 # Install Gnome .desktop file
102 install -d $(CURDIR)/debian/barrydesktop/usr/share/applications
103 install -m 0644 $(DEB_SRCDIR)/menu/barrydesktop.desktop $(CURDIR)/debian/barrydesktop/usr/share/applications
105 post-patches::
106 @rm -f $(CURDIR)/deb_srcdir
107 @ln -s $(DEB_SRCDIR) $(CURDIR)/deb_srcdir
108 @test -x $(DEB_SRCDIR)/configure && echo "allready autoreconf" || (cd $(DEB_SRCDIR) && autoreconf -i)
110 os22-binary::
111 # DEB_SRCDIR can be relative, so change into directory to use pwd.
113 # Note: that the compiler flags below depend on opensync-plugin's
114 # debian/rules having a DESTDIR target of opensync-plugin/debian/tmp
115 (cd $(DEB_SRCDIR) && \
116 export TREE_BUILD_CXXFLAGS="-I`pwd`/opensync-plugin/debian/tmp/usr/include/barry18" && \
117 export TREE_BUILD_LDFLAGS="-L`pwd`/opensync-plugin/debian/tmp/usr/lib" && \
118 export PKG_CONFIG_PATH="`pwd`:$(PKG_CONFIG_PATH)" && \
119 export LD_LIBRARY_PATH="`pwd`/opensync-plugin/debian/tmp/usr/lib:$(LD_LIBRARY_PATH)" && \
120 cd opensync-plugin && \
121 debian/rules TREE_BUILD_DIR="`pwd`/.." binary)
123 os22-clean::
124 (cd $(DEB_SRCDIR)/opensync-plugin && debian/rules clean)
126 os4x-binary::
127 # DEB_SRCDIR can be relative, so change into directory to use pwd.
129 # Note: that the compiler flags below depend on opensync-plugin-0.4x's
130 # debian/rules having a DESTDIR target of opensync-plugin-0.4x/debian/tmp
131 (cd $(DEB_SRCDIR) && \
132 export TREE_BUILD_CXXFLAGS="-I`pwd`/opensync-plugin-0.4x/debian/tmp/usr/include/barry18" && \
133 export TREE_BUILD_LDFLAGS="-L`pwd`/opensync-plugin-0.4x/debian/tmp/usr/lib" && \
134 export PKG_CONFIG_PATH="`pwd`:$(PKG_CONFIG_PATH)" && \
135 export LD_LIBRARY_PATH="`pwd`/opensync-plugin-0.4x/debian/tmp/usr/lib:$(LD_LIBRARY_PATH)" && \
136 cd opensync-plugin-0.4x && \
137 debian/rules TREE_BUILD_DIR="`pwd`/.." binary)
139 os4x-clean::
140 (cd $(DEB_SRCDIR)/opensync-plugin-0.4x && debian/rules clean)
142 clean::
143 -@rm -f $(CURDIR)/deb_srcdir