summaryrefslogtreecommitdiffstats
path: root/rpm/rpm-config.spec.in
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2017-06-09 18:00:41 +0200
committerRonan Le Martret <ronan.lemartret@iot.bzh>2017-06-20 11:36:08 +0200
commit0daaff3b597af4e656c8cd274c28a46d70e88963 (patch)
tree1646a4aebaac0aa2d2ff41208aaf179d15d11f2a /rpm/rpm-config.spec.in
parent8d9b7f22c821e149a09824df50a6775fac43a977 (diff)
Update packaging creation
* update rpm creation * add deb packaging Change-Id: Idc1623b7b0ca72d4842e59f9495fc26c487ef008 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'rpm/rpm-config.spec.in')
-rw-r--r--rpm/rpm-config.spec.in27
1 files changed, 18 insertions, 9 deletions
diff --git a/rpm/rpm-config.spec.in b/rpm/rpm-config.spec.in
index 0383102..ecfa795 100644
--- a/rpm/rpm-config.spec.in
+++ b/rpm/rpm-config.spec.in
@@ -1,7 +1,7 @@
###########################################################################
# Copyright 2015, 2016, 2017 IoT.bzh
#
-# author: Fulup Ar Foll <fulup@iot.bzh>
+# author: @PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
###########################################################################
-Name: @PROJECT_NAME@
+Name: @NPKG_PROJECT_NAME@
Version: @PROJECT_VERSION@
Release: 1
License: @PROJECT_LICENSE@
@@ -25,12 +25,14 @@ Summary: @PROJECT_DESCRIPTION@
Url: @PROJECT_URL@
Source0: %{name}_%{version}.orig.tar.gz
-Prefix: /opt/@PROJECT_NAME@
BuildRequires: cmake
BuildRequires: gcc gcc-c++
-BuildRequires: @RPM_PKG_DEPS@
+@RPM_PKG_DEPS@
-BuildRoot:%{_tmppath}/%{name}-%{version}-build
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%define _prefix /opt/AGL/@PROJECT_NAME@
+%define __cmake cmake
%description
@PROJECT_DESCRIPTION@
@@ -43,10 +45,17 @@ BuildRoot:%{_tmppath}/%{name}-%{version}-build
%__make %{?_smp_mflags}
%install
+CURDIR=$(pwd)
[ -d build ] && cd build
-%make_install
+make populate
+mkdir -p %{?buildroot}%{_prefix}
+cp -r package/* %{?buildroot}%{_prefix}
+
+cd $CURDIR
+find %{?buildroot}%{_prefix} -type d -exec echo "%dir {}" \;>> pkg_file
+find %{?buildroot}%{_prefix} -type f -exec echo "{}" \;>> pkg_file
+sed -i 's@%{?buildroot}@@g' pkg_file
+
-%files
+%files -f pkg_file
%defattr(-,root,root)
-%dir %{_prefix}/*
-%{_prefix}/*/*