1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Merged in james-duley/librepilot/LP-82_define_packing_info_once_in_makefile (pull request #90)

LP 82_define_packing_info_once_in_makefile
This commit is contained in:
Lalanne Laurent 2015-10-18 12:11:25 +02:00
commit d729e13cd2
7 changed files with 52 additions and 34 deletions

View File

@ -56,15 +56,32 @@ DIRS := $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) $(OPGCSSY
# Naming for binaries and packaging etc,.
export ORG_BIG_NAME := LibrePilot
GCS_BIG_NAME := ${ORG_BIG_NAME} GCS
GCS_LABEL := GCS
GCS_BIG_NAME := $(ORG_BIG_NAME) $(GCS_LABEL)
# These should be lowercase with no spaces
export ORG_SMALL_NAME := $(call smallify,$(ORG_BIG_NAME))
GCS_SMALL_NAME := $(call smallify,$(GCS_BIG_NAME))
# Change this once the DNS is set to http://wiki.librepilot.org/
WIKI_URL_ROOT := https://librepilot.atlassian.net/wiki/display/LPDOC/
WEBSITE_URL := http://librepilot.org
GIT_URL := https://bitbucket.org/librepilot/librepilot.git
GITWEB_URL := https://bitbucket.org/librepilot/librepilot
# Change this once the DNS is set to http://wiki.librepilot.org/
WIKI_URL_ROOT := https://librepilot.atlassian.net/wiki/display/LPDOC/
USAGETRACKER_URL := https://usagetracker.librepilot.org/
PACKAGING_EMAIL_ADDRESS := packaging@librepilot.org
define DESCRIPTION_SHORT :=
A ground control station and firmware for UAV flight controllers
endef
define DESCRIPTION_LONG :=
The LibrePilot open source project was founded in July 2015.
It focuses on research and development of software and hardware to be used in a variety of applications including vehicle control and stabilization, unmanned autonomous vehicles and robotics.
One of the projects primary goals is to provide an open and collaborative environment making it the ideal home for development of innovative ideas.
endef
# Set up default build configurations (debug | release)
GCS_BUILD_CONF := release
GOOGLE_API_VERSION := 14

View File

@ -29,5 +29,10 @@ lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(s
# Function to make all lowercase and replace spaces with -
EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
define NEWLINE :=
endef
smallify = $(subst $(SPACE),-,$(call lc,$1))

View File

@ -6,6 +6,14 @@ ifndef TOP_LEVEL_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
SED_SCRIPT := sed -i -e ' \
s/<ARCHIVE_PREFIX>/$(PACKAGE_NAME)/g; \
s/<EMAIL>/$(PACKAGING_EMAIL_ADDRESS)/g; \
s,<URL>,$(WEBSITE_URL),g; \
s,<GIT_URL>,$(GIT_URL),g; \
s,<GITWEB_URL>,$(GITWEB_URL),g; \
'
# Are we using a debian based distro?
ifneq ($(wildcard /etc/apt/sources.list),)
include $(ROOT_DIR)/package/linux/deb.mk

View File

@ -1,10 +1,13 @@
# Get some info about the distro
-include /etc/lsb-release
DEB_DIST := unstable
DEB_DIST := $(DISTRIB_CODENAME)
# Instead of RELEASE-15.01-RC1 debian wants 15.01~RC1
UPSTREAM_VER := $(subst -,~,$(subst RELEASE-,,$(PACKAGE_LBL)))
ifeq ($(DEB_DIST), unstable) # This should be set manually for a submission to Debian or similar
DEB_REV := 1
ifeq ($(DEB_DIST), trusty)
DEB_REV := $(DEB_REV)$(DEB_DIST)1
else
DEB_REV := 0$(DEB_DIST)1
endif
DEB_NAME := $(ORG_SMALL_NAME)
DEB_ORIG_SRC := $(PACKAGE_DIR)/$(DEB_NAME)_$(UPSTREAM_VER).orig.tar.gz
@ -14,11 +17,12 @@ DEB_PACKAGE_NAME := $(DEB_NAME)_$(UPSTREAM_VER)-$(DEB_REV)_$(DEB_ARCH)
DEB_DIR := package/linux/debian
SED_DATE_STRG := $(shell date -R)
SED_SCRIPT := sed -i -e ' \
SED_SCRIPT := $(SED_SCRIPT)' \
s/<VERSION>/$(UPSTREAM_VER)-$(DEB_REV)/g; \
s/<DATE>/$(SED_DATE_STRG)/g; \
s/<DIST>/$(DEB_DIST)/g; \
s/<NAME>/$(DEB_NAME)/g; \
s/<DESCRIPTION>/$(DESCRIPTION_SHORT)\n $(subst $(NEWLINE),\n ,$(DESCRIPTION_LONG))/g; \
'
# Ubuntu 14.04 (Trusty Tahr) has different names for the qml-modules

View File

@ -1,25 +1,14 @@
Source: <NAME>
Section: electronics
Priority: optional
Maintainer: James Duley <james@openpilot.org>
Maintainer: The LibrePilot Project <<EMAIL>>
Build-Depends: debhelper (>= 9), libudev-dev, libusb-1.0-0-dev, libsdl1.2-dev, python, gcc-arm-none-eabi (>=4.9), qt5-default, qttools5-dev-tools, libqt5svg5-dev, qtdeclarative5-dev, qml-module-qtquick-controls, libqt5serialport5-dev, qtmultimedia5-dev, qtscript5-dev, libqt5opengl5-dev
Standards-Version: 3.9.5
Homepage: http://www.openpilot.org
Vcs-Git: git://git.openpilot.org/OpenPilot.git
Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot
Homepage: <URL>
Vcs-Git: <GIT_URL>
Vcs-Browser: <GITWEB_URL>
Package: <NAME>
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, qml-module-qtquick-controls, qml-module-qtquick-dialogs, qml-module-qtquick-xmllistmodel, qml-module-qtquick-localstorage, qml-module-qtquick-particles2, qml-module-qtquick-window2, qml-module-qtquick2
Description: Platform for aerial robotics or other mobile vehicular platforms
OpenPilot is a next-generation Open Source UAV autopilot created by the
OpenPilot Community (an all volunteer non-profit community). It is a highly
capable platform for multirotors, helicopters, fixed wing aircraft, and
other vehicles.
.
It has been designed from the ground up by a community of passionate
developers from around the globe, with its core design principles being
quality, safety, and ease of use. Simplicity does not come with any
compromises either: with no hard-coded settings, a complete flight plan
scripting language and other powerful features, OpenPilot is an extremely
capable UAV autopilot platform.
Description: <DESCRIPTION>

View File

@ -6,13 +6,14 @@ RPM_PACKAGE_NAME := $(RPM_NAME)-$(UPSTREAM_VER)-$(RPM_REL)$(shell rpm --eval
RPM_PACKAGE_FILE := $(PACKAGE_DIR)/RPMS/$(RPM_ARCH)/$(RPM_PACKAGE_NAME)
RPM_PACKAGE_SRC := $(PACKAGE_DIR)/SRPMS/$(RPM_PACKAGE_NAME).src.rpm
SED_SCRIPT := sed -i -e ' \
SED_SCRIPT := $(SED_SCRIPT)' \
s/<VERSION>/$(UPSTREAM_VER)/g; \
s/<NAME>/$(RPM_NAME)/g; \
s/<RELEASE>/$(RPM_REL)/g; \
s/<SOURCE0>/$(notdir $(DIST_TAR_GZ))/g; \
s/<SOURCE1>/$(notdir $(FW_DIST_TAR_GZ))/g; \
s/<ARCHIVE_PREFIX>/$(PACKAGE_NAME)/g; \
s/<SUMMARY>/$(DESCRIPTION_SHORT)/g; \
s/<DESCRIPTION>/$(subst $(NEWLINE),\n,$(DESCRIPTION_LONG))/g; \
'
RPM_DIRS := $(addprefix $(PACKAGE_DIR)/,BUILD RPMS SOURCES SPECS SRPMS)

View File

@ -1,11 +1,11 @@
Name: <NAME>
Summary: Ground Control Station
Summary: <SUMMARY>
Version: <VERSION>
Release: <RELEASE>%{?dist}
Group: Applications/Scientific
License: GPLv3+
URL: http://forum.librepilot.org/
URL: <URL>
Source0: <SOURCE0>
Source1: <SOURCE1>
@ -41,13 +41,7 @@ Requires: qt5-qtsvg
%description
LibrePilot is a next-generation Open Source UAV autopilot created by the
LibrePilot Community. It is a highly capable platform for
multirotors, helicopters, fixed wing aircraft, and other vehicles.
It has been designed from the ground up by a community of passionate developers
from around the globe, with its core design principles being quality, safety,
and ease of use.
<DESCRIPTION>
%prep
%setup -q -T -a 1 -c -n <ARCHIVE_PREFIX>/build