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

LP-82 define packaging info once in Makefile

This commit is contained in:
James Duley 2015-10-08 22:33:16 +01:00
parent f09bd1701d
commit 8834b66858
7 changed files with 44 additions and 30 deletions

View File

@ -61,11 +61,27 @@ 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

@ -14,11 +14,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