From 8714a34238ef4d389db052d70855c0922b125294 Mon Sep 17 00:00:00 2001 From: James Duley Date: Sat, 1 Aug 2015 09:30:28 +0100 Subject: [PATCH] LP-80 extend linux packaging: rework distro selection Change-Id: I476f52296de254b3b04a200c14a3924a2832e452 --- package/Linux.mk | 10 +++------- package/linux/rpmspec.in | 10 +++++----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/package/Linux.mk b/package/Linux.mk index 3dc9ad7b4..51148f4d1 100644 --- a/package/Linux.mk +++ b/package/Linux.mk @@ -7,17 +7,13 @@ ifndef TOP_LEVEL_MAKEFILE endif # Are we using a debian based distro? -ifneq ($(shell which dpkg 2> /dev/null),) +ifneq ($(wildcard /etc/apt/sources.list),) include $(ROOT_DIR)/package/linux/deb.mk -endif - # Are we using a rpm based distro? -ifneq ($(shell which rpm 2> /dev/null),) +else ifneq ($(wildcard /etc/yum.repos.d/*),) include $(ROOT_DIR)/package/linux/rpm.mk -endif - # Are we using an Arch based distro? -ifneq ($(shell which makepkg 2> /dev/null),) +else ifneq ($(wildcard /etc/pacman.conf),) $(info TODO: built in arch package) endif diff --git a/package/linux/rpmspec.in b/package/linux/rpmspec.in index e89595840..b685efee0 100644 --- a/package/linux/rpmspec.in +++ b/package/linux/rpmspec.in @@ -1,7 +1,7 @@ Name: Summary: Ground Control Station Version: -Release: +Release: %{?dist} Group: Applications/Scientific License: GPLv3+ @@ -49,12 +49,11 @@ and ease of use. %prep -%setup -q -n %{name}-%{version} +%setup -q -n %build make %{?_smp_mflags} gcs QMAKE=qmake-qt5 CC=%{__cc} CXX=%{__cxx} libbasename=%{_lib} -#make -j1 opfw_resource %install @@ -75,11 +74,12 @@ rm -rf $RPM_BUILD_ROOT %files -%doc README.txt GPLv3.txt +%doc README.md CREDITS.txt WHATSNEW.txt +%doc GPLv3.txt %{_bindir}/librepilot-gcs %{_udevrulesdir}/45-librepilot.rules %{_datadir}/applications/librepilot.desktop -%{_datadir}/librepilot-gcs//* +%{_datadir}/librepilot-gcs/* %{_datadir}/pixmaps/librepilot.png %{_libdir}/librepilot-gcs/plugins/OpenPilot/*.pluginspec %{_libdir}/librepilot-gcs/plugins/OpenPilot/*.so