Add group AGL to spec file
[apps/app-templates.git] / rpm / rpm-config.spec.in
index 31a2a0a..8b3d442 100644 (file)
@@ -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.
 ###########################################################################
 
 
-Name:    @PROJECT_NAME@
+Name:    @NPKG_PROJECT_NAME@
 Version: @PROJECT_VERSION@
 Release: 1
-License: @PROJECT_LICENCE@
+Group:   AGL
+License: @PROJECT_LICENSE@
 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@
@@ -40,13 +43,20 @@ BuildRoot:%{_tmppath}/%{name}-%{version}-build
 
 %build
 %cmake -DBINDINGS_INSTALL_PREFIX:PATH=%{_libdir}
-%__make %{?_smp_mflags}
+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}/*/*