I start by making it for ubuntu, because that I know works, as I already did it manually, then I wish to use OBS for other platforms
What I did:
source from https://github.com/diydrones/apm_planner uploaded as apm_planner.tar.gz
apm_planner.dsc : i entered libraries needed to compile source, and some details.
Format: 1.0
Source: apm_planner
Version: 2.0-b
Binary: apm_planner2
Maintainer: André Kjellstrup <andre.kjellstrup@gmail.com>
Architecture: any
Build-Depends: debhelper (>= 4.1.16),phonon,libqt4-dev,libphonon-dev,libphonon4,phonon-backend-gstreamer,qtcreator,libsdl1.2-dev,libflite1,flite1-dev,build-essential,libopenscenegraph-dev
Files:
d57283ebb8157ae919762c58419353c8 133282 apm_planner2.deb
2fecf324a32123b08cefc0f047bca5ee 63176 apm_planner2.diff.deb
debian.changelog : just a dummy file
apm_planner2 (2.0-b) stable; urgency=low
* Initial Release
-- YourName <youremail@hostname.de> Mon, 25 Dec 2007 10:50:38 +0100
debian.control : not sure shat to do with “section” , “Depends” - I assume these are the dependencies the compiled code need to run, did not add any yet, not to make it too complex.
Source: apm_planner
Section: sectionName
Priority: optional
Maintainer: yourName <yourEmail@hostname.de>
Build-Depends: debhelper (>= 4.1.16),phonon,libqt4-dev,libphonon-dev,libphonon4,phonon-backend-gstreamer,qtcreator,libsdl1.2-dev,libflite1,flite1-dev,build-essential,libopenscenegraph-dev
Package: apm_planner2
Architecture: any
Depends: ${shlibs:Depends}
Description: This first line is a brief description
Then, here there is the long description of the package...
also here the syntax is very painful (look at the documentation of Debian Policy
to avoid errors http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f- Description)
debian.rules : All I did was to replace “make all” with “qmake-qt4 qgroundcontrol.pro” and “make” - I think it’s needed, at least in an enviroment with both qt4 and qt5
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
export DH_COMPAT=4
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
./configure
qmake-qt4 qgroundcontrol.pro
# --- end custom part for compiling
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
make clean || true
# --- end custom part for cleaning up
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package
# The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/<nameOfPackage>
make install DESTDIR=/usr/src/packages/BUILD/debian/ace
# --- end custom part for installing
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
dh_installcron
dh_installman
dh_installinfo
# dh_undocumented
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
- **unresolvable: **
The build can not begin, because required packages are either missing or not explicitly defined.