menu: added new Keywords tag to .desktop files
[barry.git] / debian / rules
blob6fe79431cc7feffe60cd2d2df9ae52edb10da9c1
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 # The following is for systems that support hardened builds.
13 # Not all systems have this support, so make it conditional on buildflags.mk
14 ifneq ($(strip $(wildcard /usr/share/dpkg/buildflags.mk)),)
15 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
16 export DEB_CFLAGS_MAINT_APPEND = -Wall
17 include /usr/share/dpkg/buildflags.mk
18 endif
20 # where sources are
21 DEB_SRCDIR = .
23 # in which directory to build
24 DEB_BUILDDIR = .
26 # in which directory to install the sofware
27 DEB_DESTDIR = $(CURDIR)/debian/tmp
29 #CDBS automatically handles common flags to pass to the configure script,
30 #but it is possible to give some extra parameters :
31 DEB_CONFIGURE_EXTRA_FLAGS := --enable-boost --enable-nls --with-zlib --enable-gui --enable-desktop --with-guisu=/usr/bin/gksu $(BARRY_CONFIGURE_OPTS) --with-libusb --enable-rpathhack --with-evolution
32 COMMON_CONFIGURE_FLAGS := --prefix=/usr
33 DEB_INSTALL_DOCS_ALL =
35 install/barry-util::
36 ifeq ($(DEB_HOST_ARCH_OS), linux)
37 # Install udev rules for the barry-util package
38 install -d $(CURDIR)/debian/barry-util/lib/udev/rules.d
39 install -m 0644 \
40 $(DEB_SRCDIR)/udev/10-blackberry.rules \
41 $(DEB_SRCDIR)/udev/99-blackberry-perms.rules \
42 $(CURDIR)/debian/barry-util/lib/udev/rules.d
43 endif
44 # Install modprobe blacklist file for bcharge, into barry-util package
45 install -d $(CURDIR)/debian/barry-util/etc/modprobe.d
46 install -m 0644 $(DEB_SRCDIR)/modprobe/blacklist-berry_charge.conf $(CURDIR)/debian/barry-util/etc/modprobe.d/blacklist-berry_charge.conf
47 # Install default ppp options and chat scripts
48 install -d $(CURDIR)/debian/barry-util/etc/ppp/peers
49 install -m 0644 \
50 $(DEB_SRCDIR)/ppp/barry-rogers \
51 $(DEB_SRCDIR)/ppp/barry-minimal \
52 $(DEB_SRCDIR)/ppp/barry-verizon \
53 $(DEB_SRCDIR)/ppp/barry-sprint \
54 $(DEB_SRCDIR)/ppp/barry-telus \
55 $(DEB_SRCDIR)/ppp/barry-o2ireland \
56 $(DEB_SRCDIR)/ppp/barry-emobile \
57 $(DEB_SRCDIR)/ppp/barry-tmobileus \
58 $(DEB_SRCDIR)/ppp/barry-att_cingular \
59 $(DEB_SRCDIR)/ppp/barry-chinamobile \
60 $(DEB_SRCDIR)/ppp/barry-kpn \
61 $(DEB_SRCDIR)/ppp/barry-orange-spain \
62 $(DEB_SRCDIR)/ppp/barry-orangeuk \
63 $(DEB_SRCDIR)/ppp/barry-mts \
64 $(DEB_SRCDIR)/ppp/barry-optus-au \
65 $(DEB_SRCDIR)/ppp/barry-vodafone-au \
66 $(DEB_SRCDIR)/ppp/barry-giffgaff \
67 $(CURDIR)/debian/barry-util/etc/ppp/peers
68 install -d $(CURDIR)/debian/barry-util/etc/chatscripts
69 install -m 0640 \
70 $(DEB_SRCDIR)/ppp/barry-rogers.chat \
71 $(DEB_SRCDIR)/ppp/barry-minimal.chat \
72 $(DEB_SRCDIR)/ppp/barry-verizon.chat \
73 $(DEB_SRCDIR)/ppp/barry-sprint.chat \
74 $(DEB_SRCDIR)/ppp/barry-telus.chat \
75 $(DEB_SRCDIR)/ppp/barry-o2ireland.chat \
76 $(DEB_SRCDIR)/ppp/barry-emobile.chat \
77 $(DEB_SRCDIR)/ppp/barry-tmobileus.chat \
78 $(DEB_SRCDIR)/ppp/barry-att_cingular.chat \
79 $(DEB_SRCDIR)/ppp/barry-chinamobile.chat \
80 $(DEB_SRCDIR)/ppp/barry-kpn.chat \
81 $(DEB_SRCDIR)/ppp/barry-orange-spain.chat \
82 $(DEB_SRCDIR)/ppp/barry-orangeuk.chat \
83 $(DEB_SRCDIR)/ppp/barry-mts.chat \
84 $(DEB_SRCDIR)/ppp/barry-optus-au.chat \
85 $(DEB_SRCDIR)/ppp/barry-vodafone-au.chat \
86 $(DEB_SRCDIR)/ppp/barry-giffgaff.chat \
87 $(CURDIR)/debian/barry-util/etc/chatscripts
88 # Install hal fdi configs
89 install -d $(CURDIR)/debian/barry-util/usr/share/hal/fdi/information/10freedesktop
90 install -d $(CURDIR)/debian/barry-util/usr/share/hal/fdi/policy/10osvendor
91 install -m 0644 $(DEB_SRCDIR)/hal/fdi/information/10freedesktop/10-blackberry.fdi $(CURDIR)/debian/barry-util/usr/share/hal/fdi/information/10freedesktop
92 install -m 0644 $(DEB_SRCDIR)/hal/fdi/policy/10osvendor/19-blackberry-acl.fdi $(CURDIR)/debian/barry-util/usr/share/hal/fdi/policy/10osvendor
93 # Install hal support script
94 install -d $(CURDIR)/debian/barry-util/usr/lib/barry
95 install -m 0755 $(DEB_SRCDIR)/hal/hal-blackberry $(CURDIR)/debian/barry-util/usr/lib/barry
96 # Install bash and zsh completion scripts
97 install -d $(CURDIR)/debian/barry-util/etc/bash_completion.d
98 install -m 0644 \
99 $(DEB_SRCDIR)/bash/bjavaloader \
100 $(DEB_SRCDIR)/bash/btool \
101 $(CURDIR)/debian/barry-util/etc/bash_completion.d
102 # Install examples/ into libbarry-dev
103 install -d $(CURDIR)/debian/libbarry-dev/usr/share/doc/libbarry-dev/examples
104 install -m 0644 $(DEB_SRCDIR)/examples/*.cc \
105 $(CURDIR)/debian/libbarry-dev/usr/share/doc/libbarry-dev/examples
107 install/barrybackup-gui::
108 # Install barry icon
109 install -d $(CURDIR)/debian/barrybackup-gui/usr/share/pixmaps
110 install -m 0644 $(DEB_SRCDIR)/logo/barry_logo_debian_menu_icon.xpm $(CURDIR)/debian/barrybackup-gui/usr/share/pixmaps/barry_backup_menu_icon.xpm
111 # Install Gnome .desktop file
112 install -d $(CURDIR)/debian/barrybackup-gui/usr/share/applications
113 install -m 0644 $(DEB_SRCDIR)/menu/barrybackup.desktop $(CURDIR)/debian/barrybackup-gui/usr/share/applications
115 install/barrydesktop::
116 # Install barry icon
117 install -d $(CURDIR)/debian/barrydesktop/usr/share/pixmaps
118 install -m 0644 $(DEB_SRCDIR)/logo/barry_logo_debian_menu_icon.xpm $(CURDIR)/debian/barrydesktop/usr/share/pixmaps/barry_desktop_menu_icon.xpm
119 # Install Gnome .desktop file
120 install -d $(CURDIR)/debian/barrydesktop/usr/share/applications
121 install -m 0644 $(DEB_SRCDIR)/menu/barrydesktop.desktop $(CURDIR)/debian/barrydesktop/usr/share/applications
123 install/barry-doc::
124 # Build the static version of the docs
125 cp -a $(DEB_SRCDIR)/doc/www $(CURDIR)/debian
126 cd $(CURDIR)/debian/www && ./static.sh
127 # Install to share/doc
128 install -d $(CURDIR)/debian/barry-doc/usr/share/doc/barry-doc/www
129 install -m 0644 $(CURDIR)/debian/www/*.html $(CURDIR)/debian/www/*.png $(CURDIR)/debian/www/*.css $(CURDIR)/debian/barry-doc/usr/share/doc/barry-doc/www
131 post-patches::
132 @rm -f $(CURDIR)/deb_srcdir
133 @ln -s $(DEB_SRCDIR) $(CURDIR)/deb_srcdir
134 @test -x $(DEB_SRCDIR)/configure && echo "allready autoreconf" || (cd $(DEB_SRCDIR) && autoreconf -i)
136 os22-binary::
137 # DEB_SRCDIR can be relative, so change into directory to use pwd.
139 # Note: that the compiler flags below depend on opensync-plugin's
140 # debian/rules having a DESTDIR target of opensync-plugin/debian/tmp
141 (cd $(DEB_SRCDIR) && \
142 export TREE_BUILD_CXXFLAGS="-I`pwd`/opensync-plugin/debian/tmp/usr/include/barry19" && \
143 export TREE_BUILD_LDFLAGS="-L`pwd`/opensync-plugin/debian/tmp/usr/lib" && \
144 export PKG_CONFIG_PATH="`pwd`:$(PKG_CONFIG_PATH)" && \
145 export LD_LIBRARY_PATH="`pwd`/opensync-plugin/debian/tmp/usr/lib:$(LD_LIBRARY_PATH)" && \
146 cd opensync-plugin && \
147 debian/rules TREE_BUILD_DIR="`pwd`/.." binary)
149 os22-clean::
150 (cd $(DEB_SRCDIR)/opensync-plugin && debian/rules clean)
152 os4x-binary::
153 # DEB_SRCDIR can be relative, so change into directory to use pwd.
155 # Note: that the compiler flags below depend on opensync-plugin-0.4x's
156 # debian/rules having a DESTDIR target of opensync-plugin-0.4x/debian/tmp
157 (cd $(DEB_SRCDIR) && \
158 export TREE_BUILD_CXXFLAGS="-I`pwd`/opensync-plugin-0.4x/debian/tmp/usr/include/barry19" && \
159 export TREE_BUILD_LDFLAGS="-L`pwd`/opensync-plugin-0.4x/debian/tmp/usr/lib" && \
160 export PKG_CONFIG_PATH="`pwd`:$(PKG_CONFIG_PATH)" && \
161 export LD_LIBRARY_PATH="`pwd`/opensync-plugin-0.4x/debian/tmp/usr/lib:$(LD_LIBRARY_PATH)" && \
162 cd opensync-plugin-0.4x && \
163 debian/rules TREE_BUILD_DIR="`pwd`/.." binary)
165 os4x-clean::
166 (cd $(DEB_SRCDIR)/opensync-plugin-0.4x && debian/rules clean)
168 clean::
169 -@rm -f $(CURDIR)/deb_srcdir