2011-12-19 01:58:42 +01:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
# Sample debian/rules that uses debhelper.
|
|
|
|
#
|
|
|
|
# This file was originally written by Joey Hess and Craig Small.
|
|
|
|
# As a special exception, when this file is copied by dh-make into a
|
|
|
|
# dh-make output file, you may use that output file without restriction.
|
|
|
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
|
|
#
|
|
|
|
# Modified to make a template file for a multi-binary package with separated
|
|
|
|
# build-arch and build-indep targets by Bill Allombert 2001
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
# export DH_VERBOSE=1
|
|
|
|
|
|
|
|
# This has to be exported to make some magic below work.
|
|
|
|
export DH_OPTIONS=-v
|
|
|
|
|
|
|
|
#%:
|
|
|
|
# dh $@
|
|
|
|
|
2011-12-22 06:38:40 +01:00
|
|
|
PACKAGE_DIR = $(shell cat build/package_dir)
|
2011-12-19 01:58:42 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean
|
2014-01-09 15:57:12 +01:00
|
|
|
|
2011-12-19 01:58:42 +01:00
|
|
|
install:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_prep
|
|
|
|
dh_installdirs
|
2011-12-24 22:30:02 +01:00
|
|
|
dh_installudev --priority=45
|
2011-12-19 01:58:42 +01:00
|
|
|
# Add here commands to install the package into debian/<packagename>
|
2013-03-30 16:33:38 +01:00
|
|
|
cp -arp build/openpilotgcs_release/bin debian/openpilot/usr/local/OpenPilot
|
|
|
|
cp -arp build/openpilotgcs_release/lib debian/openpilot/usr/local/OpenPilot
|
|
|
|
cp -arp build/openpilotgcs_release/share debian/openpilot/usr/local/OpenPilot
|
|
|
|
cp -arp build/openpilotgcs_release/.obj debian/openpilot/usr/local/OpenPilot
|
2014-01-09 15:57:12 +01:00
|
|
|
cp -arp package/linux/qt.conf debian/openpilot/usr/local/OpenPilot/bin
|
2011-12-19 01:58:42 +01:00
|
|
|
cp -arp package/linux/openpilot.desktop debian/openpilot/usr/share/applications
|
|
|
|
cp -arp package/linux/openpilot.png debian/openpilot/usr/share/pixmaps
|
2011-12-25 04:38:04 +01:00
|
|
|
cp -arp package/linux/openpilot_menu.png debian/openpilot/usr/share/pixmaps
|
|
|
|
cp -arp package/linux/openpilot_menu.menu debian/openpilot/etc/xdg/menus/applications-merged
|
|
|
|
cp -arp package/linux/openpilot_menu.directory debian/openpilot/usr/share/desktop-directories
|
2012-01-05 05:39:23 +01:00
|
|
|
ifdef PACKAGE_DIR
|
2013-05-26 21:47:43 +02:00
|
|
|
cp -a $(PACKAGE_DIR)/*.elf debian/openpilot/usr/local/OpenPilot/firmware/
|
2012-01-05 05:39:23 +01:00
|
|
|
else
|
|
|
|
$(error PACKAGE_DIR not defined! $(PACKAGE_DIR))
|
2011-12-22 06:38:40 +01:00
|
|
|
endif
|
2011-12-19 01:58:42 +01:00
|
|
|
ln -s /usr/local/OpenPilot/bin/openpilotgcs.bin `pwd`/debian/openpilot/usr/bin/openpilot-gcs
|
|
|
|
rm -rf debian/openpilot/usr/local/OpenPilot/share/openpilotgcs/sounds/sounds
|
|
|
|
rm -rf debian/openpilot/usr/local/OpenPilot/share/openpilotgcs/pfd/pfd
|
|
|
|
rm -rf debian/openpilot/usr/local/OpenPilot/share/openpilotgcs/models/models
|
|
|
|
rm -rf debian/openpilot/usr/local/OpenPilot/share/openpilotgcs/mapicons/mapicons
|
|
|
|
rm -rf debian/openpilot/usr/local/OpenPilot/share/openpilotgcs/dials/dials
|
|
|
|
rm -rf debian/openpilot/usr/local/OpenPilot/share/openpilotgcs/diagrams/diagrams
|
2014-01-10 09:32:04 +01:00
|
|
|
# Removing leaked files from the dist
|
|
|
|
find debian/openpilot -name Makefile -exec rm -f {} \;
|
2011-12-19 01:58:42 +01:00
|
|
|
|
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: install
|
|
|
|
|
|
|
|
# We have nothing to build by default. Got taken care of by OPs build system
|
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_installexamples
|
|
|
|
dh_installman
|
|
|
|
dh_link
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
2014-01-11 01:11:00 +01:00
|
|
|
dh_shlibdeps -l/usr/local/OpenPilot/lib/openpilotgcs:/usr/local/OpenPilot/lib/qt5 --dpkg-shlibdeps-params="--ignore-missing-info -v"
|
2011-12-19 01:58:42 +01:00
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
2014-01-09 15:57:12 +01:00
|
|
|
dh_builddeb -- -Zbzip2
|
2011-12-19 01:58:42 +01:00
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
|
|
|
|
.PHONY: clean binary-indep binary-arch binary install
|
|
|
|
|